Browse Source

优化 寻找下一个taskId

master
PoffyZhang 1 year ago
parent
commit
cc440c5d56
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 10
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -1309,6 +1309,16 @@ public class TodoCenterManage {
.asc()
.list();
if(CollUtil.isEmpty(tasks)){
//如果此子单位为空 那就直接再查下 他的其它任务
List<Task> currentTasks = taskService.createTaskQuery()
.processInstanceId(instance.getId())
.taskAssignee(employeeCode)
.orderByTaskCreateTime()
.asc()
.list();
if(CollUtil.isNotEmpty(currentTasks)){
return currentTasks.get(0).getId();
}
return taskId;
}
return tasks.get(0).getId();


Loading…
Cancel
Save