修改错误
This commit is contained in:
@ -16,6 +16,9 @@ public class ScheduledTasksController {
|
||||
public void checkTask() {
|
||||
scheduledTasksService.checkTask();
|
||||
}
|
||||
|
||||
@RequestMapping("/closeTask")
|
||||
public void close() {
|
||||
scheduledTasksService.closeTask();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.dao;
|
||||
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.entity.CoscoEvaluateTaskDeptWeight;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -72,5 +73,5 @@ public interface CoscoEvaluateTaskDeptWeightMapper {
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
List<CoscoEvaluateTaskDeptWeight> selectByTaskId(List<String> taskIds);
|
||||
List<CoscoEvaluateTaskDeptWeight> selectByTaskId(@Param("taskIds")List<String> taskIds);
|
||||
}
|
||||
|
@ -19,12 +19,10 @@ import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@ -69,6 +67,7 @@ public class ScheduledTasksServiceImpl implements ScheduledTasksService {
|
||||
*/
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void closeTask() {
|
||||
//查询小于当前时间 未关闭任务
|
||||
//获取当前时间指标信息
|
||||
@ -100,7 +99,10 @@ public class ScheduledTasksServiceImpl implements ScheduledTasksService {
|
||||
//获取人员信息
|
||||
List<UserVo> user = userService.getUser(new SelectUserVo());
|
||||
//给人员添加部门信息
|
||||
Map<String, String> userMap = user.stream().collect(Collectors.toMap(UserVo::getUserId, UserVo::getUserDeptId));
|
||||
Map<String, String> userMap=new HashMap<>();
|
||||
user.forEach(userVo -> {
|
||||
System.out.println(userVo.getUserId());
|
||||
userMap.put(userVo.getUserId(), userVo.getUserDeptId());});
|
||||
calculateAndObtainScoresVos.forEach(vos -> {
|
||||
vos.setDeptId(userMap.get(vos.getUserId()));
|
||||
});
|
||||
|
@ -78,7 +78,7 @@ public class SupplierDimensionVo implements Serializable {
|
||||
/**
|
||||
* 分数
|
||||
*/
|
||||
private String suscore;
|
||||
private Integer suScore;
|
||||
|
||||
private String categoryName;
|
||||
|
||||
|
@ -192,7 +192,7 @@
|
||||
|
||||
<select id="selectByTaskIds" parameterType="list"
|
||||
resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.CalculateAndObtainScoresVo">
|
||||
select cetsu.user_id as userId, ces.score, ces.indicator_nd_id as indicatorNdId, '1' as dept_id as deptId,
|
||||
select cetsu.user_id as userId, ces.score, ces.indicator_nd_id as indicatorNdId, '1' as deptId,
|
||||
cets.supplier_id as supplierId,cetsu.evaluate_task_id as evaluateTaskId
|
||||
from cosco_evaluate_scoring ces
|
||||
join cosco_evaluate_task_supplier_user cetsu
|
||||
|
@ -389,6 +389,7 @@
|
||||
</if>
|
||||
|
||||
</where>
|
||||
group by cet.id
|
||||
order by cet.create_time desc
|
||||
</select>
|
||||
<select id="selectMyPage"
|
||||
|
@ -295,11 +295,12 @@
|
||||
when cet.status =2 then '已结束' end as statusName,
|
||||
case when cetsu.review_status =0 then '未提交'
|
||||
when cetsu.review_status=1 then '已提交' end as reviewStatusName,
|
||||
(select sum(score)
|
||||
from cosco_evaluate_scoring where del_flag='normal'
|
||||
and evaluate_task_supplier_user_id=cetsu.id)
|
||||
as suscore
|
||||
|
||||
IFNULL((
|
||||
SELECT SUM(score)
|
||||
FROM cosco_evaluate_scoring
|
||||
WHERE del_flag='normal'
|
||||
AND evaluate_task_supplier_user_id=cetsu.id
|
||||
), 0) AS suScore
|
||||
FROM
|
||||
cosco_evaluate_task_supplier_user cetsu
|
||||
LEFT JOIN cosco_evaluate_task cet ON cetsu.evaluate_task_id = cet.id
|
||||
|
Reference in New Issue
Block a user