From 058bc19147ac02fa321d367c06d8b2dd83c45c3e Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Wed, 24 Jan 2024 10:19:36 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E6=B5=81=E7=A8=8Bcmdb?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E9=85=8D=E7=BD=AE=E6=97=B6=E5=94=AF=E4=B8=80?= =?UTF-8?q?=E8=A7=84=E5=88=99=E5=B1=9E=E6=80=A7=E6=B2=A1=E6=9C=89=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=AE=BE=E7=BD=AE=E4=B8=BA=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1075878304382976]流程cmdb节点配置时唯一规则属性没有自动设置为必填 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1075878304382976 --- .../api/ci/process/GetCiForProcessMappingApi.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 5d1a7cc5..913a1b7d 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--) { -- Gitee