From 63f70f30e62e06ad00bf28f08262cb3d326ff098 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 26 一月 2024 16:03:25 +0800
Subject: [PATCH] 业务类型界面所需添加

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java |   81 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
index a01d7d4..d984f0a 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
@@ -969,4 +969,85 @@
 		});
 		return total[0];
 	}
+
+	/**
+	 * 鑾峰彇榛樿灞炴��
+	 * @param defaultAttrType
+	 * @return
+	 */
+	@Override
+	public List<BtmTypeAttributeVO> getDefaultAttr(String defaultAttrType) {
+		List<BtmTypeAttributeVO> list = new ArrayList<>();
+		// 涓氬姟绫诲瀷鐨勯粯璁ゅ熀鏈瓧娈�
+		if(defaultAttrType.equals("defaultAttr")){
+			BtmTypeFieldConstant.BASIC_FIELD_MAP.forEach((id,name) -> {
+				id = id.toLowerCase(Locale.ROOT);
+				BtmTypeAttributeVO vo = new BtmTypeAttributeVO();
+				vo.setId(id);
+				vo.setName(name);
+				vo.setIseDfaultAttr(true);
+				if ("oid".equals(id)){
+					vo.setNullableFlag(false);
+				}
+				if (Arrays.asList("createtime","lastmodifytime","ts").contains(id)){
+					vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name());
+					vo.setAttributeLength(6);
+				}else {
+					vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+					vo.setAttributeLength(150);
+				}
+				list.add(vo);
+			});
+
+			BtmTypeFieldConstant.MASTERDATA_FIELD_MAP.forEach((id,name) -> {
+				id = id.toLowerCase(Locale.ROOT);
+				BtmTypeAttributeVO vo = new BtmTypeAttributeVO();
+				vo.setId(id);
+				vo.setName(name);
+				vo.setIseDfaultAttr(false);
+				vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+				vo.setAttributeLength(150);
+				list.add(vo);
+			});
+		}
+
+		// 鐗堟湰瑙勫垯瀛楁
+		if (defaultAttrType.equals("reVersionRule")){
+			BtmTypeFieldConstant.REVISION_MANAGE_FIELD_MAP.forEach((id,name) -> {
+				BtmTypeAttributeVO vo = new BtmTypeAttributeVO();
+				vo.setId(id);
+				vo.setName(name);
+				vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+				// 鐗堟湰瑙勫垯瀛楁涓嶈兘涓虹┖
+//				vo.setNullableFlag(false);
+				vo.setAttributeLength(150);
+				vo.setIseDfaultAttr(true);
+				if (Arrays.asList("revisionseq","versionseq").contains(id)){
+					vo.setAttributeLength(5);
+					vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name());
+				}
+				if (Arrays.asList("checkintime","checkouttime").contains(id)){
+					vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name());
+					vo.setAttributeLength(6);
+				}
+				list.add(vo);
+			});
+		}
+
+		// 鐢熷懡鍛ㄦ湡瀛楁
+		if (defaultAttrType.equals("lifeCycle")){
+			BtmTypeFieldConstant.LIFECYCLE_MANAGE_FIELD_MAP.forEach((id,name) -> {
+				BtmTypeAttributeVO vo = new BtmTypeAttributeVO();
+				vo.setId(id);
+				vo.setName(name);
+//				vo.setNullableFlag(false);
+				vo.setIseDfaultAttr(true);
+				vo.setAttributeLength(50);
+				vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+				list.add(vo);
+			});
+		}
+
+		return list;
+	}
 }

--
Gitblit v1.9.3