From fcfd509a549e5e71b35d6a727aba2a2647aff656 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 10 九月 2024 17:56:12 +0800
Subject: [PATCH] 按钮设计对话框:删除、调整为上级按钮、调整为下级按钮接口上传。

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java |   61 ++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 4 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
index 8137581..858f465 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/HMSysModConfigController.java
@@ -1,15 +1,16 @@
 package com.vci.web.controller;
 
 import com.vci.constant.FrameWorkLangCodeConstant;
-import com.vci.corba.framework.data.AppConfigDetailInfo;
+import com.vci.corba.common.PLException;
 import com.vci.corba.framework.data.FuncOperationInfo;
 import com.vci.corba.framework.data.OperateInfo;
+import com.vci.dto.RoleRightDTO;
+import com.vci.dto.RoleRightParamDTO;
 import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
 import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI;
 import com.vci.pagemodel.AppConfigDetailInfoVO;
 import com.vci.pagemodel.ExpExcelConditionVO;
 import com.vci.pagemodel.MenuVO;
-import com.vci.starter.web.annotation.controller.VciUnCheckRight;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseResult;
 import com.vci.starter.web.util.ControllerUtil;
@@ -19,7 +20,6 @@
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -70,6 +70,59 @@
         }catch (Exception e){
             e.printStackTrace();
             String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+
+    /**
+     * 鑾峰彇褰撳墠妯″潡涓嬬殑瀛愭ā鍧�
+     * @return
+     */
+    @GetMapping("/getSysModelAuthTreeMenuByPID")
+    public BaseResult<List<MenuVO>> getSysModelAuthTreeMenuByPID() {
+        try {
+            return BaseResult.dataList(functionQueryService.getSysModelAuthTreeMenuByPID(false));
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 鑾峰彇鎵�鎺堟潈鐨勬ā鍧楁潈闄�
+     * @param roleId 瑙掕壊
+     * @return
+     */
+    @GetMapping("/getSysModelAuth")
+    public BaseResult<List<String>> getSysModelAuth(String roleId) {
+        try {
+            return BaseResult.dataList(functionQueryService.getSysModelAuth(roleId));
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+ VciBaseUtil.getExceptionMessage(e);
+            logger.error(errorMsg);
+            throw new VciBaseException(errorMsg);
+        }
+    }
+
+    /**
+     * 淇濆瓨鎺堟潈鐨勬ā鍧�
+     * @param roleRightDTOS 鐢ㄦ埛閫夋嫨鎺堟潈妯″潡淇℃伅
+     * @param roleId 瑙掕壊涓婚敭
+     * @return 鎺堟潈缁撴灉
+     * @throws PLException
+     */
+    @PostMapping("/saveRoleRight")
+    public BaseResult<List<String>> saveRoleRight(@RequestBody List<RoleRightParamDTO> roleRightDTOS, String roleId) {
+        try {
+            return functionQueryService.saveRoleRight(roleRightDTOS, roleId);
+        }catch (Exception e){
+            e.printStackTrace();
+            String errorMsg = "淇濆瓨妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
             logger.error(errorMsg);
             throw new VciBaseException(errorMsg);
         }
@@ -188,7 +241,7 @@
             return BaseResult.success(hmSysModConfigService.addOperationType(operateInfo),"娣诲姞鎿嶄綔绫诲瀷鎴愬姛");
         }catch (Exception e){
             e.printStackTrace();
-            String errorMsg = "鍒犻櫎妯″潡鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
+            String errorMsg = "娣诲姞鎿嶄綔绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+ VciBaseUtil.getExceptionMessage(e);
             logger.error(errorMsg);
             throw new VciBaseException(errorMsg);
         }

--
Gitblit v1.9.3