From 391eec3114a17e68652434c6eae610799d80290e Mon Sep 17 00:00:00 2001
From: ludc <ludc@vci-tech.com>
Date: 星期四, 16 一月 2025 11:13:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java |   37 +++++++++++++++++--------------------
 1 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
index 7e9968d..fdef2dc 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java
@@ -1,15 +1,14 @@
 package com.vci.web.controller;
 
 import com.vci.corba.common.PLException;
-import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
-import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum;
+import com.vci.starter.web.util.VciBaseUtil;
+import com.vci.web.service.ISmFunctionQueryService;
+import com.vci.web.enumpck.ResourceControlTypeEnum;
 import com.vci.pagemodel.MenuVO;
 import com.vci.pagemodel.SmFunctionVO;
 import com.vci.starter.web.annotation.controller.VciUnCheckRight;
-import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.*;
 import com.vci.pagemodel.UIContentVO;
-import com.vci.starter.web.util.VciBaseUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,22 +48,13 @@
 	}
 
 	/**
-	 * 鑾峰彇褰撳墠妯″潡涓嬬殑瀛愭ā鍧�
-	 * @param parentId
+	 * 鑾峰彇褰撳墠鐢ㄦ埛鐨勬墍鏈夋寜閽�
+	 * @param treeQueryObject 鏍戞煡璇㈠璞�
 	 * @return
-	 * @throws PLException
 	 */
-	@GetMapping("/getSysModelTreeMenuByPID")
-	@VciUnCheckRight
-	public List<MenuVO> getSysModelTreeMenuByPID(String parentId) {
-		try {
-			return functionQueryService.getSysModelTreeMenuByPID(parentId,true);
-		}catch (Exception e){
-			e.printStackTrace();
-			String errorMsg = "鏌ヨ瀛愭ā鍧楁椂鍑虹幇閿欒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e);
-			logger.error(errorMsg);
-			throw new VciBaseException(errorMsg);
-		}
+	@GetMapping("/getAllButtons")
+	public BaseResult getAllButtons(TreeQueryObject treeQueryObject){
+		return BaseResult.dataList(functionQueryService.buttons(treeQueryObject));
 	}
 
 	/**
@@ -74,8 +64,15 @@
 	 */
 	@VciUnCheckRight
 	@GetMapping("/getUIContentByBtmTypeAndId")
-	public UIContentVO getUIContentByBtmTypeAndId(@RequestBody TreeQueryObject treeQueryObject) throws PLException {
-		return functionQueryService.getUIContentByBtmTypeAndId(treeQueryObject, ResourceControlTypeEnum.BS);
+	public BaseResult getUIContentByBtmTypeAndId(@RequestBody TreeQueryObject treeQueryObject) {
+		try {
+			return BaseResult.success(functionQueryService.getUIContentByBtmTypeAndId(treeQueryObject, ResourceControlTypeEnum.BS));
+		} catch (Exception e) {
+			e.printStackTrace();
+			String exceptionMessage = "鑾峰彇褰撳墠鐢ㄦ埛鐨勮彍鍗曟椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e);
+			logger.error(exceptionMessage);
+			return BaseResult.fail(exceptionMessage);
+		}
 	}
 	
 	/**

--
Gitblit v1.9.3