From 5176699e01aa3b9f8f4dc18f08793896f4ddd29c Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期一, 03 七月 2023 14:10:06 +0800
Subject: [PATCH] 修正业务类型默认字段的null的属性;修正DDL的建表语句生成;

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java |   13 +++++++------
 1 files changed, 7 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..a778063 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,15 +186,12 @@
 		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")){
-				vo.setNullableFlag(false);
-			}else {
-				vo.setNullableFlag(true);
-			}
+			vo.setNullableFlag(false);
 			if (Arrays.asList("createtime","lastmodifytime","owner").contains(id)){
 				vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name());
 				vo.setAttributeLength(6);
@@ -213,6 +210,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 +232,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 +246,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