From 7b49610996d952ce0c2a5fd2ea1b888693aed496 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Thu, 4 Jan 2024 17:55:09 +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-=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E6=98=A0=E5=B0=84=E5=AD=90=E6=A8=A1=E5=9E=8B=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1059939512975360]后端-ITSM-CMDB同步节点-关系映射子模型处理 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1059939512975360 --- .../cmdb/process/stephandler/CmdbSyncProcessComponent.java | 4 ++++ 1 file changed, 4 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 9f51ddd3..c5ddb6a3 100644 --- a/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java +++ b/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java @@ -33,6 +33,7 @@ import neatlogic.framework.cmdb.dto.globalattr.GlobalAttrVo; import neatlogic.framework.cmdb.dto.transaction.AttrEntityTransactionVo; import neatlogic.framework.cmdb.dto.transaction.CiEntityTransactionVo; import neatlogic.framework.cmdb.enums.*; +import neatlogic.framework.cmdb.exception.attr.AttrNotFoundException; import neatlogic.framework.cmdb.exception.attr.AttrValueIrregularException; import neatlogic.framework.cmdb.exception.attrtype.AttrTypeNotFoundException; import neatlogic.framework.cmdb.exception.ci.*; @@ -616,6 +617,9 @@ public class CmdbSyncProcessComponent extends ProcessStepHandlerBase { } if (CollectionUtils.isEmpty(valueList)) { AttrVo attr = attrMapper.getAttrById(attrId); + if (attr == null) { + throw new AttrNotFoundException(ciVo.getName(), attrId.toString()); + } attr.setCiName(ciVo.getName()); attr.setCiLabel(ciVo.getLabel()); throw new CiUniqueAttrNotFoundException(attr); -- Gitee