From 7deb6f3a8151b7338ac402e05e462938f8e26ca0 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期日, 28 一月 2024 15:18:46 +0800
Subject: [PATCH] 近义词管理,界面和接口完善
---
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 87 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 87 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..cc1ae87 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,91 @@
});
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);
+ if (Arrays.asList("codeclsfpath").contains(id)){
+ vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+ vo.setAttributeLength(500);
+ }else {
+ vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+ vo.setAttributeLength(255);
+ }
+ 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