From 0d226d0379066b54abd8701bc6a22d3d1f842393 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 19 Oct 2023 16:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=20=E4=B8=93=E5=AE=B6?= =?UTF-8?q?=E5=8F=82=E6=95=B0=20=E6=A0=B9=E6=8D=AEtaskId=E8=BD=AC=E4=B8=BA?= =?UTF-8?q?nodeID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/todocenter/manage/TodoCenterManage.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 f8b68e1..250fbde 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 @@ -92,6 +92,7 @@ import org.flowable.bpmn.model.FlowElementsContainer; import org.flowable.bpmn.model.SubProcess; import org.flowable.engine.HistoryService; import org.flowable.engine.RepositoryService; +import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.task.api.Task; @@ -583,16 +584,22 @@ public class TodoCenterManage { res.setStatus(progressInstanceDetail.getStatus()); res.setCanWithdraw(withDrawHandle.checkCanWithdraw(instanceId, progressInstanceDetail, request.getTaskId())); res.setIsHighLine(isHighLine); - res.setConstructionSuggestions(checkConstructionSuggestionsByNodeId(nodeId)); + res.setConstructionSuggestions(checkConstructionSuggestionsByNodeId(taskId)); passHandle.checkCanPassOrSeal(request.getInstanceId(), request.getTaskId(), employeeCode, res); //是不是被 驳回|退回 res.setIsChange(todoService.isChangeRecord(projectId)); return res; } - private Boolean checkConstructionSuggestionsByNodeId(String nodeId) { - if(StringUtils.isNotBlank(nodeId)){ - return nodeId.endsWith(StrPool.DASH + ProcessConstant.Field.CONSTRUCTION); + private Boolean checkConstructionSuggestionsByNodeId(String taskId) { + if(StringUtils.isNotBlank(taskId)){ + List tasks = taskService.createTaskQuery() + .taskId(taskId) + .orderByTaskId().desc().list(); + if(CollUtil.isNotEmpty(tasks)){ + return tasks.get(0).getTaskDefinitionKey() + .endsWith(StrPool.DASH + ProcessConstant.Field.CONSTRUCTION); + } } return Boolean.FALSE; }