Browse Source

完善修改任务真实开始时间接口

tall3
ma 4 years ago
parent
commit
50f3fbe8ae
  1. 11
      common/src/main/java/com/ccsens/common/service/TaskService.java
  2. 7
      common/src/main/resources/mapper_dao/ProTaskProcessDao.xml

11
common/src/main/java/com/ccsens/common/service/TaskService.java

@ -505,6 +505,7 @@ public class TaskService implements ITaskService {
if (0 == statusOfUpdate){
Long oldPlanStartTime = 0L;
ProTaskSub taskSub = taskSubDao.findNextTaskSub(proTaskProcess.getNextTaskDetailId(),planTime);
//1.开始时,2.开始后,4.结束时,5.结束后
if (1 == proTaskProcess.getProcessType()){
oldPlanStartTime = taskSub.getPlanStartTime();
taskSub.setPlanStartTime(realTime);
@ -515,6 +516,16 @@ public class TaskService implements ITaskService {
taskSub.setPlanStartTime(realTime+proTaskProcess.getTimeDifference());
taskSubDao.updateByPrimaryKeySelective(taskSub);
}
if (4 == proTaskProcess.getProcessType()){
oldPlanStartTime = taskSub.getPlanStartTime();
taskSub.setPlanStartTime(realTime+taskSub.getPlanDuration());
taskSubDao.updateByPrimaryKeySelective(taskSub);
}
if (5 == proTaskProcess.getProcessType()){
oldPlanStartTime = taskSub.getPlanStartTime();
taskSub.setPlanStartTime(realTime+taskSub.getPlanDuration()+proTaskProcess.getTimeDifference());
taskSubDao.updateByPrimaryKeySelective(taskSub);
}
findNextTask(taskSub.getTaskDetailId(),statusOfUpdate,taskSub.getPlanStartTime(),oldPlanStartTime);
}
if (1 == statusOfUpdate){

7
common/src/main/resources/mapper_dao/ProTaskProcessDao.xml

@ -45,12 +45,7 @@
WHERE
rec_status = 0
AND task_detail_id = #{taskDetailId}
<if test="statusOfUpdate==0">
AND process_type IN (1,2)
</if>
<if test="statusOfUpdate==1">
AND process_type IN (4,5)
</if>
AND process_type IN (1,2,4,5)
</select>
</mapper>

Loading…
Cancel
Save