From 1f7fb3d9affd85a327d6baa60bb3fd32943ef5c4 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期二, 07 一月 2025 16:00:08 +0800
Subject: [PATCH] jar包打包上传
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java | 212 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 193 insertions(+), 19 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
index 5fbd6bc..a071c9b 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
@@ -9,6 +9,7 @@
import com.vci.pagemodel.PLDefinationVO;
import com.vci.pagemodel.PLTabButtonVO;
import com.vci.pagemodel.PLUILayoutCloneVO;
+import com.vci.pagemodel.UICloneVO;
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
@@ -19,7 +20,7 @@
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.OsBtmServiceI;
import com.vci.web.service.UIManagerServiceI;
-import com.vci.web.util.Func;
+import com.vci.starter.web.util.Lcm.Func;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,7 +33,6 @@
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
-import java.util.List;
import java.util.Map;
/**
@@ -216,13 +216,17 @@
* @param selectBtm 閫夋嫨瀵煎叆鍒扮殑涓氬姟绫诲瀷
* @return
*/
- @PostMapping("/impUiContextData")
+ @PostMapping("/impUIContextData")
public BaseResult impUIContextData(MultipartFile file, boolean isCovered,String selectBtm){
- String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename());
- File file1 = new File(excelFileName);
+ File file1 = null;
try {
- file.transferTo(new File(excelFileName));
- if (file != null) {
+ //瑕嗙洊锛屼笉闇�瑕佷紶file
+ if(!isCovered){
+ String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename());
+ file1 = new File(excelFileName);
+ file.transferTo(new File(excelFileName));
+ }
+ if (file != null || isCovered) {
return uiManagerService.impUIContextData(file1, isCovered,selectBtm);
} else {
return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"});
@@ -230,7 +234,9 @@
}catch (Throwable e) {
throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
}finally {
- file1.delete();
+ if(!isCovered){
+ file1.delete();
+ }
}
}
@@ -391,6 +397,102 @@
}
}
+ /**
+ * 涓氬姟绫诲瀷涓嬫媺鏌ヨ
+ * @param baseQueryObject selectBtmType 閫夋嫨鐨勬簮瀵硅薄,甯﹀垎椤典俊鎭�
+ * @return
+ * @throws PLException
+ */
+ @GetMapping( "/getBtmDatasByPage")
+ @VciBusinessLog(operateName = "涓氬姟绫诲瀷涓嬫媺鏌ヨ")
+ public BaseResult getBtmDatasByPage(BaseQueryObject baseQueryObject){
+ try {
+ return BaseResult.dataGrid(uiManagerService.getBtmDatasByPage(baseQueryObject));
+ }catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "涓氬姟绫诲瀷涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * 閾炬帴绫诲瀷涓嬫媺鏌ヨ
+ * @param baseQueryObject selectBtmType 閫夋嫨鐨勬簮瀵硅薄,甯﹀垎椤典俊鎭�
+ * @return
+ * @throws PLException
+ */
+ @GetMapping( "/getLinkDatasByPage")
+ @VciBusinessLog(operateName = "閾炬帴绫诲瀷涓嬫媺鏌ヨ")
+ public BaseResult getLinkDatasByPage(BaseQueryObject baseQueryObject){
+ try {
+ return BaseResult.dataGrid(uiManagerService.getLinkDatasByPage(baseQueryObject));
+ }catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "閾炬帴绫诲瀷涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * UI瀹氫箟涓嬫媺鏌ヨ锛坱emplateType涓篣I瀹氫箟鏃剁殑閫夋嫨瀵硅薄涓嬫媺鏌ヨ锛�
+ * @param baseQueryObject selectBtmType 閫夋嫨鐨勬簮瀵硅薄,甯﹀垎椤典俊鎭�
+ * @return
+ * @throws PLException
+ */
+ @GetMapping( "/getUILayoutDatasByPage")
+ @VciBusinessLog(operateName = "UI瀹氫箟涓嬫媺鏌ヨ")
+ public BaseResult getUILayoutDatasByPage(BaseQueryObject baseQueryObject){
+ try {
+ return BaseResult.dataGrid(uiManagerService.getUILayoutDatasByPage(baseQueryObject));
+ }catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "UI瀹氫箟涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * 閫夋嫨妯℃澘涓嬫媺鏌ヨ
+ * @param baseQueryObject
+ * @return
+ * @throws PLException
+ */
+ @GetMapping( "/getPortalVIDatasByPage")
+ @VciBusinessLog(operateName = "閫夋嫨妯℃澘涓嬫媺鏌ヨ")
+ public BaseResult getPortalVIDatasByPage(BaseQueryObject baseQueryObject){
+ try {
+ return BaseResult.dataGrid(uiManagerService.getPortalVIDatasByPage(baseQueryObject));
+ }catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "閫夋嫨妯℃澘涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * 鏌ヨ妯℃澘涓嬫媺鏌ヨ
+ * @param baseQueryObject
+ * @return
+ * @throws PLException
+ */
+ @GetMapping( "/getQTInfoDatasByPage")
+ @VciBusinessLog(operateName = "鏌ヨ妯℃澘涓嬫媺鏌ヨ")
+ public BaseResult getQTInfoDatasByPage(BaseQueryObject baseQueryObject){
+ try {
+ return BaseResult.dataGrid(uiManagerService.getQTInfoDatasByPage(baseQueryObject));
+ }catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "鏌ヨ妯℃澘涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+
//椤甸潰璁捐涓嬮厤缃寜閽浉鍏虫帴鍙�
/**
* 鑾峰彇椤电鍖哄煙鎸夐挳閰嶇疆淇℃伅
@@ -415,10 +517,10 @@
* @param tabButtonVO
* @return 淇濆瓨缁撴灉
*/
- @PostMapping("/addTapButton")
- public BaseResult addTapButton(@RequestBody PLTabButtonVO tabButtonVO){
+ @PostMapping("/addTabButton")
+ public BaseResult addTabButton(@RequestBody PLTabButtonVO tabButtonVO){
try {
- return uiManagerService.addTapButton(tabButtonVO);
+ return uiManagerService.addTabButton(tabButtonVO);
} catch (Throwable e) {
e.printStackTrace();
String exceptionMessage = "鎸夐挳閰嶇疆淇℃伅娣诲姞鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
@@ -432,10 +534,10 @@
* @param tabButtonVO
* @return 淇敼缁撴灉
*/
- @PutMapping("/updateTapButton")
- public BaseResult updateTapButton(@RequestBody PLTabButtonVO tabButtonVO){
+ @PutMapping("/updateTabButton")
+ public BaseResult updateTabButton(@RequestBody PLTabButtonVO tabButtonVO){
try {
- return uiManagerService.updateTapButton(tabButtonVO);
+ return uiManagerService.updateTabButton(tabButtonVO);
} catch (Throwable e) {
e.printStackTrace();
String exceptionMessage = "淇敼鎸夐挳閰嶇疆淇℃伅鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
@@ -449,10 +551,10 @@
* @param tabButtonVO
* @return
*/
- @DeleteMapping("/deleteTapButton")
- public BaseResult deleteTapButton(@RequestBody PLTabButtonVO tabButtonVO){
+ @DeleteMapping("/deleteTabButton")
+ public BaseResult deleteTabButton(@RequestBody PLTabButtonVO tabButtonVO){
try {
- return uiManagerService.deleteTapButton(tabButtonVO) ? BaseResult.success("鍒犻櫎鍗曚釜鎸夐挳閰嶇疆鎴愬姛锛�"):BaseResult.fail("鍒犻櫎鍗曚釜鎸夐挳閰嶇疆澶辫触锛�");
+ return uiManagerService.deleteTabButton(tabButtonVO) ? BaseResult.success("鍒犻櫎鍗曚釜鎸夐挳閰嶇疆鎴愬姛锛�"):BaseResult.fail("鍒犻櫎鍗曚釜鎸夐挳閰嶇疆澶辫触锛�");
} catch (PLException e) {
e.printStackTrace();
String exceptionMessage = "鍒犻櫎鍗曚釜鎸夐挳閰嶇疆鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
@@ -504,7 +606,7 @@
@VciBusinessLog(operateName = "UI鎺堟潈锛堟爲褰㈢粨鏋勶級")
public BaseResult getUIAuthor(BaseQueryObject baseQueryObject){
try {
- return BaseResult.dataList( uiManagerService.getUIAuthor(baseQueryObject));
+ return BaseResult.dataList(uiManagerService.getUIAuthor(baseQueryObject));
}catch (Throwable e) {
e.printStackTrace();
String exceptionMessage = "UI鎺堟潈鍔犺浇鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e);
@@ -513,7 +615,7 @@
}
}
- /***
+ /**
* @param uiAuthorDTO 鍕鹃�夌殑闇�瑕佷繚瀛樼殑鏁版嵁瀵硅薄
* @return
*/
@@ -530,4 +632,76 @@
}
}
+ /**
+ * 閫氳繃涓氬姟绫诲瀷鑾峰彇UI涓婁笅鏂囧寘鍚叾涓嬪叧鑱旂殑鍖哄煙瀹氫箟>椤甸潰瀹氫箟绛夋墍鏈夊叧鑱旀暟鎹紝褰掔撼鎴恡ree缁撴瀯
+ * @param btmName
+ * @param level
+ * @return
+ */
+ @GetMapping( "/getAllLevelTreeByBtm")
+ public BaseResult getAllLevelTreeByBtm(String btmName,String level){
+ try {
+ return BaseResult.success(uiManagerService.getAllLevelTreeByBtm(btmName,level));
+ }catch (Exception e) {
+ e.printStackTrace();
+ String exceptionMessage = "鑾峰彇UI鏍戞椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * 鍏嬮殕椤电
+ * @param uiCloneVO
+ * @return
+ * @throws Throwable
+ */
+ @PostMapping("/clonetabPage")
+ public BaseResult clonetabPage(@RequestBody UICloneVO uiCloneVO){
+ try {
+ return uiManagerService.clonetabPage(uiCloneVO);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "鍏嬮殕椤电鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * 鍏嬮殕椤甸潰瀹氫箟
+ * @param uiCloneVO
+ * @return
+ * @throws Throwable
+ */
+ @PostMapping("/clonePageDef")
+ public BaseResult clonePageDef(@RequestBody UICloneVO uiCloneVO){
+ try {
+ return uiManagerService.clonePageDef(uiCloneVO);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "鍏嬮殕椤甸潰瀹氫箟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
+ /**
+ * 鍏嬮殕鎸夐挳
+ * @param uiCloneVO
+ * @return
+ * @throws Throwable
+ */
+ @PostMapping("/cloneTabButton")
+ public BaseResult cloneTabButton(@RequestBody UICloneVO uiCloneVO){
+ try {
+ return uiManagerService.cloneTabButton(uiCloneVO);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ String exceptionMessage = "鍏嬮殕鎸夐挳閰嶇疆鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+ logger.error(exceptionMessage);
+ return BaseResult.fail(exceptionMessage);
+ }
+ }
+
}
--
Gitblit v1.9.3