diff --git a/src/main/java/neatlogic/module/cmdb/api/ci/process/GetCiForProcessMappingApi.java b/src/main/java/neatlogic/module/cmdb/api/ci/process/GetCiForProcessMappingApi.java index 5d1a7cc5de4ea9589e6a20d10b2a5f663ecda82b..913a1b7dbdff005800b4d7ea362acb21aa358f9c 100644 --- a/src/main/java/neatlogic/module/cmdb/api/ci/process/GetCiForProcessMappingApi.java +++ b/src/main/java/neatlogic/module/cmdb/api/ci/process/GetCiForProcessMappingApi.java @@ -90,10 +90,13 @@ public class GetCiForProcessMappingApi extends PrivateApiComponentBase { // 属性 List attrList = attrMapper.getAttrByCiId(ciId); for (AttrVo attrVo : attrList) { - if (uniqueAttrIdList.contains(attrVo.getId()) && Objects.equals(attrVo.getType(), "expression")) { - attrVo.setCiLabel(ciVo.getLabel()); - attrVo.setCiName(ciVo.getName()); - throw new CiUniqueRuleAttrTypeIrregularException(attrVo); + if (uniqueAttrIdList.contains(attrVo.getId())) { + if (Objects.equals(attrVo.getType(), "expression")) { + attrVo.setCiLabel(ciVo.getLabel()); + attrVo.setCiName(ciVo.getName()); + throw new CiUniqueRuleAttrTypeIrregularException(attrVo); + } + attrVo.setIsRequired(1); } } for (int i = attrList.size() - 1; i >= 0; i--) {