From 2a06a2a8aed92fd2eb4b4570b79f304a1c0caf6d Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期四, 12 九月 2024 09:39:37 +0800
Subject: [PATCH] 1、Action树查询接口增加id。 2、增加角色列表接口

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java |   85 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 79 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 9540755..a0795b9 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,16 +1,17 @@
 package com.vci.web.controller;
 
 import com.vci.corba.common.PLException;
+import com.vci.corba.portal.data.PLPageDefination;
 import com.vci.corba.portal.data.PLTabPage;
 import com.vci.corba.portal.data.PLUILayout;
-import com.vci.dto.RoleRightDTO;
 import com.vci.dto.UIAuthorDTO;
-import com.vci.starter.web.pagemodel.Tree;
+import com.vci.pagemodel.PLDefinationVO;
 import com.vci.pagemodel.PLUILayoutCloneVO;
 import com.vci.starter.web.annotation.log.VciBusinessLog;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseQueryObject;
 import com.vci.starter.web.pagemodel.BaseResult;
+import com.vci.starter.web.pagemodel.DataGrid;
 import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.web.service.OsBtmServiceI;
 import com.vci.web.service.UIManagerServiceI;
@@ -21,7 +22,9 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import javax.xml.crypto.Data;
 import java.io.IOException;
+import java.util.Comparator;
 import java.util.List;
 
 /**
@@ -187,9 +190,9 @@
      */
     @GetMapping( "/getTabByContextIdAndType")
     @VciBusinessLog(operateName = "鏍规嵁涓婁笅鏂嘔D鍜屽尯鍩熺被鍨嬶紝鎸夐『搴忚幏鍙栧綋鍓嶅尯鍩熺殑tab椤�")
-    public BaseResult<List<PLTabPage>> getTabByContextIdAndType(String contextId, int areaType){
+    public BaseResult<DataGrid> getTabByContextIdAndType(String contextId, int areaType){
         try {
-            return BaseResult.dataList(uiManagerService.getTabByContextIdAndType(contextId,areaType));
+            return BaseResult.dataGrid(uiManagerService.getTabByContextIdAndType(contextId,areaType));
         }catch (Exception e) {
             e.printStackTrace();
             String exceptionMessage = "鏍规嵁涓婁笅鏂嘔D鍜屽尯鍩熺被鍨嬶紝鎸夐『搴忚幏鍙栧綋鍓嶅尯鍩熺殑tab鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
@@ -250,7 +253,7 @@
     }
 
     /**
-     * 鍒犻櫎鏁版嵁
+     * 鍒犻櫎鍖哄煙瀹氫箟鏁版嵁
      * @param oids
      * @return
      */
@@ -261,6 +264,76 @@
         } catch (PLException e) {
             e.printStackTrace();
             String exceptionMessage = "鍒犻櫎鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            return BaseResult.fail(exceptionMessage);
+        }
+    }
+
+    //椤甸潰璁捐鐩稿叧鎺ュ彛
+    /**
+     * 鏌ヨ椤甸潰璁捐瀹氫箟
+     * @param pageContextOId
+     * @return
+     */
+    @GetMapping( "/getPLPageDefinations")
+    @VciBusinessLog(operateName = "鏌ヨ椤甸潰璁捐瀹氫箟")
+    public BaseResult<DataGrid> getPLPageDefinations(String pageContextOId){
+        try {
+            return BaseResult.dataGrid(uiManagerService.getPLPageDefinations(pageContextOId));
+        }catch (Exception e) {
+            e.printStackTrace();
+            String exceptionMessage = "鏌ヨ椤甸潰璁捐瀹氫箟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            return BaseResult.fail(exceptionMessage);
+        }
+    }
+
+    /**
+     * 娣诲姞椤甸潰瀹氫箟
+     * @param pdVO
+     * @return 淇濆瓨缁撴灉
+     */
+    @PostMapping("/addPageDefination")
+    public BaseResult addPageDefination(@RequestBody PLDefinationVO pdVO){
+        try {
+            return uiManagerService.addPageDefination(pdVO) ? BaseResult.success("椤甸潰瀹氫箟娣诲姞鎴愬姛锛�"):BaseResult.fail("椤甸潰瀹氫箟娣诲姞澶辫触锛�");
+        } catch (Throwable e) {
+            e.printStackTrace();
+            String exceptionMessage = "椤甸潰瀹氫箟娣诲姞鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            return BaseResult.fail(exceptionMessage);
+        }
+    }
+
+    /**
+     * 淇敼椤甸潰瀹氫箟鏁版嵁
+     * @param  pdVO
+     * @return 淇敼缁撴灉
+     */
+    @PutMapping("/updatePageDefination")
+    public BaseResult updatePageDefination(@RequestBody PLDefinationVO pdVO){
+        try {
+            return uiManagerService.updatePageDefination(pdVO) ? BaseResult.success("淇敼椤甸潰瀹氫箟鎴愬姛锛�"):BaseResult.fail("淇敼椤甸潰瀹氫箟澶辫触锛�");
+        } catch (Throwable e) {
+            e.printStackTrace();
+            String exceptionMessage = "淇敼椤甸潰瀹氫箟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            return BaseResult.fail(exceptionMessage);
+        }
+    }
+
+    /**
+     * 鍒犻櫎椤甸潰瀹氫箟鏁版嵁
+     * @param oids
+     * @return
+     */
+    @DeleteMapping("/delPageDefination")
+    public BaseResult delPageDefination(String[] oids){
+        try {
+            return uiManagerService.delPageDefination(oids) ? BaseResult.success("鍒犻櫎椤甸潰瀹氫箟鎴愬姛锛�"):BaseResult.fail("鍒犻櫎椤甸潰瀹氫箟鏁版嵁澶辫触锛�");
+        } catch (PLException e) {
+            e.printStackTrace();
+            String exceptionMessage = "鍒犻櫎椤甸潰瀹氫箟鏁版嵁鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
             logger.error(exceptionMessage);
             return BaseResult.fail(exceptionMessage);
         }
@@ -285,7 +358,7 @@
     }
 
     /***
-     * @param selectTreeList 鍕鹃�夌殑闇�瑕佷繚瀛樼殑鏁版嵁瀵硅薄
+     * @param uiAuthorDTO 鍕鹃�夌殑闇�瑕佷繚瀛樼殑鏁版嵁瀵硅薄
      * @return
      */
     @PostMapping( "/authorizedUI")

--
Gitblit v1.9.3