From 3ce7e493d6d29e51d57d2246852c5948e70ab860 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Mon, 5 Aug 2024 15:30:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=A3=E8=AF=BB=E6=B5=81=E7=A8=8B):=20?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=B5=81=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activiti/listener/MyGlobalEventListener.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/listener/MyGlobalEventListener.java b/laws-modules/src/main/java/com/jero/modules/activiti/listener/MyGlobalEventListener.java index 7394857e..b84f68c1 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/listener/MyGlobalEventListener.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/listener/MyGlobalEventListener.java @@ -422,16 +422,18 @@ public class MyGlobalEventListener implements ActivitiEventListener { String parentTaskId = (String) execution.getVariable(ActivitiCommon.PARENT_TASK_ID); if (StringUtils.isNotBlank(parentTaskId)) { int i = processAllService.countByParentTaskId(parentTaskId); - if (StandardInterpretCommon.KEY_1.equals(processDefinitionId) || - StandardInterpretCommon.KEY_2.equals(processDefinitionId) || - StandardInterpretCommon.KEY_3.equals(processDefinitionId)) { + if (StandardInterpretCommon.KEY_1.equals(processDefinitionId.split(":")[0]) || + StandardInterpretCommon.KEY_2.equals(processDefinitionId.split(":")[0]) || + StandardInterpretCommon.KEY_3.equals(processDefinitionId.split(":")[0])) { if (i == 0) { + TaskService taskService = SpringContextUtil.getBean(TaskService.class); if (StandardInterpretCommon.KEY_1.equals(processDefinitionId)) { - TaskService taskService = SpringContextUtil.getBean(TaskService.class); boolean b = isChildrenNodeAllComplete(processInstanceId, parentTaskId); if (b) { taskService.complete(parentTaskId); } + }else { + taskService.complete(parentTaskId); } } }