From 2af4ec653879425abc5873febae74b7bbf9a07e0 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 20 九月 2024 16:13:10 +0800
Subject: [PATCH] 1、新增日期保存期限接口。 2、新增保存期限设置接口。 3、新增删除日志接口。 4、新增日志查询接口。 5、新增获取操作用户接口。

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java |   31 +++++++++++++++++++++++++------
 1 files changed, 25 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..0e37319 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();
+            }
+        }
     }
 
     /**

--
Gitblit v1.9.3