From 0f4bac6483639a3be54d8fa311e005a2a3c99885 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 27 九月 2024 17:45:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 103 insertions(+), 6 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 233f31b..547d42d 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
@@ -1,6 +1,7 @@
package com.vci.web.controller;
import cn.hutool.core.io.FileUtil;
+import com.vci.constant.FrameWorkLangCodeConstant;
import com.vci.corba.common.PLException;
import com.vci.corba.portal.data.PLTabPage;
import com.vci.corba.portal.data.PLUILayout;
@@ -211,14 +212,32 @@
/**
* 瀵煎叆UI涓婁笅鏂�
* @param file 涓婁紶鐨勬枃浠�
+ * @param isCovered 鏄惁瑕嗙洊
+ * @param selectBtm 閫夋嫨瀵煎叆鍒扮殑涓氬姟绫诲瀷
* @return
*/
- @PostMapping("/impUiContextData")
- public BaseResult impUIContextData(MultipartFile file){try {
- return uiManagerService.impUIContextData(file);
- }catch (Throwable e) {
- throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
- }
+ @PostMapping("/impUIContextData")
+ public BaseResult impUIContextData(MultipartFile file, boolean isCovered,String selectBtm){
+ File file1 = null;
+ try {
+ //瑕嗙洊锛屼笉闇�瑕佷紶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[]{"鏃犲鍏ョ殑鏂囦欢"});
+ }
+ }catch (Throwable e) {
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+ }finally {
+ if(!isCovered){
+ file1.delete();
+ }
+ }
}
/**
@@ -378,6 +397,84 @@
}
}
+
+ /**
+ * 涓氬姟绫诲瀷涓嬫媺鏌ヨ
+ * @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);
+ }
+ }
+
+ /**
+ * 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);
+ }
+ }
+
+
//椤甸潰璁捐涓嬮厤缃寜閽浉鍏虫帴鍙�
/**
* 鑾峰彇椤电鍖哄煙鎸夐挳閰嶇疆淇℃伅
--
Gitblit v1.9.3