From 0dc816db4d8e7b84376174bac88b83b00739ffbd Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 24 Oct 2025 16:27:56 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8C=96=E6=9C=8D=E5=8A=A1=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=89=8D=E7=BD=AE=E8=BF=87=E6=BB=A4=E5=99=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BF=AE=E6=94=B9=EF=BC=8C=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E6=98=AF=E5=8F=AA=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1539008889323520]后端-自动化服务目录管理前置过滤器支持修改,目前是只读 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1539008889323520 --- .../job/action/CreateAutoexecCombopJobApi.java | 18 +++++++++++++++++- .../process/dto/AutoexecJobBuilder.java | 12 ++++++++++++ .../service/AutoexecServiceServiceImpl.java | 4 ++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobApi.java b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobApi.java index c2046dbf..b02cea1a 100644 --- a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobApi.java @@ -23,6 +23,8 @@ import neatlogic.framework.autoexec.constvalue.CombopOperationType; import neatlogic.framework.autoexec.constvalue.JobSource; import neatlogic.framework.autoexec.constvalue.JobTriggerType; import neatlogic.framework.autoexec.dao.mapper.AutoexecCombopMapper; +import neatlogic.framework.autoexec.dto.combop.AutoexecCombopExecuteConfigVo; +import neatlogic.framework.autoexec.dto.combop.AutoexecCombopVersionConfigVo; import neatlogic.framework.autoexec.dto.combop.AutoexecCombopVersionVo; import neatlogic.framework.autoexec.dto.combop.AutoexecCombopVo; import neatlogic.framework.autoexec.dto.job.AutoexecJobVo; @@ -98,6 +100,13 @@ public class CreateAutoexecCombopJobApi extends PrivateApiComponentBase { if (autoexecCombopVersionVo == null) { throw new AutoexecCombopVersionNotFoundException(combopVersionId); } + AutoexecCombopVersionConfigVo versionVoConfig = autoexecCombopVersionVo.getConfig(); + if (versionVoConfig != null) { + AutoexecCombopExecuteConfigVo executeConfig = versionVoConfig.getExecuteConfig(); + if (executeConfig != null) { + jobVo.setPreCondition(executeConfig.getPreCondition()); + } + } jobVo.setCombopVersionId(combopVersionId); jobVo.setInvokeId(combopVersionId); jobVo.setRouteId(combopVersionId.toString()); @@ -107,8 +116,15 @@ public class CreateAutoexecCombopJobApi extends PrivateApiComponentBase { if (autoexecCombopVersionVo == null) { throw new AutoexecCombopActiveVersionNotFoundException(autoexecCombopVo.getName()); } + AutoexecCombopVersionConfigVo versionVoConfig = autoexecCombopVersionVo.getConfig(); + if (versionVoConfig != null) { + AutoexecCombopExecuteConfigVo executeConfig = versionVoConfig.getExecuteConfig(); + if (executeConfig != null) { + jobVo.setPreCondition(executeConfig.getPreCondition()); + } + } jobVo.setCombopVersionId(autoexecCombopVersionVo.getId()); - jobVo.setInvokeId(autoexecCombopVersionVo.getId());; + jobVo.setInvokeId(autoexecCombopVersionVo.getId()); jobVo.setRouteId(autoexecCombopVersionVo.getId().toString()); jobVo.setSource(JobSource.COMBOP.getValue()); } diff --git a/src/main/java/neatlogic/module/autoexec/process/dto/AutoexecJobBuilder.java b/src/main/java/neatlogic/module/autoexec/process/dto/AutoexecJobBuilder.java index d687aa43..29367117 100644 --- a/src/main/java/neatlogic/module/autoexec/process/dto/AutoexecJobBuilder.java +++ b/src/main/java/neatlogic/module/autoexec/process/dto/AutoexecJobBuilder.java @@ -37,6 +37,9 @@ public class AutoexecJobBuilder { @EntityField(name = "作业执行参数", type = ApiParamType.JSONOBJECT) private AutoexecCombopExecuteConfigVo executeConfig; + @EntityField(name = "前置执行目标配置", type = ApiParamType.JSONOBJECT) + private JSONObject preCondition; + @EntityField(name = "runner执行组", type = ApiParamType.JSONOBJECT) private ParamMappingVo runnerGroup; @@ -85,6 +88,14 @@ public class AutoexecJobBuilder { this.executeConfig = executeConfig; } + public JSONObject getPreCondition() { + return preCondition; + } + + public void setPreCondition(JSONObject preCondition) { + this.preCondition = preCondition; + } + public ParamMappingVo getRunnerGroup() { return runnerGroup; } @@ -152,6 +163,7 @@ public class AutoexecJobBuilder { jobVo.setRunnerGroupTag(runnerGroupTag); jobVo.setScenarioId(scenarioId); jobVo.setExecuteConfig(executeConfig); + jobVo.setPreCondition(preCondition); if (roundCount != null) { jobVo.setRoundCount(roundCount); } diff --git a/src/main/java/neatlogic/module/autoexec/service/AutoexecServiceServiceImpl.java b/src/main/java/neatlogic/module/autoexec/service/AutoexecServiceServiceImpl.java index 9dd7a5de..21d16a97 100644 --- a/src/main/java/neatlogic/module/autoexec/service/AutoexecServiceServiceImpl.java +++ b/src/main/java/neatlogic/module/autoexec/service/AutoexecServiceServiceImpl.java @@ -826,6 +826,7 @@ public class AutoexecServiceServiceImpl implements AutoexecServiceService { } } builder.setExecuteConfig(executeConfigVo); + builder.setPreCondition(config.getPreCondition()); AutoexecCombopVersionConfigVo versionConfigVo = autoexecCombopVersionVo.getConfig(); List lastRuntimeParamList = versionConfigVo.getRuntimeParamList(); JSONObject param = new JSONObject(); @@ -901,6 +902,9 @@ public class AutoexecServiceServiceImpl implements AutoexecServiceService { executeNodeConfig.setValue(executeConfig.getExecuteNodeConfig()); config.setExecuteNodeConfig(executeNodeConfig); } + if (config.getPreCondition() == null && executeConfig.getPreCondition() != null) { + config.setPreCondition(executeConfig.getPreCondition()); + } } else { config.setExecuteNodeConfig(null); } -- Gitee