From 6769255675bbc13323adf7120e7ece6afcbadf8a Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 12 Jun 2025 11:55:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=9C=89=E6=AD=A5=E9=AA=A4=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=BA=BA=E6=97=B6=E5=B0=86=E5=A4=84=E7=90=86=E4=BA=BA=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=89=A7=E8=A1=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=EF=BC=8C=E5=90=A6=E5=88=99=E5=B0=86=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=9C=E4=B8=BA=E6=89=A7=E8=A1=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1441937939202048]工单创建自动化作业时,有步骤处理人时将处理人作为作业的执行用户,否则将系统用户作为执行用户 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1441937939202048 --- .../component/CreateJobProcessComponent.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java b/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java index 60e683d0..847ac227 100644 --- a/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java +++ b/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java @@ -40,10 +40,7 @@ import neatlogic.framework.form.dto.AttributeDataVo; import neatlogic.framework.form.dto.FormAttributeVo; import neatlogic.framework.process.constvalue.*; import neatlogic.framework.process.crossover.*; -import neatlogic.framework.process.dto.ProcessTaskFormAttributeDataVo; -import neatlogic.framework.process.dto.ProcessTaskStepDataVo; -import neatlogic.framework.process.dto.ProcessTaskStepVo; -import neatlogic.framework.process.dto.ProcessTaskStepWorkerVo; +import neatlogic.framework.process.dto.*; import neatlogic.framework.process.exception.processtask.ProcessTaskException; import neatlogic.framework.process.exception.processtask.ProcessTaskNoPermissionException; import neatlogic.framework.process.stephandler.core.*; @@ -289,6 +286,13 @@ public class CreateJobProcessComponent extends ProcessStepHandlerBase { } if (CollectionUtils.isEmpty(builderList)) { processTaskStepComplete(processTaskStepVo.getId()); + return; + } + String assignExecUser = SystemUser.SYSTEM.getUserUuid(); + IProcessTaskCrossoverMapper processTaskCrossoverMapper1 = CrossoverServiceFactory.getApi(IProcessTaskCrossoverMapper.class); + List stepUserVoList = processTaskCrossoverMapper.getProcessTaskStepUserByStepId(currentProcessTaskStepVo.getId(), ProcessUserType.MAJOR.getValue()); + if (CollectionUtils.isNotEmpty(stepUserVoList)) { + assignExecUser = stepUserVoList.get(0).getUserUuid(); } JSONArray errorMessageList = new JSONArray(); boolean flag = false; @@ -299,7 +303,7 @@ public class CreateJobProcessComponent extends ProcessStepHandlerBase { jobVo.setInvokeId(processTaskStepVo.getId()); jobVo.setRouteId(processTaskStepVo.getId().toString()); jobVo.setSource(AutoExecJobProcessSource.ITSM.getValue()); - jobVo.setAssignExecUser(SystemUser.SYSTEM.getUserUuid()); + jobVo.setAssignExecUser(assignExecUser); try { autoexecJobActionService.validateCreateJob(jobVo); autoexecJobMapper.insertAutoexecJobProcessTaskStep(jobVo.getId(), processTaskStepVo.getId()); -- Gitee From 872ae43bbdebf3e4b4c1f4e9d464634952113146 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 12 Jun 2025 12:07:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=9C=89=E6=AD=A5=E9=AA=A4=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=BA=BA=E6=97=B6=E5=B0=86=E5=A4=84=E7=90=86=E4=BA=BA=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=89=A7=E8=A1=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=EF=BC=8C=E5=90=A6=E5=88=99=E5=B0=86=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=9C=E4=B8=BA=E6=89=A7=E8=A1=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1441937939202048]工单创建自动化作业时,有步骤处理人时将处理人作为作业的执行用户,否则将系统用户作为执行用户 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1441937939202048 --- .../stephandler/component/CreateJobProcessComponent.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java b/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java index 847ac227..693bad66 100644 --- a/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java +++ b/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java @@ -289,8 +289,7 @@ public class CreateJobProcessComponent extends ProcessStepHandlerBase { return; } String assignExecUser = SystemUser.SYSTEM.getUserUuid(); - IProcessTaskCrossoverMapper processTaskCrossoverMapper1 = CrossoverServiceFactory.getApi(IProcessTaskCrossoverMapper.class); - List stepUserVoList = processTaskCrossoverMapper.getProcessTaskStepUserByStepId(currentProcessTaskStepVo.getId(), ProcessUserType.MAJOR.getValue()); + List stepUserVoList = processTaskCrossoverMapper.getProcessTaskStepUserByStepId(processTaskStepVo.getId(), ProcessUserType.MAJOR.getValue()); if (CollectionUtils.isNotEmpty(stepUserVoList)) { assignExecUser = stepUserVoList.get(0).getUserUuid(); } -- Gitee From 788475fc1a68eda6bc44c548ddf2adc4fb857e40 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 12 Jun 2025 13:07:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=87=AA=E5=8A=A8=E5=8C=96=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=9C=89=E6=AD=A5=E9=AA=A4=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=BA=BA=E6=97=B6=E5=B0=86=E5=A4=84=E7=90=86=E4=BA=BA=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=89=A7=E8=A1=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=EF=BC=8C=E5=90=A6=E5=88=99=E5=B0=86=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=9C=E4=B8=BA=E6=89=A7=E8=A1=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1441937939202048]工单创建自动化作业时,有步骤处理人时将处理人作为作业的执行用户,否则将系统用户作为执行用户 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1441937939202048 --- .../component/CreateJobProcessComponent.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java b/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java index 693bad66..4e2a57d0 100644 --- a/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java +++ b/src/main/java/neatlogic/module/autoexec/process/stephandler/component/CreateJobProcessComponent.java @@ -34,6 +34,7 @@ import neatlogic.framework.autoexec.exception.AutoexecCombopActiveVersionNotFoun import neatlogic.framework.autoexec.exception.AutoexecCombopVersionNotFoundException; import neatlogic.framework.autoexec.exception.AutoexecServiceConfigExpiredException; import neatlogic.framework.autoexec.exception.AutoexecServiceNotFoundException; +import neatlogic.framework.common.constvalue.GroupSearch; import neatlogic.framework.common.constvalue.systemuser.SystemUser; import neatlogic.framework.crossover.CrossoverServiceFactory; import neatlogic.framework.form.dto.AttributeDataVo; @@ -289,9 +290,14 @@ public class CreateJobProcessComponent extends ProcessStepHandlerBase { return; } String assignExecUser = SystemUser.SYSTEM.getUserUuid(); - List stepUserVoList = processTaskCrossoverMapper.getProcessTaskStepUserByStepId(processTaskStepVo.getId(), ProcessUserType.MAJOR.getValue()); - if (CollectionUtils.isNotEmpty(stepUserVoList)) { - assignExecUser = stepUserVoList.get(0).getUserUuid(); + List processTaskStepWorkerList = processTaskCrossoverMapper.getProcessTaskStepWorkerByProcessTaskIdAndProcessTaskStepId(processTaskStepVo.getProcessTaskId(), processTaskStepVo.getId()); + if (CollectionUtils.isNotEmpty(processTaskStepWorkerList)) { + for (ProcessTaskStepWorkerVo processTaskStepWorkerVo : processTaskStepWorkerList) { + if (Objects.equals(processTaskStepWorkerVo.getUserType(), ProcessUserType.MAJOR.getValue()) && Objects.equals(processTaskStepWorkerVo.getType(), GroupSearch.USER.getValue())) { + assignExecUser = processTaskStepWorkerVo.getUuid(); + break; + } + } } JSONArray errorMessageList = new JSONArray(); boolean flag = false; -- Gitee