From 1a458be9b010bf4fbb7fa1fa699f6ddf5996eaea Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Wed, 3 Sep 2025 19:49:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5=E7=BB=84?= =?UTF-8?q?=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D=E9=83=BD?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E2=80=9D=20#[1500817822023680]=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E7=BB=84=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D?= =?UTF-8?q?=E9=83=BD=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E2=80=9D=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/story-detail/939050947543040/939050947543042/15?= =?UTF-8?q?00817822023680?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/combop/AutoexecCombopExecuteConfigVo.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java b/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java index 22d84aa2..0aed2580 100644 --- a/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java +++ b/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java @@ -16,6 +16,7 @@ along with this program. If not, see .*/ package neatlogic.framework.autoexec.dto.combop; import neatlogic.framework.autoexec.dto.node.AutoexecNodeVo; +import neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo; import neatlogic.framework.common.constvalue.ApiParamType; import neatlogic.framework.restful.annotation.EntityField; @@ -57,7 +58,8 @@ public class AutoexecCombopExecuteConfigVo implements Serializable { @EntityField(name = "并发策略", type = ApiParamType.STRING) private String parallelPolicy; @EntityField(name = "前置执行目标配置", type = ApiParamType.JSONOBJECT) - private AutoexecCombopExecuteNodeConfigVo combopNodeConfig; //设置过滤器后,执行时只能在过滤器范围内选择执行目标 + private ResourceSearchVo preCondition; //设置过滤器后,执行时只能在过滤器范围内选择执行目标 + public String getProtocol() { return protocol; @@ -139,12 +141,12 @@ public class AutoexecCombopExecuteConfigVo implements Serializable { this.roundCount = roundCount; } - public AutoexecCombopExecuteNodeConfigVo getCombopNodeConfig() { - return combopNodeConfig; + public ResourceSearchVo getPreCondition() { + return preCondition; } - public void setCombopNodeConfig(AutoexecCombopExecuteNodeConfigVo combopNodeConfig) { - this.combopNodeConfig = combopNodeConfig; + public void setPreCondition(ResourceSearchVo preCondition) { + this.preCondition = preCondition; } public ParamMappingVo getRunnerGroup() { -- Gitee From fb80ed9c5bc9e0697a4d7d57a16a1ea5a1bd25c5 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Thu, 4 Sep 2025 12:12:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5=E7=BB=84?= =?UTF-8?q?=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D=E9=83=BD?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E2=80=9D=20#[1500817822023680]=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E7=BB=84=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D?= =?UTF-8?q?=E9=83=BD=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E2=80=9D=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/story-detail/939050947543040/939050947543042/15?= =?UTF-8?q?00817822023680?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/autoexec/job/node/IUpdateNodes.java | 6 +++--- .../framework/autoexec/job/node/UpdateNodesFactory.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/neatlogic/framework/autoexec/job/node/IUpdateNodes.java b/src/main/java/neatlogic/framework/autoexec/job/node/IUpdateNodes.java index 1f01a9e9..137fe166 100644 --- a/src/main/java/neatlogic/framework/autoexec/job/node/IUpdateNodes.java +++ b/src/main/java/neatlogic/framework/autoexec/job/node/IUpdateNodes.java @@ -15,18 +15,18 @@ along with this program. If not, see .*/ package neatlogic.framework.autoexec.job.node; -import neatlogic.framework.autoexec.dto.combop.AutoexecCombopExecuteNodeConfigVo; +import neatlogic.framework.autoexec.dto.combop.AutoexecCombopExecuteConfigVo; import neatlogic.framework.autoexec.dto.job.AutoexecJobVo; public interface IUpdateNodes { /** * 更新自动化执行目标 - * @param executeNodeConfigVo 执行目标配置 + * @param executeConfigVo 执行目标配置 * @param jobVo 作业 * @param userName 执行用户 * @param protocolId 协议id */ - boolean update(AutoexecCombopExecuteNodeConfigVo executeNodeConfigVo, AutoexecJobVo jobVo, String userName, Long protocolId); + boolean update(AutoexecCombopExecuteConfigVo executeConfigVo, AutoexecJobVo jobVo, String userName, Long protocolId); } diff --git a/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java b/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java index 6d7c993f..8919abb3 100644 --- a/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java +++ b/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java @@ -16,7 +16,7 @@ along with this program. If not, see .*/ package neatlogic.framework.autoexec.job.node; import neatlogic.framework.applicationlistener.core.ModuleInitializedListenerBase; -import neatlogic.framework.autoexec.dto.combop.AutoexecCombopExecuteNodeConfigVo; +import neatlogic.framework.autoexec.dto.combop.AutoexecCombopExecuteConfigVo; import neatlogic.framework.autoexec.dto.job.AutoexecJobVo; import neatlogic.framework.bootstrap.NeatLogicWebApplicationContext; import neatlogic.framework.common.RootComponent; @@ -51,14 +51,14 @@ public class UpdateNodesFactory extends ModuleInitializedListenerBase { /** * 遍历所有获取目标的方式,获取到就退出 * @param jobVo 作业 - * @param executeNodeConfigVo 执行目标配置 + * @param executeConfigVo 执行目标配置 * @param userName 执行用户 * @param protocolId 协议id */ - public static boolean updateNodes(AutoexecCombopExecuteNodeConfigVo executeNodeConfigVo, AutoexecJobVo jobVo,String userName,Long protocolId){ + public static boolean updateNodes(AutoexecCombopExecuteConfigVo executeConfigVo, AutoexecJobVo jobVo, String userName, Long protocolId){ boolean isHasNode = false; for (IUpdateNodes updateNode : updateNodeList){ - isHasNode = updateNode.update(executeNodeConfigVo,jobVo,userName,protocolId); + isHasNode = updateNode.update(executeConfigVo,jobVo,userName,protocolId); if(isHasNode){ break; } -- Gitee From f1795979a87b831e89e2957d0332b115a2d72aa0 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Thu, 4 Sep 2025 16:05:35 +0800 Subject: [PATCH 3/5] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5=E7=BB=84?= =?UTF-8?q?=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D=E9=83=BD?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E2=80=9D=20#[1500817822023680]=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E7=BB=84=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D?= =?UTF-8?q?=E9=83=BD=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E2=80=9D=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/story-detail/939050947543040/939050947543042/15?= =?UTF-8?q?00817822023680?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/combop/AutoexecCombopExecuteConfigVo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java b/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java index 0aed2580..c8711a51 100644 --- a/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java +++ b/src/main/java/neatlogic/framework/autoexec/dto/combop/AutoexecCombopExecuteConfigVo.java @@ -15,8 +15,8 @@ along with this program. If not, see .*/ package neatlogic.framework.autoexec.dto.combop; +import com.alibaba.fastjson.JSONObject; import neatlogic.framework.autoexec.dto.node.AutoexecNodeVo; -import neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo; import neatlogic.framework.common.constvalue.ApiParamType; import neatlogic.framework.restful.annotation.EntityField; @@ -58,7 +58,7 @@ public class AutoexecCombopExecuteConfigVo implements Serializable { @EntityField(name = "并发策略", type = ApiParamType.STRING) private String parallelPolicy; @EntityField(name = "前置执行目标配置", type = ApiParamType.JSONOBJECT) - private ResourceSearchVo preCondition; //设置过滤器后,执行时只能在过滤器范围内选择执行目标 + private JSONObject preCondition; //设置过滤器后,执行时只能在过滤器范围内选择执行目标 public String getProtocol() { @@ -141,11 +141,11 @@ public class AutoexecCombopExecuteConfigVo implements Serializable { this.roundCount = roundCount; } - public ResourceSearchVo getPreCondition() { + public JSONObject getPreCondition() { return preCondition; } - public void setPreCondition(ResourceSearchVo preCondition) { + public void setPreCondition(JSONObject preCondition) { this.preCondition = preCondition; } -- Gitee From b09b48693aadc7fba60a413bdd6563f5f99ddd02 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Fri, 5 Sep 2025 17:29:43 +0800 Subject: [PATCH 4/5] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5=E7=BB=84?= =?UTF-8?q?=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D=E9=83=BD?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E2=80=9D=20#[1500817822023680]=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E7=BB=84=E5=90=88=E5=B7=A5=E5=85=B7=E2=80=9C?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E2=80=9C=E3=80=81=E2=80=9C=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E7=BB=84=E2=80=9D=E5=92=8C=E2=80=9C=E9=98=B6=E6=AE=B5=E2=80=9D?= =?UTF-8?q?=E9=83=BD=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E6=94=AF=E6=8C=81=E2=80=9C=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E2=80=9D=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/story-detail/939050947543040/939050947543042/15?= =?UTF-8?q?00817822023680?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autoexec/job/node/UpdateNodesFactory.java | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java b/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java index 8919abb3..e89e31fe 100644 --- a/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java +++ b/src/main/java/neatlogic/framework/autoexec/job/node/UpdateNodesFactory.java @@ -16,11 +16,13 @@ along with this program. If not, see .*/ package neatlogic.framework.autoexec.job.node; import neatlogic.framework.applicationlistener.core.ModuleInitializedListenerBase; +import neatlogic.framework.autoexec.dto.combop.AutoexecCombopConfigVo; import neatlogic.framework.autoexec.dto.combop.AutoexecCombopExecuteConfigVo; import neatlogic.framework.autoexec.dto.job.AutoexecJobVo; import neatlogic.framework.bootstrap.NeatLogicWebApplicationContext; import neatlogic.framework.common.RootComponent; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; import java.util.ArrayList; import java.util.List; @@ -38,7 +40,7 @@ public class UpdateNodesFactory extends ModuleInitializedListenerBase { if (beansOfTypeMap.size() == 0) { return; } - if(CollectionUtils.isNotEmpty(beansOfTypeMap.values())) { + if (CollectionUtils.isNotEmpty(beansOfTypeMap.values())) { updateNodeList.addAll(beansOfTypeMap.values()); } } @@ -50,16 +52,28 @@ public class UpdateNodesFactory extends ModuleInitializedListenerBase { /** * 遍历所有获取目标的方式,获取到就退出 - * @param jobVo 作业 + * + * @param jobVo 作业 * @param executeConfigVo 执行目标配置 - * @param userName 执行用户 - * @param protocolId 协议id + * @param userName 执行用户 + * @param protocolId 协议id */ - public static boolean updateNodes(AutoexecCombopExecuteConfigVo executeConfigVo, AutoexecJobVo jobVo, String userName, Long protocolId){ + public static boolean updateNodes(AutoexecCombopExecuteConfigVo executeConfigVo, AutoexecJobVo jobVo, String userName, Long protocolId) { boolean isHasNode = false; - for (IUpdateNodes updateNode : updateNodeList){ - isHasNode = updateNode.update(executeConfigVo,jobVo,userName,protocolId); - if(isHasNode){ + for (IUpdateNodes updateNode : updateNodeList) { + AutoexecCombopConfigVo config = jobVo.getConfig(); + //如果局部不存在前置过滤器,则使用全局的 + if (executeConfigVo == null || executeConfigVo.getExecuteNodeConfig() == null) { + return false; + } else { + if (MapUtils.isEmpty(executeConfigVo.getPreCondition()) && config != null && config.getExecuteConfig() != null + && MapUtils.isNotEmpty(config.getExecuteConfig().getPreCondition()) + ) { + executeConfigVo.setPreCondition(config.getExecuteConfig().getPreCondition()); + } + } + isHasNode = updateNode.update(executeConfigVo, jobVo, userName, protocolId); + if (isHasNode) { break; } } -- Gitee From 9267c9c9d5491546ba77900df114fcf82e377e45 Mon Sep 17 00:00:00 2001 From: lvzk <897706680@qq.com> Date: Wed, 24 Sep 2025 10:16:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=A6=82=E6=9E=9C=E4=BD=9C=E4=B8=9A=E5=B9=B6?= =?UTF-8?q?=E5=8F=91=E7=AD=96=E7=95=A5=E6=98=AF=E5=B9=B6=E5=8F=91=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=EF=BC=8C=E6=8A=A5=E5=B9=B6=E5=8F=91=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/autoexec/dao/mapper/AutoexecJobMapper.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecJobMapper.xml b/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecJobMapper.xml index 2960d54a..c0ab3370 100644 --- a/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecJobMapper.xml +++ b/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecJobMapper.xml @@ -750,6 +750,8 @@ along with this program. If not, see .--> aj.`exec_user` as execUser, aj.`source`, aj.`round_count` as roundCount, + aj.`parallel_count` as parallelCount, + aj.`parallel_policy` as parallelPolicy, aj.`param_hash` as paramHash, aj.`config_hash` as configHash, aj.`trigger_type` as triggerType -- Gitee