From 696c68a9f7645bc35a9382a4e2271910b222f7b5 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 26 七月 2024 16:16:34 +0800
Subject: [PATCH] 状态池列表查询、查看应用范围接口上传

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBtmIOServiceImpl.java |   54 +++++++++++++++++++++++++++++++-----------------------
 1 files changed, 31 insertions(+), 23 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 b95a7d5..51c02df 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,5 @@
 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.corba.common.PLException;
 import com.vci.corba.omd.atm.AttributeDef;
 import com.vci.corba.omd.btm.BTMServicePrx;
@@ -15,6 +12,8 @@
 import com.vci.corba.omd.lcm.TransitionVOEvent;
 import com.vci.corba.omd.ltm.LinkType;
 import com.vci.corba.omd.stm.StatePool;
+import com.vci.dto.*;
+import com.vci.pagemodel.*;
 import com.vci.starter.poi.bo.WriteExcelData;
 import com.vci.starter.poi.bo.WriteExcelOption;
 import com.vci.starter.poi.util.ExcelUtil;
@@ -28,8 +27,6 @@
 import com.vci.starter.web.util.VciDateUtil;
 import com.vci.starter.word.bo.WordMergeStartTableDataBO;
 import com.vci.starter.word.util.WordUtil;
-import com.vci.web.dto.*;
-import com.vci.web.pageModel.*;
 import com.vci.web.properties.OsDDLExportWordFieldProperties;
 import com.vci.web.service.*;
 import com.vci.web.util.Func;
@@ -48,7 +45,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.*;
 
 
 /**
@@ -204,7 +201,7 @@
      * @param statusDTOList 瑕佸鍏ョ殑鐘舵�佺殑鏁版嵁浼犺緭瀵硅薄鍒楄〃
      * @throws VciBaseException 鏌ヨ鎴栬�呮墽琛屽嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父
      */
-    private void importStatus( Collection<OsStatusDTO> statusDTOList) throws VciBaseException{
+    private void importStatus( Collection<OsStatusDTO> statusDTOList) throws Exception {
         //瑕佸鍏ョ殑鐘舵�佺殑鎵�鏈夎嫳鏂囧悕绉�
         List<String> statusIdList = new ArrayList<String>();
         Iterator<OsStatusDTO> iterator = statusDTOList.iterator();
@@ -630,21 +627,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 +1123,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 +1147,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});
         }
@@ -1275,14 +1280,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