From 02dbaaa04bc443e860a715cf907bc0fb5c1a7da4 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 11 七月 2023 09:09:34 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java index af80c13..87b7531 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java @@ -60,7 +60,7 @@ attributesDTOList.stream().forEachOrdered(s -> { attributeService.checkAttribute(s); btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now)); - attributeIdList.add(s.getId().toLowerCase().trim()); + attributeIdList.add(s.getId().trim()); }); //妫�鏌ュ睘鎬ф槸鍚﹂兘瀛樺湪 boolean exists = attributeService.checkAttributeExists(attributeIdList); @@ -107,7 +107,7 @@ attributesDTOList.stream().forEachOrdered(s -> { attributeService.checkAttribute(s); btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now)); - attributeIdList.add(s.getId().toLowerCase().trim()); + attributeIdList.add(s.getId().trim()); }); //妫�鏌ュ睘鎬ф槸鍚﹂兘瀛樺湪 boolean exists = attributeService.checkAttributeExists(attributeIdList); @@ -177,7 +177,7 @@ /** * 鑾峰彇榛樿瀛楁 - * + * 榛樿瀛楁鍧囦笉鍙负绌� * @param btmType 涓氬姟绫诲瀷 * @return 鎵ц缁撴灉 */ @@ -186,14 +186,13 @@ List<BtmTypeAttributeVO> list = new ArrayList<>(); // 涓氬姟绫诲瀷鐨勫熀鏈瓧娈� BtmTypeFieldConstant.BASIC_FIELD_MAP.forEach((id,name) -> { + id = id.toLowerCase(Locale.ROOT); BtmTypeAttributeVO vo = new BtmTypeAttributeVO(); vo.setId(id); vo.setName(name); vo.setPkBtmType(btmType.getOid()); - if (StringUtils.equals(id,"oid")){ + if ("oid".equals(id)){ vo.setNullableFlag(false); - }else { - vo.setNullableFlag(true); } if (Arrays.asList("createtime","lastmodifytime","owner").contains(id)){ vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name()); @@ -213,6 +212,8 @@ vo.setName(name); vo.setPkBtmType(btmType.getOid()); vo.setAttrDataType(VciFieldTypeEnum.VTString.name()); + // 鐗堟湰瑙勫垯瀛楁涓嶈兘涓虹┖ + vo.setNullableFlag(false); vo.setAttributeLength(150); if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq","revisionvalue","versionvalue").contains(id)){ vo.setAttributeLength(5); @@ -233,6 +234,7 @@ vo.setId(id); vo.setName(name); vo.setPkBtmType(btmType.getOid()); + vo.setNullableFlag(false); vo.setAttributeLength(50); vo.setAttrDataType(VciFieldTypeEnum.VTString.name()); list.add(vo); @@ -246,6 +248,7 @@ vo.setId(id); vo.setName(name); vo.setPkBtmType(btmType.getOid()); + vo.setNullableFlag(false); vo.setAttributeLength(5); vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name()); list.add(vo); -- Gitblit v1.9.3