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 b02cea1a74713d6f3c736b0bcdff17075821086a..f1b572d186eddaedeb31aee66b2e8492460e823a 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 65b9f0b354fb80aa8dfd5246ac73de746c119e28..a301c0c8a50dabadc8e76326267428b2f5a04396 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 293671177411898370d3cf14458075d87bd782dd..9a3c20c06e7cfb6bbe5d27433efcf39b64cceb32 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 21d16a97ab48f671fe9fb72f55e7450c552f800f..9b2ac31152b4adc3abb348c9d0158702a6076999 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)) {