From 8a857fe1b0b69dafbdaa15b45edab03a2c3bcdb2 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 09 七月 2024 09:52:47 +0800
Subject: [PATCH] 成员管理表格查询 增删改 分配成员 统计 下载导入模板

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java |   57 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
index 1d5153f..74c8dd5 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java
@@ -1,8 +1,6 @@
 package com.vci.web.service.impl;
 
-import com.vci.client.omd.linktype.util.Tool;
-import com.vci.client.omd.provider.BtmProvider;
-import com.vci.client.omd.provider.LinkTypeProvider;
+import com.vci.client.common.providers.WebServiceProvider;
 import com.vci.corba.common.PLException;
 import com.vci.corba.omd.atm.AttributeDef;
 import com.vci.corba.omd.btm.BTMServicePrx;
@@ -48,7 +46,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
-import static com.vci.client.omd.attribpool.ui.VTDataTypePanel.*;
+import static com.vci.omd.constants.AttributeConstants.*;
 
 
 /**
@@ -259,7 +257,7 @@
         List<LifeCycle> unExistLifeCycleList = new ArrayList<LifeCycle>();
         List<LifeCycle> editLifeCycleList = new ArrayList<LifeCycle>();
         String userId = WebUtil.getCurrentUserId();
-        long now = VciDateUtil.getTime(VciDateUtil.getNow());
+        long now = VciDateUtil.getNowTime();
         //寰幆鍒嗘瀽闇�瑕佹坊鍔犺繕鏄慨鏀�
         for(OsLifeCycleDTO lifeCycleDTO : lifeCycleDTOList){
             String lifeCycleId = lifeCycleDTO.getId().toLowerCase().trim();
@@ -378,7 +376,7 @@
         List<AttributeDef> unExistAttrList = new ArrayList<AttributeDef>();
         List<AttributeDef> editAttrList = new ArrayList<AttributeDef>();
         String userId = WebUtil.getCurrentUserId();
-        long now = VciDateUtil.getTime(VciDateUtil.getNow());
+        long now = VciDateUtil.getNowTime();
         //寰幆鍒嗘瀽闇�瑕佹坊鍔犺繕鏄慨鏀�
         for (OsAttributeDTO attributeDTO : attributeDTOList) {
             String attrId = attributeDTO.getId().toLowerCase().trim();
@@ -578,7 +576,7 @@
         List<BizType> unExistBtmList = new ArrayList<BizType>();
         List<BizType> editBtmList = new ArrayList<BizType>();
         String userId = WebUtil.getCurrentUserId();
-        long now = VciDateUtil.getTime(VciDateUtil.getNow());
+        long now = VciDateUtil.getNowTime();
 
         for (OsBtmTypeDTO btmTypeDTO : btmTypeDTOList) {
             String btmId = btmTypeDTO.getId().toLowerCase().trim();
@@ -630,21 +628,25 @@
                     btmService.addBizType(btmItem);
                     //鎵ц瀹屾垚浜嗛渶瑕佸垱寤鸿〃
                     //鑾峰彇鐨勬椂鍊欎笉涓�瀹氬埛鏂颁簡缂撳瓨锛岃繖鏍峰氨鑾峰彇涓嶅埌淇℃伅
-                    String btmTableName = BtmProvider.getInstance().getBTTableName(btmItem.name);
+                    //OmdHelper
+                    //todo 姝ゅ崰鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//                    String btmTableName = BtmProvider.getInstance().getBTTableName(btmItem.name);
+                    String btmTableName = null;
                     String sql = "create Table " + btmTableName + "(" + "\n\tOID VARCHAR2(36) not null,\n\tREVISIONOID VARCHAR2(36),\n\tNAMEOID VARCHAR2(36),\n\tBtmName VARCHAR2(36),\n\tISLastR CHAR(1),\n\tISFirstR CHAR(1),\n\tISLastV CHAR(1),\n\tISFirstV CHAR(1),\n\tCreator VARCHAR2(36),\n\tCreateTime TIMESTAMP,\n\tLastModifier VARCHAR2(36),\n\tLastModifyTime TIMESTAMP,\n\tRevisionRule VARCHAR2(36),\n\tVersionRule VARCHAR2(36),\n\tRevisionSeq NUMBER,\n\tRevisionValue VARCHAR2(10),\n\tVersionSeq NUMBER,\n\tVersionValue VARCHAR2(10),\n\tLCTID VARCHAR2(36),\n\tLCStatus VARCHAR2(36),\n\tTS TIMESTAMP,\n\tID VARCHAR2(36),\n\tNAME VARCHAR2(128),\n\tDESCRIPTION VARCHAR2(255),\n\tOWNER VARCHAR2(36),\n\tCHECKINBY VARCHAR2(36),\n\tCHECKINTIME TIMESTAMP,\n\tCHECKOUTBY VARCHAR2(36),\n\tCHECKOUTTIME TIMESTAMP,\n\tCOPYFROMVERSION VARCHAR2(36),\n\t";
                     String[] apNameArray = btmItem.apNameArray;
                     if(apNameArray!=null && apNameArray.length>0){
                         for(String attrId : apNameArray){
                             OsAttributeVO attrVO = attributeMap.get(attrId.toLowerCase().trim());
                             if(attrVO!=null) {
-                                String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
-                                sql = sql + abSql;
+                                //todo 姝ゅ崰鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//                                String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
+//                                sql = sql + abSql;
                             }else{
                                 logger.info("涓氬姟绫诲瀷{}閲岀殑灞炴�}娌℃壘鍒�",btmTableName,attrId.toLowerCase().trim());
                             }
                         }
                     }
-                    String alterSql = BtmProvider.getInstance().getAddPKSql(btmItem.name);
+//                    String alterSql = BtmProvider.getInstance().getAddPKSql(btmItem.name);
                     sql = sql.substring(0, sql.lastIndexOf(","));
                     sql = sql + "\n)";
                     //TODO 鏆傛椂涓嶆竻妤氱敤浣曠鏂瑰紡鍒涘缓琛紝姝ゅ鍏堟敞閲婃帀
@@ -1122,12 +1124,15 @@
      */
     private void addAttrToDB(Collection<String> addedAbList,String btmType,boolean linkType){
         if (!CollectionUtils.isEmpty(addedAbList)) {
-            String tableName = linkType? LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
+            //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//            String tableName = linkType? LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
+            String tableName = null;
             String addSql = "alter table " + tableName + " add(";
             Map<String, OsAttributeVO> attributeMap = attrService.selectAllAttributeMap();
             for (String abName : addedAbList) {
                 AttributeDef abItem = attrService.attributeVO2DO(attributeMap.get(abName));
-                addSql = addSql + Tool.getInstance().getAbSql(abItem);
+                //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//                addSql = addSql + Tool.getInstance().getAbSql(abItem);
             }
             addSql = VciBaseUtil.removeComma(addSql.replace("\n\t",""));
             addSql = addSql + ")";
@@ -1143,13 +1148,14 @@
      */
     private void removeAttrToDB(Collection<String> removeAbList,String btmType,boolean linkType){
         if (!CollectionUtils.isEmpty(removeAbList)) {
-            String tableName = linkType?LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
-            String removeSql = "alter table " + tableName + " drop(";
-            for (String abName : removeAbList) {
-                removeSql = removeSql + abName + ",";
-            }
-            removeSql = VciBaseUtil.removeComma(removeSql.replace("\n\t",""));
-            removeSql = removeSql + ")";
+            //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//            String tableName = linkType?LinkTypeProvider.getInstance().getLTTableName(btmType):BtmProvider.getInstance().getBTTableName(btmType);
+//            String removeSql = "alter table " + tableName + " drop(";
+//            for (String abName : removeAbList) {
+//                removeSql = removeSql + abName + ",";
+//            }
+//            removeSql = VciBaseUtil.removeComma(removeSql.replace("\n\t",""));
+//            removeSql = removeSql + ")";
             //TODO 涓嶆竻妤氬叿浣撲娇鐢ㄤ粈涔堟柟娉曪紝鏆傛椂娉ㄩ噴锛屼絾涓嶈鍒犻櫎
 //            DDLToolClient.getService().batchExecuteUpdateOracle(new String[]{removeSql});
         }
@@ -1210,7 +1216,7 @@
         List<LinkType> addLinkTypeList = new ArrayList<LinkType>();
         List<LinkType> editLinkTypeList = new ArrayList<LinkType>();
         String userId = WebUtil.getCurrentUserId();
-        long now = VciDateUtil.getTime(VciDateUtil.getNow());
+        long now = VciDateUtil.getNowTime();
         for(OsLinkTypeDTO linkTypeDTO : linkTypeDTOS){
             String linkId = linkTypeDTO.getId().toLowerCase().trim();
             LinkType linkType = null;
@@ -1275,14 +1281,17 @@
             for(LinkType linkType : linkTypes){
                 try{
                     platformClientUtil.getLinkTypeService().addLinkType(linkType);
-                    String tableName = LinkTypeProvider.getInstance().getLTTableName(linkType.name);
+                    //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//                    String tableName = LinkTypeProvider.getInstance().getLTTableName(linkType.name);
+                    String tableName = null;
                     String sql = "create table " + tableName + "(" + "\n\tOID VARCHAR2(36) not null,\n\tCreator VARCHAR2(36),\n\tCreateTime TIMESTAMP,\n\tLastModifier VARCHAR2(36),\n\tLastModifyTime TIMESTAMP,\n\tTS TIMESTAMP,\n\t";
                     String[] apNameArray = linkType.attributes;
                     if(apNameArray!=null && apNameArray.length>0){
                         for(String attrId : apNameArray){
                             OsAttributeVO attrVO = attributeMap.get(attrId.toLowerCase().trim());
-                            String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
-                            sql = sql + abSql;
+                            //todo 姝ゆ殏鏃犳硶寮曠敤锛屽悗缁細杩涜璋冩暣锛屽啀杩涜寮曠敤
+//                            String abSql = Tool.getInstance().getAbSql(attrService.attributeVO2DO(attrVO));
+//                            sql = sql + abSql;
                         }
                     }
                     sql = sql.substring(0, sql.lastIndexOf(","));

--
Gitblit v1.9.3