From 4b42ec4cf0fd085752b563b146aed696098b3d3a Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 03 七月 2023 19:13:17 +0800
Subject: [PATCH] 修改referDataGrid方法

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 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..bdeebe9 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
@@ -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