From d2570148ec3884de3af721bd99c4b7acbbdee075 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 09 五月 2023 17:07:26 +0800
Subject: [PATCH] 前端代码提交

---
 Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java |  249 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 249 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
new file mode 100644
index 0000000..ca66ffc
--- /dev/null
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
@@ -0,0 +1,249 @@
+package com.vci.ubcs.ddl.service;
+
+import com.vci.ubcs.ddl.bo.DdlTableBO;
+import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO;
+import com.vci.ubcs.omd.dto.BtmTypeDTO;
+import com.vci.ubcs.omd.entity.ModifyAttributeInfo;
+import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
+import com.vci.ubcs.omd.vo.BtmTypeVO;
+import com.vci.ubcs.omd.vo.LinkTypeAttributeVO;
+import com.vci.ubcs.omd.vo.LinkTypeVO;
+import com.vci.ubcs.starter.exception.VciBaseException;
+import org.springblade.core.tool.api.R;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Description: 鏁版嵁搴撴搷浣滄湇鍔$被
+ *  娉ㄦ剰鐨勬槸锛宱racle瀵逛簬DDL鎿嶄綔閮戒細鍏堟彁浜や竴娆′簨鍔★紝褰撴墽琛屽畬鎴愬悗浼氬啀娆℃彁浜や竴娆′簨鍔�
+ *
+ * @author LiHang
+ * @date 2023/4/24
+ */
+public interface IDdlService {
+
+	/**
+	 * 鏍¢獙涓氬姟绫诲瀷鐨勬暟鎹簱琛ㄤ腑鏄惁鏈夋暟鎹�
+	 * @param pkBtmType 涓氬姟绫诲瀷鐨勪富閿�
+	 * @return true琛ㄧず鏈夋暟鎹紝false琛ㄧず娌℃湁鏁版嵁
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呮煡璇㈠嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	boolean checkTableHasData(String pkBtmType) throws VciBaseException;
+
+	/**
+	 * 鏍规嵁涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨嬬殑涓婚敭鑾峰彇鏁版嵁搴撹〃鏍肩殑鍚嶇О
+	 * @param pkBtmType  涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨嬬殑涓婚敭
+	 * @return 鏁版嵁搴撹〃鍚嶇О
+	 */
+	String getTableNameByBtmTypeOid(String pkBtmType);
+
+	/**
+	 * 鏍规嵁涓氬姟绫诲瀷鑾峰彇閾炬帴绫诲瀷鐨勮嫳鏂囧悕绉拌幏鍙栨暟鎹簱琛ㄦ牸鐨勫悕绉�
+	 * @param id 涓氬姟绫诲瀷鑾峰彇閾炬帴绫诲瀷鐨勮嫳鏂囧悕绉�
+	 * @return 鏁版嵁搴撹〃鍚嶇О
+	 */
+	String getTableNameByBtmTypeId(String id);
+
+	/**
+	 * 鏍¢獙涓氬姟绫诲瀷鐨勬暟鎹簱琛ㄤ腑鏄惁鏈夋暟鎹�
+	 * @param id 涓氬姟绫诲瀷鐨勮嫳鏂囧悕绉�
+	 * @return true琛ㄧず鏈夋暟鎹紝false琛ㄧず娌℃湁鏁版嵁
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呮煡璇㈠嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	boolean checkTableHasDataById(String id) throws VciBaseException;
+
+	/**
+	 * 鎵归噺灏嗕笟鍔$被鍨嬪垱寤烘暟鎹簱琛�
+	 * @param pkBtmTypes 涓氬姟绫诲瀷鐨勪富閿�
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呭垱寤鸿〃鍑虹幇浜嗛敊璇殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	void createDbTables(String pkBtmTypes) throws VciBaseException;
+
+	/**
+	 * 鎵归噺灏嗕笟鍔$被鍨嬪垱寤烘暟鎹簱琛�
+	 * @param oidCollection 涓氬姟绫诲瀷鐨勪富閿泦鍚�
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呭垱寤鸿〃鍑虹幇浜嗛敊璇殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	void createDbTablesByOidCollection(Collection<String> oidCollection) throws VciBaseException;
+
+	/**
+	 * 鑾峰彇鍒涘缓鐨剆ql璇彞涓睘鎬ч儴鍒�
+	 * @param attributeVOList 灞炴�х殑绔嬬
+	 * @return sql璇彞
+	 */
+	String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList);
+
+	/**
+	 * 鎵归噺灏嗕笟鍔$被鍨嬪垱寤烘暟鎹簱琛�
+	 * @param ids 涓氬姟绫诲瀷鐨勮嫳鏂囧悕绉�
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呭垱寤鸿〃鍑虹幇浜嗛敊璇殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	void createDbTablesById(String ids) throws VciBaseException;
+
+	/**
+	 * 淇敼涓氬姟绫诲瀷涓殑灞炴�у瓧娈电殑闀垮害锛屾敞鎰忓湪鎵ц杩欎釜鏂规硶鏃跺氨浼氬皢浠ュ墠鐨勪簨鍔℃彁浜ゃ��
+	 * @param modifyLengthAttrDOList 闇�瑕佷慨鏀圭殑灞炴�у璞�
+	 * @throws VciBaseException 鎵ц鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	void changeColumnForBtm(List<BtmTypeAttributeVO> modifyLengthAttrDOList) throws VciBaseException;
+
+	/**
+	 * 淇敼閾炬帴绫诲瀷涓殑灞炴�у瓧娈电殑闀垮害锛屾敞鎰忓湪鎵ц杩欎釜鏂规硶鏃跺氨浼氬皢浠ュ墠鐨勪簨鍔℃彁浜ゃ��
+	 * @param modifyLengthAttrDOListForLinkType 闇�瑕佷慨鏀圭殑灞炴�у璞�
+	 * @throws VciBaseException 鎵ц鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	void changeColumnForLink(List<LinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException;
+
+	/**
+	 * 娣诲姞灞炴�у瓧娈靛埌涓氬姟绫诲瀷涓紝娉ㄦ剰鍦ㄦ墽琛岃繖涓柟娉曟椂灏变細灏嗕互鍓嶇殑浜嬪姟鎻愪氦銆�
+	 * @param addAttrDOList 闇�瑕佹坊鍔犵殑灞炴�у璞�
+	 * @throws VciBaseException 鎵ц鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	void addColumn2TableForBtm(List<BtmTypeAttributeVO> addAttrDOList) throws VciBaseException;
+
+	/**
+	 * 娣诲姞灞炴�у瓧娈靛埌閾炬帴绫诲瀷涓紝娉ㄦ剰鍦ㄦ墽琛岃繖涓柟娉曟椂灏变細灏嗕互鍓嶇殑浜嬪姟鎻愪氦銆�
+	 * @param addAttrDOListForLinkType 闇�瑕佹坊鍔犵殑灞炴�у璞�
+	 * @throws VciBaseException 鎵ц鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	void addColumn2TableForLink(List<LinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException;
+
+	/**
+	 * 鍒ゆ柇琛ㄤ腑鏄惁鏈夋暟鎹�
+	 * @param tableName 琛ㄦ牸鐨勫悕绉�
+	 * @return true琛ㄧず鏈夋暟鎹紝false琛ㄧず娌℃湁鏁版嵁锛屾垨鑰呰繖涓〃鏍间笉瀛樺湪鐨勬椂鍊欐姏鍑哄紓甯�
+	 * @throws VciBaseException 鍙傛暟閿欒鐨勬椂鍊欐姏鍑哄紓甯�
+	 */
+	boolean checkTableHasDataByTableName(String tableName)  throws VciBaseException;
+
+	/**
+	 * 鍒涘缓瑙嗗浘
+	 * @param viewCreateSql 瑙嗗浘鐨凷QL璇彞
+	 * @throws VciBaseException 鍙傛暟閿欒鎴栬�呮墽琛岄敊璇殑鏃跺�欎細鎶涘嚭寮傚父锛屾墽琛岄敊璇富瑕佸寘鎷琒QL璇彞閿欒锛屾病鏈夋潈闄愮瓑
+	 */
+	void createViewBySql(String viewCreateSql) throws VciBaseException;
+
+	/**
+	 * 鍒犻櫎琛ㄦ牸鎴栬�呰鍥�
+	 * @param tableName 琛ㄦ牸鍚嶇О鎴栬�呰鍥惧悕绉�
+	 * @throws VciBaseException 鍙傛暟閿欒鎴栬�呮墽琛岄敊璇殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	void dropTableByName(String tableName) throws VciBaseException;
+	/**
+	 * 鍒犻櫎琛ㄦ牸鐨勬煇涓�鍒�
+	 * @param tableName 琛ㄦ牸鍚嶇О
+	 * @param columnName 鍒楃殑鍚嶇О
+	 */
+	void dropColumnByName(String tableName, String columnName);
+
+	/**
+	 * 鏍¢獙涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨嬬殑瀵瑰簲鐨勮〃鏍兼槸鍚﹀瓨鍦�
+	 * @param pkBtmType 涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨嬬殑琛ㄦ牸
+	 * @return true琛ㄧず瀛樺湪锛宖alse琛ㄧず涓嶅瓨鍦�
+	 */
+	boolean checkTableExist(String pkBtmType);
+
+	/**
+	 * 鏍规嵁琛ㄦ牸鐨勫悕绉板垽鏂〃鏍兼槸鍚﹀瓨鍦�
+	 * @param tableName 琛ㄦ牸鍚嶇О
+	 * @return  rue琛ㄧず瀛樺湪锛宖alse琛ㄧず涓嶅瓨鍦�
+	 */
+	boolean checkTableExistByTableName(String tableName);
+
+	/**
+	 * 鏍¢獙涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨嬫墍瀵瑰簲鐨勮〃鏍兼槸鍚﹀瓨鍦�
+	 * @param id 涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨嬬殑鑻辨枃鍚嶇О
+	 * @return true琛ㄧず瀛樺湪锛宖alse琛ㄧず涓嶅瓨鍦�
+	 */
+	boolean checkTableExistById(String id);
+
+	/**
+	 * 鑾峰彇鏁版嵁搴撳拰涓氬姟绫诲瀷涓殑涓嶅悓鐨勫湴鏂�
+	 * @param btmTypeVOList 涓氬姟绫诲瀷瀵硅薄锛屾湁灞炴�ф椂闇�瑕佸寘鍚睘鎬�
+	 * @param linkTypeVOList 閾炬帴绫诲瀷瀵硅薄锛屾湁灞炴�ф椂闇�瑕佸寘鍚睘鎬�
+	 * @return 涓嶅悓鐨勫湴鏂癸紝姣忎竴涓笟鍔$被鍨嬫垨鑰呴摼鎺ョ被鍨嬩竴鏉℃暟鎹�
+	 */
+	List<ModifyAttributeInfo> checkDifferent(List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException;
+
+	/**
+	 * 娓呯悊涓氬姟绫诲瀷涓拰鏁版嵁搴撻噷涓嶄竴鏍风殑
+	 * @param differentAttributeList 涓嶅悓鐨勫睘鎬х殑鍒楄〃
+	 * @param btmTypeVOList 涓氬姟绫诲瀷鏁版嵁
+	 * @param linkTypeVOList 閾炬帴绫诲瀷鏁版嵁
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呮墽琛屽嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父
+	 */
+	void reflexDifferent(List<ModifyAttributeInfo> differentAttributeList,List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException;
+
+	/**
+	 * 鑾峰彇鏁版嵁搴撲腑鎵�鏈夌殑琛ㄦ牸
+	 * @return 琛ㄦ牸鐨勫悕绉帮紝鍏ㄦ槸澶у啓
+	 */
+	List<String> listAllTableName() ;
+
+	/**
+	 * 鏌ヨ鏁版嵁搴撲腑鐨勮〃鏍间俊鎭�
+	 * @param tableNamesCollections 鏁版嵁搴撹〃鍚嶉泦鍚�
+	 * @return 鍦ㄦ暟鎹簱涓殑淇℃伅
+	 * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呮暟鎹簱琛ㄤ笉瀛樺湪鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	List<DdlTableBO> listTableInfoInDB(Collection<String> tableNamesCollections) throws VciBaseException;
+
+	/**
+	 * 瀵煎嚭鏁版嵁搴撲腑鐨勮〃鏍间俊鎭埌excel鏂囦欢
+	 * @param tableNamesCollections 琛ㄦ牸鍚嶇О鐨勯泦鍚�
+	 * @param merge 鍚堝苟琛ㄦ牸鍚嶇О
+	 * @return excel鐨勬枃浠跺悕绉�
+	 * @throws VciBaseException 铓曢涓虹┖鎴栬�呮暟鎹簱琛ㄤ笉瀛樺湪鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	String exportDataBase2File(Collection<String> tableNamesCollections,boolean merge) throws VciBaseException;
+
+	/**
+	 * 鑾峰彇瀛樺偍鏂囦欢鎵�闇�瑕佺殑涓存椂鏂囦欢澶癸紝鏂囦欢澶逛笂宸茬粡鍖呭惈浜�
+	 * @return 鏂囦欢澶圭殑鍦板潃锛屽鏋滈厤缃枃浠舵病鏈夐厤缃紝鍒欓粯璁よ繑鍥炲綋鍓嶉」鐩墍鍦ㄧ殑鏂囦欢澶�
+	 */
+	String getTempFolder();
+
+	/**
+	 * 瀵煎嚭鏁版嵁搴撲腑鐨勮〃鏍间俊鎭埌word鏂囦欢涓�
+	 * @param tableNamesCollections 琛ㄦ牸鍚嶇О鐨勯泦鍚�
+	 * @return word鐨勬枃浠跺悕绉�
+	 * @throws VciBaseException 铓曢涓虹┖鎴栬�呮暟鎹簱琛ㄤ笉瀛樺湪鐨勬椂鍊欎細鎶涘嚭寮傚父
+	 */
+	String exportDataBase2Word(List<String> tableNamesCollections) throws VciBaseException;
+
+	/**
+	 * 鎷疯礉鏁版嵁鍒皐ord妯℃澘涓�
+	 * @param tableDataBO 瑕佸啓鍏ョ殑鏁版嵁
+	 * @return word 鏂囦欢璺緞
+	 *//*
+	String writeDataToWord(WordMergeStartTableDataBO tableDataBO);*/
+
+	/**
+	 * 鍒ゆ柇鏄惁涓哄吋瀹规�х殑琛紝杩欎簺琛ㄤ笉搴旇琚垱寤哄拰淇敼
+	 * @param btmTypeId 涓氬姟绫诲瀷鐨勮嫳鏂囧悕绉�
+	 * @param linkTypeId 涓氬姟绫诲瀷鐨勪腑鏂囧悕绉�
+	 * @return true 琛ㄧず涓哄吋瀹规�х殑琛紝鐢ㄦ埛锛岃鑹诧紝閮ㄩ棬锛屾潈闄愯繖浜�
+	 */
+	boolean isCompatibilityTable(String btmTypeId,String linkTypeId);
+
+	/**
+	 * 鏁版嵁搴撴柊澧炴垨淇敼琛�
+	 * @param ddlDTO 涓氬姟绫诲瀷浼犺緭瀵硅薄
+	 * @return 鎵ц缁撴灉
+	 */
+	R submit(BtmAndLinkTypeDdlDTO ddlDTO);
+
+	/**
+	 * 鎸夎〃鍚嶈幏鍙栬〃淇℃伅
+	 * @param tableName 琛ㄥ悕
+	 * @return 琛ㄤ俊鎭�
+	 */
+	DdlTableBO getTableColumnByTableName(String tableName);
+
+	/**
+	 * 鑾峰彇鎵�鏈夎〃淇℃伅
+	 * @return 琛ㄤ俊鎭泦鍚�
+	 */
+	List<BtmTypeVO> getAllTableInfo();
+}

--
Gitblit v1.9.3