From 59ba774556ef5458817fa234ac9aa90fcb276e46 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Fri, 5 Jan 2024 10:26:22 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-ITSM-?= =?UTF-8?q?CMDB=E5=90=8C=E6=AD=A5=E8=8A=82=E7=82=B9-=E8=B5=B7=E5=A7=8B?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=BA=E6=8A=BD=E8=B1=A1=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=85=B6=E5=AD=90=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E9=85=8D=E7=BD=AE=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1062110417616896]后端-ITSM-CMDB同步节点-起始模式为抽象模型时,增加其子模型配置入口 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1062110417616896 --- .../stephandler/CmdbSyncProcessComponent.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java b/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java index c5ddb6a3..13a86487 100644 --- a/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java +++ b/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java @@ -476,6 +476,22 @@ public class CmdbSyncProcessComponent extends ProcessStepHandlerBase { // 遍历configList,将“批量操作”的配置信息根据表单数据转换成多条“单个操作”配置信息 List ciEntitySyncConfigList = new ArrayList<>(); ciEntitySyncConfigList.add(startConfigObj); + List ciEntityUuidList = new ArrayList<>(); + JSONArray children = startConfigObj.getChildren(); + if (CollectionUtils.isNotEmpty(children)) { + for (int i = 0; i < children.size(); i++) { + JSONObject child = children.getJSONObject(i); + String ciEntityUuid = child.getString("ciEntityUuid"); + if (StringUtils.isNotBlank(ciEntityUuid)) { + ciEntityUuidList.add(ciEntityUuid); + } + } + } + for (CiEntitySyncConfigVo ciEntitySyncConfig : originalConfigList) { + if (ciEntityUuidList.contains(ciEntitySyncConfig.getUuid())) { + ciEntitySyncConfigList.add(ciEntitySyncConfig); + } + } handleBatchDataSource(originalConfigList, ciEntitySyncConfigList, formAttributeDataMap, newConfigList, formConfig); } return newConfigList; -- Gitee