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 24a181be8628b0ad40bc250d461af1f37f2dfefb..6ba19658f27a9c8dc7a1ea6524f138f0926379b8 100644 --- a/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java +++ b/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java @@ -222,8 +222,10 @@ public class CmdbSyncProcessComponent extends ProcessStepHandlerBase { if (id != null) { ciEntityTransactionVo.setCiEntityId(id); ciEntityTransactionVo.setAction(TransactionActionType.UPDATE.getValue()); + ciEntityTransactionVo.setEditMode(EditModeType.PARTIAL.getValue()); } else { ciEntityTransactionVo.setAction(TransactionActionType.INSERT.getValue()); + ciEntityTransactionVo.setEditMode(EditModeType.GLOBAL.getValue()); } Integer isStart = configObject.getIsStart(); if (Objects.equals(isStart, 1)) { @@ -1022,7 +1024,7 @@ public class CmdbSyncProcessComponent extends ProcessStepHandlerBase { if (!isFind) { search.setIdList(new ArrayList<>(downwardCiMap.keySet())); List ciEntityList = ciEntityMapper.getCiEntityListByCiIdListAndName(search); - if (CollectionUtils.isNotEmpty(ciEntityList)) { + if (CollectionUtils.isEmpty(ciEntityList)) { throw new AttrValueIrregularException(attrVo, valueStr); } for (CiEntityVo ciEntity : ciEntityList) { @@ -1033,7 +1035,7 @@ public class CmdbSyncProcessComponent extends ProcessStepHandlerBase { // ่™šๆ‹Ÿๆจกๅž‹ search.setCiId(ciVo.getId()); List ciEntityList = ciEntityMapper.getVirtualCiEntityBaseInfoByName(search); - if (CollectionUtils.isNotEmpty(ciEntityList)) { + if (CollectionUtils.isEmpty(ciEntityList)) { throw new AttrValueIrregularException(attrVo, valueStr); } for (CiEntityVo ciEntity : ciEntityList) {