|
|
@@ -90,10 +90,10 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
coreEvaluatePlanVO.setIsComplete(true);
|
|
|
}
|
|
|
//是否有任务
|
|
|
- String[] status1 = {"0","1","2"};
|
|
|
+ String[] status1 = {"0", "1", "2"};
|
|
|
List<CoreEvaluateTask> coreEvaluateTasks1 = coreEvaluateTaskMapper.selectTaskByPlanIdAndStatus(id, status1);
|
|
|
coreEvaluatePlanVO.setIsHaveTask(false);
|
|
|
- if (CollectionUtils.isNotEmpty(coreEvaluateTasks1)){
|
|
|
+ if (CollectionUtils.isNotEmpty(coreEvaluateTasks1)) {
|
|
|
coreEvaluatePlanVO.setIsHaveTask(true);
|
|
|
}
|
|
|
return coreEvaluatePlanVO;
|
|
|
@@ -218,11 +218,16 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
if (null != coreEvaluatePlan1 && !coreEvaluatePlan1.getId().equals(coreEvaluatePlan.getId())) {
|
|
|
throw new RuntimeException("计划名称重复");
|
|
|
}
|
|
|
- //删除未完成任务
|
|
|
- List status = new ArrayList();
|
|
|
- status.add("0");
|
|
|
- status.add("1");
|
|
|
- coreEvaluateTaskService.deleteCoreEvaluateTaskByEvaluatePlanId(coreEvaluatePlanDTO.getId(), status);
|
|
|
+ //是否有任务
|
|
|
+ String[] status1 = {"2"};
|
|
|
+ List<CoreEvaluateTask> coreEvaluateTasks1 = coreEvaluateTaskMapper.selectTaskByPlanIdAndStatus(coreEvaluatePlanDTO.getId(), status1);
|
|
|
+ if (CollectionUtils.isEmpty(coreEvaluateTasks1)) {
|
|
|
+ //删除未完成任务
|
|
|
+ List status = new ArrayList();
|
|
|
+ status.add("0");
|
|
|
+ status.add("1");
|
|
|
+ coreEvaluateTaskService.deleteCoreEvaluateTaskByEvaluatePlanId(coreEvaluatePlanDTO.getId(), status);
|
|
|
+ }
|
|
|
BeanUtils.copyProperties(coreEvaluatePlanDTO, coreEvaluatePlan);
|
|
|
coreEvaluatePlan.setUpdateTime(DateUtils.getNowDate());
|
|
|
coreEvaluatePlan.setUpdateBy(SecurityUtils.getUsername());
|
|
|
@@ -253,7 +258,8 @@ public class CoreEvaluatePlanServiceImpl extends ServiceImpl<CoreEvaluatePlanMap
|
|
|
coreEvaluatePlanContent.setEvaluateId(coreEvaluatePlanDTO.getId());
|
|
|
coreEvaluatePlanContentMapper.insert(coreEvaluatePlanContent);
|
|
|
});
|
|
|
- //
|
|
|
+ //下发
|
|
|
+ distribute(coreEvaluatePlan.getId(), coreEvaluatePlan.getBuildTaskNow());
|
|
|
return i;
|
|
|
}
|
|
|
|