From cc440c5d56401666e6996abe4822d9205e704772 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 16 Jun 2023 10:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=AF=BB=E6=89=BE?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E4=B8=AAtaskId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index e8cd08b..ba3f283 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -1309,6 +1309,16 @@ public class TodoCenterManage { .asc() .list(); if(CollUtil.isEmpty(tasks)){ + //如果此子单位为空 那就直接再查下 他的其它任务 + List 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();