Browse Source

单个查询优化

tags/24080901
WendyYang 5 months ago
parent
commit
a5e74a3df8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java

+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java View File

@@ -1311,7 +1311,7 @@ public class TodoCenterManage {
.taskDefinitionKeys(nodeIds)
.orderByTaskCreateTime()
.asc()
.list();
.listPage(0, 1);
if (CollUtil.isEmpty(tasks)) {
//如果此子单位为空 那就直接再查下 他的其它任务
List<Task> currentTasks = taskService.createTaskQuery()
@@ -1319,7 +1319,7 @@ public class TodoCenterManage {
.taskAssignee(employeeCode)
.orderByTaskCreateTime()
.asc()
.list();
.listPage(0, 1);
if (CollUtil.isNotEmpty(currentTasks)) {
return currentTasks.get(0).getId();
}
@@ -1341,7 +1341,7 @@ public class TodoCenterManage {
.taskAssignee(employeeCode)
.orderByTaskCreateTime()
.asc()
.list();
.listPage(0, 1);
if (CollUtil.isEmpty(tasks)) {
return null;
}


Loading…
Cancel
Save