From 4aa91b3482aab3bedd1943e67fba1a865bd74c06 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 24 Oct 2025 17:42:34 +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 --- .../api/job/action/CreateAutoexecCombopJobApi.java | 2 ++ .../job/action/CreateAutoexecCombopJobPublicApi.java | 7 +++++++ .../autoexec/process/dto/AutoexecJobBuilder.java | 12 ++++++++++++ .../autoexec/service/AutoexecServiceServiceImpl.java | 4 ++++ 4 files changed, 25 insertions(+) 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 b02cea1a..f1b572d1 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 @@ -105,6 +105,7 @@ public class CreateAutoexecCombopJobApi extends PrivateApiComponentBase { AutoexecCombopExecuteConfigVo executeConfig = versionVoConfig.getExecuteConfig(); if (executeConfig != null) { jobVo.setPreCondition(executeConfig.getPreCondition()); + jobVo.setWhenToSpecify(executeConfig.getWhenToSpecify()); } } jobVo.setCombopVersionId(combopVersionId); @@ -121,6 +122,7 @@ public class CreateAutoexecCombopJobApi extends PrivateApiComponentBase { AutoexecCombopExecuteConfigVo executeConfig = versionVoConfig.getExecuteConfig(); if (executeConfig != null) { jobVo.setPreCondition(executeConfig.getPreCondition()); + jobVo.setWhenToSpecify(executeConfig.getWhenToSpecify()); } } jobVo.setCombopVersionId(autoexecCombopVersionVo.getId()); diff --git a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java index 65b9f0b3..a301c0c8 100644 --- a/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/job/action/CreateAutoexecCombopJobPublicApi.java @@ -190,6 +190,13 @@ public class CreateAutoexecCombopJobPublicApi extends PrivateApiComponentBase { } executeConfigVo.setProtocolId(accountProtocolVo.getId()); } + if (versionConfig != null) { + AutoexecCombopExecuteConfigVo executeConfig = versionConfig.getExecuteConfig(); + if (executeConfig != null) { + autoexecJobParam.setPreCondition(executeConfig.getPreCondition()); + autoexecJobParam.setWhenToSpecify(executeConfig.getWhenToSpecify()); + } + } autoexecJobActionService.validateAndCreateJobFromCombop(autoexecJobParam); autoexecJobActionService.settingJobFireMode(autoexecJobParam); JSONObject result = new JSONObject(); 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 29367117..9a3c20c0 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.STRING) + private String whenToSpecify; + @EntityField(name = "前置执行目标配置", type = ApiParamType.JSONOBJECT) private JSONObject preCondition; @@ -88,6 +91,14 @@ public class AutoexecJobBuilder { this.executeConfig = executeConfig; } + public String getWhenToSpecify() { + return whenToSpecify; + } + + public void setWhenToSpecify(String whenToSpecify) { + this.whenToSpecify = whenToSpecify; + } + public JSONObject getPreCondition() { return preCondition; } @@ -163,6 +174,7 @@ public class AutoexecJobBuilder { jobVo.setRunnerGroupTag(runnerGroupTag); jobVo.setScenarioId(scenarioId); jobVo.setExecuteConfig(executeConfig); + jobVo.setWhenToSpecify(whenToSpecify); 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 21d16a97..9b2ac311 100644 --- a/src/main/java/neatlogic/module/autoexec/service/AutoexecServiceServiceImpl.java +++ b/src/main/java/neatlogic/module/autoexec/service/AutoexecServiceServiceImpl.java @@ -828,6 +828,10 @@ public class AutoexecServiceServiceImpl implements AutoexecServiceService { builder.setExecuteConfig(executeConfigVo); builder.setPreCondition(config.getPreCondition()); AutoexecCombopVersionConfigVo versionConfigVo = autoexecCombopVersionVo.getConfig(); + AutoexecCombopExecuteConfigVo executeConfig = versionConfigVo.getExecuteConfig(); + if (executeConfig != null) { + builder.setWhenToSpecify(executeConfig.getWhenToSpecify()); + } List lastRuntimeParamList = versionConfigVo.getRuntimeParamList(); JSONObject param = new JSONObject(); if (CollectionUtils.isNotEmpty(lastRuntimeParamList)) { -- Gitee