From ab54535ba1a6fff9ed7746cb8184b54005937691 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 16 十二月 2024 15:28:40 +0800
Subject: [PATCH] 1、UI上下文查询接口,添加权限过滤逻辑。 2、密码策略查询对象的创建日期和修改日期属性修改为String类型。

---
 Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java     |   18 +-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmPwdStrategyQueryServiceImpl.java         |   26 ++-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java                          |   13 +-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIController.java                         |   20 +++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java                           |    9 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java |    2 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/SmFunctionController.java                    |   12 +
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java                     |   19 ---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java                   |  151 ++++++++++++++++++-------
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/SmPwdStrategyQueryServiceI.java                 |   10 
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java    |   20 ++-
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmPasswordStrategyForPlatform1.java               |   12 +-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java                  |   42 +++----
 13 files changed, 217 insertions(+), 137 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmPasswordStrategyForPlatform1.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmPasswordStrategyForPlatform1.java
index c904f05..9caa8c5 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmPasswordStrategyForPlatform1.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/SmPasswordStrategyForPlatform1.java
@@ -83,7 +83,7 @@
             name = "plcreatetime"
     )
     @VciFieldType(VciFieldTypeEnum.VTDateTime)
-    private Long plcreatetime;
+    private String plcreatetime;
 
     /**
      * 鍒涘缓浜�
@@ -102,7 +102,7 @@
             name = "plupdatetime"
     )
     @VciFieldType(VciFieldTypeEnum.VTDateTime)
-    private Long plupdatetime;
+    private String plupdatetime;
 
     /**
      * 鏈�鍚庝慨鏀逛汉
@@ -203,11 +203,11 @@
         this.pldesc = pldesc == null ? null : pldesc.trim();
     }
 
-    public Long getPlcreatetime() {
+    public String getPlcreatetime() {
         return plcreatetime;
     }
 
-    public void setPlcreatetime(Long plcreatetime) {
+    public void setPlcreatetime(String plcreatetime) {
         this.plcreatetime = plcreatetime;
     }
 
@@ -219,11 +219,11 @@
         this.plcreateuser = plcreateuser == null ? null : plcreateuser.trim();
     }
 
-    public Long getPlupdatetime() {
+    public String getPlupdatetime() {
         return plupdatetime;
     }
 
-    public void setPlupdatetime(Long plupdatetime) {
+    public void setPlupdatetime(String plupdatetime) {
         this.plupdatetime = plupdatetime;
     }
 
diff --git a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java
index a39479e..6d3928c 100644
--- a/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web-permission/src/main/java/com/vci/web/service/impl/SmUserQueryServiceImpl.java
@@ -1141,19 +1141,21 @@
 		if(StringUtils.isBlank(md5Password) || StringUtils.isBlank(userName)){
 			return false;
 		}
-		String sql = " select plpassword from pluser where plusername = :userName";
+		/*String sql = " select plpassword from pluser where plusername = :userName";
 		Map<String,String> conditionMap = new HashMap<>();
-		conditionMap.put("userName",userName.trim());
-		List<BusinessObject> BusinessObjectList = boService.queryBySql(sql, conditionMap);
-		if(CollectionUtils.isEmpty(BusinessObjectList)){
+		conditionMap.put("userName",userName.trim());*/
+		SmUserVO userVO = this.getUserByUserId(userName);
+		//List<BusinessObject> BusinessObjectList = boService.queryBySql(sql, conditionMap);
+		if(Func.isEmpty(userVO) || Func.isBlank(userVO.getOid())){
 			return  false;
 		}
 
-		ThreeDES des = new ThreeDES();// 瀹炰緥鍖栦竴涓锟�?
-		des.getKey("daliantan0v0");// 鐢熸垚瀵嗗寵
+		//ThreeDES des = new ThreeDES();// 瀹炰緥鍖栦竴涓锟�?
+		//des.getKey("daliantan0v0");// 鐢熸垚瀵嗗寵
 		//瀵规煡璇㈠嚭鏉ョ殑瀵嗙爜瑙e瘑
-		String plpassword = ObjectTool.getNewBOAttributeValue(BusinessObjectList.get(0), "plpassword");
-		plpassword = des.getDesString(plpassword);
+		//String plpassword = ObjectTool.getNewBOAttributeValue(BusinessObjectList.get(0), "plpassword");
+		String plpassword = userVO.getPassword();
+		//plpassword = des.getDesString(plpassword);
 		if(md5Password.equals(plpassword)){
 			return true;
 		}
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 6a7c534..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,6 +1,7 @@
 package com.vci.web.controller;
 
 import com.vci.corba.common.PLException;
+import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.web.service.ISmFunctionQueryService;
 import com.vci.web.enumpck.ResourceControlTypeEnum;
 import com.vci.pagemodel.MenuVO;
@@ -63,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);
+		}
 	}
 	
 	/**
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 055a527..a071c9b 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
@@ -616,25 +616,6 @@
     }
 
     /**
-     * 鏍规嵁瑙掕壊涓婚敭鑾峰彇宸叉巿鏉冪殑淇℃伅
-     * @param roleId
-     * @return
-     * @throws PLException
-     */
-    /*    @GetMapping( "/getRightListByRoleId")
-        @VciBusinessLog(operateName = "鏍规嵁瑙掕壊涓婚敭鑾峰彇宸叉巿鏉冪殑UI涓婚敭闆嗗悎")
-        public BaseResult getRightListByRoleId(String roleId){
-            try {
-                return BaseResult.success(uiManagerService.getRightListByRoleId(roleId));
-            }catch (Throwable e) {
-                e.printStackTrace();
-                String exceptionMessage = "鑾峰彇宸叉巿鏉冧俊鎭椂閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e);
-                logger.error(exceptionMessage);
-                return BaseResult.fail(exceptionMessage);
-            }
-        }*/
-
-    /***
      * @param uiAuthorDTO 鍕鹃�夌殑闇�瑕佷繚瀛樼殑鏁版嵁瀵硅薄
      * @return
      */
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIController.java
index 73df4c7..46ebfc6 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebUIController.java
@@ -6,7 +6,11 @@
 import com.vci.pagemodel.UITableDefineVO;
 import com.vci.starter.web.annotation.controller.VciUnCheckRight;
 import com.vci.starter.web.annotation.log.VciBusinessLog;
+import com.vci.starter.web.pagemodel.BaseResult;
+import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.web.service.UIEngineServiceI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -29,6 +33,11 @@
 	private UIEngineServiceI uiService;
 
 	/**
+	 * 鏃ュ織
+	 */
+	private Logger logger = LoggerFactory.getLogger(getClass());
+
+	/**
 	 * 鑾峰彇UI涓婁笅鏂囩殑瀹氫箟
 	 * @param btmType 涓氬姟绫诲瀷
 	 * @param id 缂栧彿
@@ -36,8 +45,15 @@
 	 */
 	@GetMapping("/getUIContentByBtmTypeAndId")
 	@VciUnCheckRight
-	public UIContentVO getUIContentByBtmTypeAndId(String btmType,String id){
-		return uiService.getUIContentByBtmTypeAndId(btmType,id);
+	public BaseResult getUIContentByBtmTypeAndId(String btmType,String id){
+		try {
+			return BaseResult.success(uiService.getUIContentByBtmTypeAndId(btmType,id));
+		} catch (PLException e) {
+			e.printStackTrace();
+			String exceptionMessage = "鑾峰彇UI涓婁笅鏂囩殑瀹氫箟鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+			logger.error(exceptionMessage);
+			return BaseResult.fail(exceptionMessage);
+		}
 	}
 
 	/**
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/SmPwdStrategyQueryServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/SmPwdStrategyQueryServiceI.java
index ef053cd..c8f531c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/SmPwdStrategyQueryServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/SmPwdStrategyQueryServiceI.java
@@ -30,7 +30,7 @@
      * @param pageHelper
      * @return
      */
-    DataGrid<SmPasswordStrategyVO> refDataGrid(Map<String, String> conditionMap, PageHelper pageHelper) throws PLException;
+    DataGrid<SmPasswordStrategyVO> refDataGrid(Map<String, String> conditionMap, PageHelper pageHelper) throws Exception;
 
     /**
      * 鏌ヨ瀵嗙爜瀹夊叏绛栫暐锛屼笅鎷変娇鐢ㄧ殑鎺ュ彛
@@ -46,28 +46,28 @@
      * @param passwordStrategId
      * @return
      */
-    boolean saveUserPasswordStrateg(String[] userIds, String passwordStrategId) throws PLException;
+    boolean saveUserPasswordStrateg(String[] userIds, String passwordStrategId) throws Exception;
 
     /**
      * 鏂板瀵嗙爜绛栫暐
      * @param spsDto
      * @return
      */
-    boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException;
+    boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws Exception;
 
     /**
      * 淇敼瀵嗙爜绛栫暐
      * @param spsDto
      * @return
      */
-    boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException;
+    boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws Exception;
 
     /**
      *  鍒犻櫎瀵嗙爜绛栫暐
      * @param pwdIds
      * @return
      */
-    boolean delPasswordStrateg(String[] pwdIds) throws PLException;
+    boolean delPasswordStrateg(String[] pwdIds) throws Exception;
 
     /**
      * 鏍规嵁涓婚敭鏌ヨ瀵嗙爜绛栫暐map瀵硅薄
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java
index 95f9f5c..bb5853d 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIEngineServiceI.java
@@ -177,7 +177,7 @@
 	 * @param pkComponent 缁勪欢鐨勪富閿�
 	 * @return 鎸夐挳鐨勪俊鎭�
 	 */
-	List<UIButtonDefineVO> listButtonByComponent(String pkComponent);
+	List<UIButtonDefineVO> listButtonByComponent(String pkComponent, Map<String, RoleRightVO> roleRightMap);
 
 	/**
 	 * 鎸夐挳鐨勬暟鎹璞¤浆鎹负鏄剧ず瀵硅薄
@@ -205,9 +205,10 @@
 	 * @param id 涓婚敭
 	 * @return UI涓婁笅鏂囩殑淇℃伅
 	 */
-    UIContentVO getUIContentByBtmTypeAndId(String btmType, String id);
+    UIContentVO getUIContentByBtmTypeAndId(String btmType, String id) throws PLException;
 
-//	UIContentVO UIContentDO2VO(PLPageLayoutDefination pageLayoutDefination, boolean queryDetail);
-	UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail);
+	//	UIContentVO UIContentDO2VO(PLPageLayoutDefination pageLayoutDefination, boolean queryDetail);
+
+	UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail,Map<String, RoleRightVO> roleRightMap);
 
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
index f569136..8911e1a 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
@@ -1,6 +1,7 @@
 package com.vci.web.service;
 
 import com.vci.corba.common.PLException;
+import com.vci.corba.framework.data.RoleRightInfo;
 import com.vci.corba.omd.btm.BizType;
 import com.vci.corba.omd.ltm.LinkType;
 import com.vci.corba.omd.qtm.QTInfo;
@@ -8,10 +9,7 @@
 import com.vci.corba.portal.data.PLUILayout;
 import com.vci.corba.portal.data.PortalVI;
 import com.vci.dto.UIAuthorDTO;
-import com.vci.pagemodel.PLDefinationVO;
-import com.vci.pagemodel.PLTabButtonVO;
-import com.vci.pagemodel.PLUILayoutCloneVO;
-import com.vci.pagemodel.UICloneVO;
+import com.vci.pagemodel.*;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseQueryObject;
 import com.vci.starter.web.pagemodel.BaseResult;
@@ -24,6 +22,7 @@
 import java.util.Map;
 
 /**
+ * UI瀹氫箟绠$悊鏈嶅姟
  * @author ludc
  * @date 2024/8/28 17:05
  */
@@ -208,13 +207,13 @@
      */
     List<Tree> getUIAuthor(BaseQueryObject baseQueryObject)throws Exception;
 
-/*    *//**
+    /**
      * 鏍规嵁瑙掕壊涓婚敭鑾峰彇宸叉巿鏉冪殑淇℃伅
      * @param roleId
      * @return
      * @throws PLException
-     *//*
-    Map<String,RoleRightVO> getRightListByRoleId(String roleId) throws PLException;*/
+     */
+    Map<String,RoleRightVO> getRoleRightMap(String roleId) throws PLException;
 
     /**
      * UI鎺堟潈
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java
index 9de09f6..4545527 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmFunctionQueryServicePlatformImpl.java
@@ -13,6 +13,7 @@
 import com.vci.model.SmRoleForPlatform1;
 import com.vci.omd.utils.ObjectTool;
 import com.vci.pagemodel.MenuVO;
+import com.vci.pagemodel.RoleRightVO;
 import com.vci.pagemodel.SmFunctionVO;
 import com.vci.pagemodel.UIContentVO;
 import com.vci.starter.web.constant.QueryOptionConstant;
@@ -24,6 +25,7 @@
 import com.vci.web.properties.JsonConfigReader;
 import com.vci.web.service.ISmFunctionQueryService;
 import com.vci.web.service.UIEngineServiceI;
+import com.vci.web.service.UIManagerServiceI;
 import com.vci.web.service.WebBoServiceI;
 import com.vci.starter.web.util.Lcm.Func;
 import com.vci.web.util.PlatformClientUtil;
@@ -87,13 +89,16 @@
 	private ISmFunctionQueryService self;
 
     @Autowired
-    private  UIEngineServiceI uiEngineServiceI;
+    private UIEngineServiceI uiEngineServiceI;
+
+    @Autowired
+    private UIManagerServiceI uiManagerServiceI;
+
+    @Autowired
+    private RightControlUtil rightControlUtil;
 
     @Autowired
     private PlatformClientUtil platformClientUtil;
-
-    @Autowired
-    RightControlUtil rightControlUtil;
 
     /**
      * 鏌ヨ鎵�鏈夌殑鍔熻兘
@@ -708,13 +713,14 @@
     @Override
     public UIContentVO getUIContentByBtmTypeAndId(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException {
         SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException();
-        if(resourceControlTypeEnum == null){
+        /* if(resourceControlTypeEnum == null){
             resourceControlTypeEnum = ResourceControlTypeEnum.BS;
-        }
+        }*/
+        Map<String, RoleRightVO> roleRightMap = uiManagerServiceI.getRoleRightMap(null);
         for (PLUILayout allPLUILayout : platformClientUtil.getUIService().getAllPLUILayouts()) {
             if(treeQueryObject.getConditionMap().getOrDefault("type","").equals(allPLUILayout.plRelatedType)
                     && treeQueryObject.getConditionMap().getOrDefault("context","").equals(allPLUILayout.plCode)){
-                return uiEngineServiceI.UIContentDO2VO(allPLUILayout,true);
+                return uiEngineServiceI.UIContentDO2VO(allPLUILayout,true,roleRightMap);
             }
         }
         return null;
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmPwdStrategyQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmPwdStrategyQueryServiceImpl.java
index 9abee0c..4d84346 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmPwdStrategyQueryServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmPwdStrategyQueryServiceImpl.java
@@ -9,6 +9,7 @@
 import com.vci.model.SmPasswordStrategyForPlatform1;
 import com.vci.omd.utils.ObjectTool;
 import com.vci.pagemodel.SmPasswordStrategyVO;
+import com.vci.starter.web.enumpck.VciFieldTypeEnum;
 import com.vci.starter.web.util.BeanUtilForVCI;
 import com.vci.web.service.SmUserQueryServiceI;
 import com.vci.starter.web.constant.QueryOptionConstant;
@@ -31,6 +32,8 @@
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -93,7 +96,7 @@
      * @return
      */
     @Override
-    public DataGrid<SmPasswordStrategyVO> refDataGrid(Map<String, String> conditionMap, PageHelper pageHelper) throws PLException {
+    public DataGrid<SmPasswordStrategyVO> refDataGrid(Map<String, String> conditionMap, PageHelper pageHelper) throws Exception {
         if(pageHelper == null){
             pageHelper = new PageHelper(-1);
         }
@@ -138,13 +141,13 @@
      * @param smPasswordStrategyForPlatform1s 鍘熷钩鍙扮殑瀵嗙爜绛栫暐
      * @return
      */
-    private List<SmPasswordStrategyVO> pltPwdStrategy2SmPwdStrategyVOs(List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s) throws PLException{
+    private List<SmPasswordStrategyVO> pltPwdStrategy2SmPwdStrategyVOs(List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s) throws Exception{
         List<SmPasswordStrategyVO> smPasswordStrategyVOList = new ArrayList<>();
         if(!CollectionUtils.isEmpty(smPasswordStrategyForPlatform1s)){
             smPasswordStrategyForPlatform1s.stream().forEach(s -> {
                 try {
                     smPasswordStrategyVOList.add(pltPwdStrategy2SmPwdStrategyVO(s));
-                } catch (PLException e) {
+                } catch (Exception e) {
                     e.printStackTrace();
                     String exceptionMessage = "Platform1瀵硅薄杞琕O瀵硅薄鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e);
                     logger.error(exceptionMessage);
@@ -160,7 +163,7 @@
      * @param strategyForPlatform1 鍘熷钩鍙扮殑瀵嗙爜绛栫暐
      * @return 鏂扮殑瀵嗙爜绛栫暐瀵硅薄
      */
-    private SmPasswordStrategyVO pltPwdStrategy2SmPwdStrategyVO(SmPasswordStrategyForPlatform1 strategyForPlatform1) throws PLException {
+    private SmPasswordStrategyVO pltPwdStrategy2SmPwdStrategyVO(SmPasswordStrategyForPlatform1 strategyForPlatform1) throws PLException, ParseException {
         SmPasswordStrategyVO strategyVO = new SmPasswordStrategyVO();
         strategyVO.setOid(strategyForPlatform1.getPluid());
         strategyVO.setId("");
@@ -173,9 +176,14 @@
         strategyVO.setLockTime(strategyForPlatform1.getPlocktime());
         strategyVO.setDefaultFlag(strategyForPlatform1.getPlisdefault() == 1);
         strategyVO.setDescription(strategyForPlatform1.getPldesc());
-        strategyVO.setCreateTime(new Date(strategyForPlatform1.getPlcreatetime()));
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        if(Func.isNotEmpty(strategyForPlatform1.getPlcreatetime())){
+            strategyVO.setCreateTime(sdf.parse(strategyForPlatform1.getPlcreatetime()));
+        }
         strategyVO.setCreator(strategyForPlatform1.getPlcreateuser());
-        strategyVO.setLastModifyTime(new Date(strategyForPlatform1.getPlupdatetime()));
+        if(Func.isNotEmpty(strategyForPlatform1.getPlupdatetime())){
+            strategyVO.setLastModifyTime(sdf.parse(strategyForPlatform1.getPlupdatetime()));
+        }
         strategyVO.setLastModifier(strategyForPlatform1.getPlupdateuser());
         strategyVO.setLicensors(strategyForPlatform1.getPllicensors());
         strategyVO.setRequireCharCount(strategyForPlatform1.getPlrequiredtype());
@@ -316,7 +324,7 @@
      * @param conditionMap
      * @return
      */
-    private List<SmPasswordStrategyVO> getPwdStrategyByCondition(Map<String,String> conditionMap) throws PLException {
+    private List<SmPasswordStrategyVO> getPwdStrategyByCondition(Map<String,String> conditionMap) throws Exception {
         if(Func.isEmpty(conditionMap)){
             conditionMap = new HashMap();
         }
@@ -334,7 +342,7 @@
      * @return
      */
     @Override
-    public boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException {
+    public boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws Exception {
         VciBaseUtil.alertNotNull(
                 spsDto,"鏂板鐨勫瘑鐮佺瓥鐣ュ璞�",
                 spsDto.getName(),"绛栫暐鍚嶇О",
@@ -376,7 +384,7 @@
      * @return
      */
     @Override
-    public boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException {
+    public boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws Exception {
         VciBaseUtil.alertNotNull(
                 spsDto,"鏂板鐨勫瘑鐮佺瓥鐣ュ璞�",
                 spsDto.getOid(),"绛栫暐涓婚敭",
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
index 27f98b1..4f00074 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -10,27 +10,21 @@
 import com.vci.pagemodel.*;
 import com.vci.starter.web.annotation.log.VciUnLog;
 import com.vci.starter.web.exception.VciBaseException;
-import com.vci.starter.web.util.BeanUtilForVCI;
-import com.vci.starter.web.util.LangBaseUtil;
-import com.vci.starter.web.util.VciBaseUtil;
-import com.vci.starter.web.util.VciDateUtil;
+import com.vci.starter.web.util.*;
+import com.vci.starter.web.util.Lcm.Func;
 import com.vci.starter.web.wrapper.VciQueryWrapperForDO;
 import com.vci.web.enumpck.UIComponentDisplayTypeEnum;
 import com.vci.web.enumpck.UIComponentTypeEnum;
 import com.vci.web.enumpck.UIFieldTypeEnum;
 import com.vci.web.enumpck.UILayoutAreaTypeEnum;
 import com.vci.web.other.AllActionThreadLocal;
-import com.vci.web.service.OsAttributeServiceI;
-import com.vci.web.service.OsBtmServiceI;
-import com.vci.web.service.UIEngineServiceI;
-import com.vci.web.service.WebBoServiceI;
+import com.vci.web.service.*;
 import com.vci.web.util.PlatformClientUtil;
 import com.vci.web.util.WebUtil;
 import com.vci.web.xmlmodel.UIComponentDefineXO;
 import com.vci.web.xmlmodel.UIComponentDetailXO;
 import com.vci.web.xmlmodel.UIComponentItemXO;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.hdf.extractor.SEP;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -93,10 +87,10 @@
 	private OsAttributeServiceI attrService;
 
 	/**
-	 * 涓氬姟绫诲瀷鐨勬湇鍔�
+	 * UI瀹氫箟绠$悊鏈嶅姟
 	 */
 	@Autowired
-	private WebBoServiceI boService;
+	private UIManagerServiceI uiManagerServiceI;
 
 	/**
 	 * 琛ㄥ崟鐨勫瓧娈电被鍨嬫槧灏�
@@ -874,7 +868,7 @@
 	private List<UIContentVO> UIContentDO2VOs(Collection<PLUILayout> pageLayoutDefinations){
 		List<UIContentVO> contentVOS = new ArrayList<>();
 		Optional.ofNullable(pageLayoutDefinations).orElseGet(()->new ArrayList<PLUILayout>()).stream().forEach(pageLayout->{
-			contentVOS.add(UIContentDO2VO(pageLayout,false));
+			contentVOS.add(UIContentDO2VO(pageLayout,false,null));
 		});
 		if(!CollectionUtils.isEmpty(contentVOS)) {
 			Map<String, List<UILayoutVO>> layoutMap = batchListLayoutByContent(contentVOS.stream().map(UIContentVO::getOid).collect(Collectors.toSet()));
@@ -900,7 +894,7 @@
 	 */
 	@VciUnLog
 	@Override
-	public UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail){
+	public UIContentVO UIContentDO2VO(PLUILayout pageLayoutDefination, boolean queryDetail,Map<String, RoleRightVO> roleRightMap){
 		UIContentVO contentVO = new UIContentVO();
 		if(pageLayoutDefination !=null){
 			contentVO.setOid(pageLayoutDefination.plOId);
@@ -918,14 +912,16 @@
 			contentVO.setLastModifier(pageLayoutDefination.plModifyUser);
 			if(queryDetail){
 				//鏌ヨ鍖呭惈鐨勫唴瀹�
-				List<UILayoutVO> layoutVOS = listLayoutByContent(contentVO.getOid());
+				List<UILayoutVO> layoutVOS = null;
+				//鍒ゆ柇鏄惁鏍规嵁鏉冮檺杩斿洖
+				layoutVOS = listLayoutByContent(contentVO.getOid(),roleRightMap);
 				if(!CollectionUtils.isEmpty(layoutVOS)){
 					if(layoutVOS.size() == 1){
 						//鍙湁涓�涓尯鍩�
 						UILayoutVO layoutVO = layoutVOS.get(0);
 						List<UIComponentVO> componentVOs = layoutVO.getComponentVOs();
 						//绗竴涓綔涓篶enter
-						UIComponentVO firstCompVO = componentVOs.stream().min((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum())).get();
+						UIComponentVO firstCompVO = componentVOs.stream().min(Comparator.comparing(UIComponentVO::getOrderNum)).get();
 						List<UIComponentVO> southCompVO = componentVOs.stream().filter(s->!s.getOid().equals(firstCompVO.getOid())).collect(Collectors.toList());
 
 						UILayoutVO centerVO = new UILayoutVO();
@@ -1014,16 +1010,79 @@
 	//	}
 
 	/**
-	 * 鑾峰彇鏌愪釜UI涓婁笅鏂囩殑鍖哄煙
+	 * 鑾峰彇鏌愪釜UI涓婁笅鏂囩殑鍖哄煙锛屾牴鎹潈闄愭帶鍒惰繑鍥�
 	 * @param pkContent UI涓婁笅鏂囩殑涓婚敭
 	 * @return 涓婁笅鏂�
 	 */
-	private List<UILayoutVO> listLayoutByContent(String pkContent){
+	private List<UILayoutVO> listLayoutByContent(String pkContent,Map<String, RoleRightVO> roleRightMap){
 		try {
-			return UILayoutDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLTabPagesByPageDefinationOId(pkContent)).collect(Collectors.toList()),true);
+			List<PLTabPage> tabPageList = Arrays.stream(platformClientUtil.getUIService().getPLTabPagesByPageDefinationOId(pkContent)).collect(Collectors.toList());
+			//杩囨护鎺夋病鏈夎闂潈闄愮殑UI
+			tabPageList = this.filterTabPageByRoleRight(tabPageList,roleRightMap);
+			return UILayoutDO2VOs(tabPageList,true,roleRightMap);
 		} catch (PLException vciError) {
 			throw WebUtil.getVciBaseException(vciError);
 		}
+	}
+
+	/**
+	 * 鏍规嵁鏉冮檺闆嗗悎杩囨护鎺夋病鏈夎闂潈闄愮殑椤电鏁版嵁
+	 * @param tabPageList
+	 * @param roleRightMap
+	 */
+	private List<PLTabPage> filterTabPageByRoleRight(List<PLTabPage> tabPageList, Map<String, RoleRightVO> roleRightMap){
+		if(Func.isEmpty(roleRightMap) || Func.isEmpty(tabPageList)){
+			return tabPageList;
+		}
+		List<PLTabPage> filterList = new ArrayList<>();
+		for (int i = 0; i < tabPageList.size(); i++) {
+			PLTabPage tabPage = tabPageList.get(i);
+			if(roleRightMap.containsKey(tabPage.plOId)){
+				filterList.add(tabPage);
+			}
+			/*if(roleRightMap.containsKey(tabPage.plContextOId)) {
+				Long rightValue = roleRightMap.get(tabPage.plContextOId).getRightValue();
+				int nodeValue = tabPage.plSeq;
+				if (nodeValue >= 0 && nodeValue <= 63) {
+					//杩涜浣嶄笌鎿嶄綔锛屽鏋滅浉绛夊垯琛ㄧず鍏锋湁褰撳墠鎿嶄綔鐨勬潈闄�
+					long preValue = (rightValue >> nodeValue) & 1;
+					if (preValue != 1) {
+						tabPageList.remove(tabPage);
+					}
+				}
+			}*/
+		}
+		return filterList;
+	}
+
+	/**
+	 * 鏍规嵁鏉冮檺闆嗗悎杩囨护鎺夋病鏈夎闂潈闄愮殑椤甸潰瀹氫箟鏁版嵁
+	 * @param plPageDefinationList
+	 * @param roleRightMap
+	 */
+	private List<PLPageDefination> filterPageDefByRoleRight(List<PLPageDefination> plPageDefinationList, Map<String, RoleRightVO> roleRightMap){
+		if(Func.isEmpty(roleRightMap) || Func.isEmpty(plPageDefinationList)){
+			return plPageDefinationList;
+		}
+		List<PLPageDefination> filterList = new ArrayList<>();
+		for (int i = 0; i < plPageDefinationList.size(); i++) {
+			PLPageDefination plPageDefination = plPageDefinationList.get(i);
+			if(roleRightMap.containsKey(plPageDefination.plOId)){
+				filterList.add(plPageDefination);
+			}
+			/*if(roleRightMap.containsKey(plPageDefination.plTabPageOId)) {
+				Long rightValue = roleRightMap.get(plPageDefination.plTabPageOId).getRightValue();
+				int nodeValue = plPageDefination.seq;
+				if (nodeValue >= 0 && nodeValue <= 63) {
+					//杩涜浣嶄笌鎿嶄綔锛屽鏋滅浉绛夊垯琛ㄧず鍏锋湁褰撳墠鎿嶄綔鐨勬潈闄�
+					long preValue = (rightValue >> nodeValue) & 1;
+					if (preValue != 1) {
+						plPageDefinationList.remove(plPageDefination);
+					}
+				}
+			}*/
+		}
+		return filterList;
 	}
 
 	/**
@@ -1077,7 +1136,7 @@
 	 * @param pages 鍖哄煙鐨勬暟鎹璞�
 	 * @return 鏄剧ず瀵硅薄
 	 */
-	private List<UILayoutVO> UILayoutDO2VOs(Collection<PLTabPage> pages, boolean queryDetail){
+	private List<UILayoutVO> UILayoutDO2VOs(Collection<PLTabPage> pages, boolean queryDetail, Map<String, RoleRightVO> roleRightMap){
 		List<UILayoutVO> contentVOS = new ArrayList<>();
 		Map<String, OsAttributeVO> attributeVOMap;
 		if(pages != null && pages.size() > 0){
@@ -1091,7 +1150,7 @@
 			attributeVOMap = null;
 		}
 		Optional.ofNullable(pages).orElseGet(()->new ArrayList<PLTabPage>()).stream().forEach(page->{
-			UILayoutVO layoutVO = UILayoutDO2VO(page, queryDetail,attributeVOMap);
+			UILayoutVO layoutVO = UILayoutDO2VO(page, queryDetail,attributeVOMap,roleRightMap);
 			if(layoutVO.isEnableStatus()) {
 				contentVOS.add(layoutVO);
 			}
@@ -1115,7 +1174,7 @@
 	 * @return 鍖哄煙鐨勬樉绀哄璞�
 	 */
 	@VciUnLog
-	private UILayoutVO UILayoutDO2VO(PLTabPage page, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap){
+	private UILayoutVO UILayoutDO2VO(PLTabPage page, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap, Map<String, RoleRightVO> roleRightMap){
 		UILayoutVO layoutVO = new UILayoutVO();
 		if(page !=null ){
 			layoutVO.setOid(page.plOId);
@@ -1155,7 +1214,10 @@
 			if(queryDetail){
 				//鍗曚釜鐨勶紝鐩存帴鑾峰彇
 				try {
-					layoutVO.setComponentVOs(uiComponentDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLPageDefinationsByPageContextOId(layoutVO.getOid())).collect(Collectors.toList()),true,attributeVOMap));
+					List<PLPageDefination> pageDefinationList = Arrays.stream(platformClientUtil.getUIService().getPLPageDefinationsByPageContextOId(layoutVO.getOid())).collect(Collectors.toList());
+					pageDefinationList = this.filterPageDefByRoleRight(pageDefinationList,roleRightMap);
+					List<UIComponentVO> uiComponentVOS = uiComponentDO2VOs(pageDefinationList, true, attributeVOMap,roleRightMap);
+					layoutVO.setComponentVOs(uiComponentVOS);
 				} catch (PLException vciError) {
 					throw WebUtil.getVciBaseException(vciError);
 				}
@@ -1163,6 +1225,7 @@
 		}
 		return layoutVO;
 	}
+
 	/**
 	 * 鏌ヨ鎵�鏈夌殑涓婁笅鏂囩殑鍖哄煙鐨勬槧灏�
 	 *
@@ -1200,7 +1263,7 @@
 			return null;
 		}
 		try {
-			return uiComponentDO2VO(platformClientUtil.getUIService().getPLPageDefinationById(componentOid),true,attributeVOMap);
+			return uiComponentDO2VO(platformClientUtil.getUIService().getPLPageDefinationById(componentOid),true,attributeVOMap,null);
 		} catch (PLException vciError) {
 			throw WebUtil.getVciBaseException(vciError);
 		}
@@ -1224,10 +1287,10 @@
 	 * @param pages 鏁版嵁瀵硅薄
 	 * @return 鏄剧ず瀵硅薄
 	 */
-	private List<UIComponentVO> uiComponentDO2VOs(Collection<com.vci.corba.portal.data.PLPageDefination> pages, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap){
+	private List<UIComponentVO> uiComponentDO2VOs(Collection<PLPageDefination> pages, boolean queryDetail,Map<String, OsAttributeVO> attributeVOMap, Map<String, RoleRightVO> roleRightMap){
 		List<UIComponentVO> componentVOS = new ArrayList<>();
 		pages.stream().forEach(page->{
-			componentVOS.add(uiComponentDO2VO(page,queryDetail,attributeVOMap));
+			componentVOS.add(uiComponentDO2VO(page,queryDetail,attributeVOMap,roleRightMap));
 		});
 		return componentVOS;
 	}
@@ -1238,7 +1301,7 @@
 	 * @return 鏄剧ず瀵硅薄
 	 */
 	@VciUnLog
-	private UIComponentVO uiComponentDO2VO(PLPageDefination page, boolean queryDetail, Map<String, OsAttributeVO> attributeVOMap){
+	private UIComponentVO uiComponentDO2VO(PLPageDefination page, boolean queryDetail, Map<String, OsAttributeVO> attributeVOMap, Map<String, RoleRightVO> roleRightMap){
 		UIComponentVO componentVO = new UIComponentVO();
 		if(page !=null){
 			componentVO.setOid(page.plOId);
@@ -1379,7 +1442,7 @@
 				treeDefineVO.setBtmType(componentDefineXO.getShowType());
 				treeDefineVO.setLinkType(componentDefineXO.getLinkType());
 				treeDefineVO.setLoadType("1".equalsIgnoreCase(componentDefineXO.getExpandMode())?"node":"all");
-				//TODO:杩欎釜灞炴�х幇鍦ㄧ敱閾炬帴绫诲瀷鏌ヨ鎺у埗锛屼笉鐢遍〉闈㈠畾涔夋帶鍒朵簡
+				//TODO:杩欎釜灞炴�х幇鍦ㄧ敱閾炬帴绫诲瀷鏌ヨ妯℃澘閰嶇疆涓婃帶鍒讹紝涓嶅湪椤甸潰瀹氫箟鎺у埗浜�
 				//treeDefineVO.setOrientation("positive".equalsIgnoreCase(componentDefineXO.getOrientation())?false:true);
 				treeDefineVO.setShowImage("1".equalsIgnoreCase(componentDefineXO.getIsShowImage())?true:false);
 				treeDefineVO.setRootContent(componentDefineXO.getRootContent());
@@ -1405,34 +1468,30 @@
 			}
 			componentVO.setUiParseClass(componentDefineXO.getUIParser());
 			componentVO.setExtendAttr(componentDefineXO.getExtAttr());
-			componentVO.setButtons(listButtonByComponent(componentVO.getOid()));
+			componentVO.setButtons(listButtonByComponent(componentVO.getOid(),roleRightMap));
 		}
 		return componentVO;
 	}
 
 	/**
-	 * 鑾峰彇鏌愪釜缁勪欢鐨勬寜閽�
+	 * 鑾峰彇鏌愪釜缁勪欢鐨勬寜閽�(鏍规嵁鏉冮檺杩囨护)
 	 * @param pkComponent 缁勪欢鐨勪富閿�
 	 * @return 鎸夐挳鐨勪俊鎭�
 	 */
 	@Override
-	public List<UIButtonDefineVO> listButtonByComponent(String pkComponent){
+	public List<UIButtonDefineVO> listButtonByComponent(String pkComponent, Map<String, RoleRightVO> roleRightMap){
 		try {
 			List<UIButtonDefineVO> buttonDefineVOS = buttonDO2VOs(Arrays.stream(platformClientUtil.getUIService().getPLTabButtonsByTableOId(pkComponent)).collect(Collectors.toSet())).stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList());
-
-			Map<String,RoleRightInfo> allRightRoleMap = new HashMap<>();
-			RoleRightInfo[] bts = platformClientUtil.getFrameworkService().getRoleRightByUserName("bt");
-			Map<String,Long> rightMap = new HashMap<String,Long>();
-			for(RoleRightInfo obj:bts){
-				allRightRoleMap.put(obj.funcId, obj);
-				rightMap.put(obj.funcId,obj.rightValue);
+			if(Func.isEmpty(roleRightMap)){
+				roleRightMap = uiManagerServiceI.getRoleRightMap(null);
 			}
+
 			//寰幆瀵规寜閽潈闄愯繘琛屽垽鏂紝娌℃湁鏉冮檺鐨勫皢绉婚櫎buttonDefineVOS瀵硅薄
 			Iterator<UIButtonDefineVO> buttonDefineVO = buttonDefineVOS.iterator();
 			while (buttonDefineVO.hasNext()){
 				UIButtonDefineVO buttonDefine = buttonDefineVO.next();
-				if(rightMap.containsKey(buttonDefine.getPkComponent())) {
-					Long rightValue = rightMap.get(buttonDefine.getPkComponent());
+				if(roleRightMap.containsKey(buttonDefine.getPkComponent())) {
+					Long rightValue = roleRightMap.get(buttonDefine.getPkComponent()).getRightValue();
 					int nodeValue = buttonDefine.getOrderNum();
 					if (nodeValue >= 0 && nodeValue <= 63) {
 						//杩涜浣嶄笌鎿嶄綔锛屽鏋滅浉绛夊垯琛ㄧず鍏锋湁褰撳墠鎿嶄綔鐨勬潈闄�
@@ -1469,7 +1528,7 @@
 	 * @return 鏄剧ず瀵硅薄
 	 */
 	@Override
-	public List<UIButtonDefineVO> buttonDO2VOs(Collection<com.vci.corba.portal.data.PLTabButton> buttons){
+	public List<UIButtonDefineVO> buttonDO2VOs(Collection<PLTabButton> buttons){
 		List<UIButtonDefineVO> buttonDefineVOS = new ArrayList<>();
 		if(buttons != null && buttons.size() > 0){
 //			Map<String, UIActionVO> actionVOMap = self.selectAllActionMap();
@@ -1493,7 +1552,7 @@
 	 * @return 鏄剧ず瀵硅薄
 	 */
 	@Override
-	public UIButtonDefineVO buttonDO2VO(com.vci.corba.portal.data.PLTabButton button, Map<String, UIActionVO> actionVOMap)  {
+	public UIButtonDefineVO buttonDO2VO(PLTabButton button, Map<String, UIActionVO> actionVOMap)  {
 		UIButtonDefineVO buttonVO = new UIButtonDefineVO();
 //		Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction();
 		if(button !=null){
@@ -1587,7 +1646,7 @@
 	 * @return UI涓婁笅鏂囩殑淇℃伅
 	 */
 	@Override
-	public UIContentVO getUIContentByBtmTypeAndId(String btmType, String id) {
+	public UIContentVO getUIContentByBtmTypeAndId(String btmType, String id) throws PLException {
 		WebUtil.alertNotNull(btmType,"涓氬姟绫诲瀷鎴栬�呴摼鎺ョ被鍨�",id,"UI涓婁笅鏂囩殑缂栧彿");
 		PLUILayout[] obj = null;
 		try {
@@ -1595,6 +1654,10 @@
 		} catch (PLException vciError) {
 			throw WebUtil.getVciBaseException(vciError);
 		}
+		// 1銆佹牴鎹綋鍓嶈鑹插垽鏂槸绠$悊浜哄憳杩樻槸鏅�氱敤鎴凤紙姝e父鏉ヨ鍙湁鏅�氱敤鎴锋墠浼氱敤鍒拌鏌ヨ鎺ュ彛锛�
+		Map<String, RoleRightVO> roleRightMap = uiManagerServiceI.getRoleRightMap(null);
+		// 2銆佹寜鐓у綋鍓嶇櫥褰曠敤鎴锋煡璇㈡潈闄愶紙鍔熻兘鏉冮檺鍜孶I鎺堟潈鐨勬巿鏉冧俊鎭兘鏄斁鍦ㄥ悓涓�寮犺〃閲岀殑锛�
+		// 3銆佹壘鍑哄綋鍓嶈鏌ヨ鐨刄I涓婁笅鏂�
 		PLUILayout context = null;
 		for (int i = 0; i < obj.length; i++) {
 			if (obj[i].plCode.equals(id)) {
@@ -1602,7 +1665,9 @@
 				break;
 			}
 		}
-		return UIContentDO2VO(context,true);
+		// 4銆佹瘡涓�涓彍鍗曟煡璇㈢殑閮芥槸涓�涓猆I涓婁笅鏂囷紝鎵�浠I涓婁笅鏂囨槸鏈夊姛鑳芥巿鏉冩帶鍒剁殑锛屽彧闇�瑕佹帶鍒跺悗闈㈢殑椤电銆侀〉闈€�佹寜閽殑鏉冮檺銆�
+		return UIContentDO2VO(context, true,roleRightMap);
 	}
+
 }
 
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
index 769c3ae..9d6944e 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -45,7 +45,7 @@
 import java.util.stream.Collectors;
 
 /**
- * UI瀹氫箟鏈嶅姟鐣岄潰鐩稿叧鎺ュ彛
+ * UI瀹氫箟绠$悊鏈嶅姟鐣岄潰鐩稿叧鎺ュ彛
  * @author ludc
  * @date 2024/8/28 17:05
  */
@@ -1696,10 +1696,7 @@
         boolean showCheckBox = Boolean.parseBoolean(conditionMap.get("showCheckBox"));
         Map<String,RoleRightVO> roleRightVOMap = new HashMap<>();
         if(StringUtils.isNotBlank(roleId)){
-            String userName = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
-            RoleRightInfo[] rightInfos = platformClientUtil.getFrameworkService().getRoleRightList(roleId,userName);
-            List<RoleRightVO> roleRightVOList = roleRightDOO2VOS(Arrays.asList(rightInfos));
-            roleRightVOMap = roleRightVOList.stream().collect(Collectors.toMap(RoleRightVO::getFuncId,roleRightVO ->roleRightVO,(oldValue,newOldValue)->oldValue));
+            roleRightVOMap = this.getRoleRightMap(roleId);
         }
         BizType[] bizTypes = osBtmServiceI.getBizTypes(type);
         List<Tree> treeList=new ArrayList<>();
@@ -1709,7 +1706,6 @@
         rootNode.setExpanded(true);
         List<Tree> childList=new ArrayList<>();
 
-        //long startTime = System.currentTimeMillis();
         uiDataFetcher = new UIDataFetcher();
         for (int i = 0; i < bizTypes.length; i++) {
             Tree bizTypeTree = new Tree(bizTypes[i].oid,bizTypes[i].name,bizTypes[i]);//(btmItems[i].label+" ["+ btmItems[i].name+"]", btmItems[i]);
@@ -1718,18 +1714,12 @@
             bizTypeTree.setParentId(rootNode.getOid());
             bizTypeTree.setParentName(rootNode.getText());
             bizTypeTree.setParentBtmName(bizTypes[i].name);
-            //long startTime1 = System.currentTimeMillis();
             List<PLUILayout> contextList = uiDataFetcher.getContext(bizTypes[i].name/*+context*/);
-            //long endTime1 = System.currentTimeMillis();
-            //System.out.println("============================================鑾峰彇UI瀹氫箟鏁版嵁寮曟搸鑰楁椂锛�"+((endTime1-startTime1)/1000)+"s");
-
             List<Tree> btmChildList = new ArrayList<>();
             btmChildList.add(bizTypeTree);
             setChildNode(btmChildList,contextList,roleRightVOMap,showCheckBox);
             childList.add(bizTypeTree);
         }
-        //long endTime = System.currentTimeMillis();
-        //System.out.println("============================================UI瀹氫箟鏍戣绠楀畬姣曡�楁椂锛�"+((endTime-startTime)/1000)+"s");
         rootNode.setChildren(childList);
         treeList.add(rootNode);
         return treeList;
@@ -1737,21 +1727,25 @@
 
     /**
      * 鏍规嵁瑙掕壊涓婚敭鑾峰彇宸叉巿鏉冪殑淇℃伅
-     * @param roleId
+     * @param roleId 濡傛灉roleId涓嶄紶锛屽氨浼氳幏鍙栧綋鍓嶇櫥褰曠殑鐢ㄦ埛鐨勫悕绉版煡璇㈡潈闄�
      * @return
      * @throws PLException
      */
-    /*    @Override
-        public Map<String,RoleRightVO> getRightListByRoleId(String roleId) throws PLException {
-            VciBaseUtil.alertNotNull(roleId,"鏌ヨ鏉′欢瑙掕壊涓婚敭");
-            String userName = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
-            RoleRightInfo[] rightInfos= platformClientUtil.getFrameworkService().getRoleRightList(roleId,userName);
-            List<RoleRightVO> roleRightVOList = roleRightDOO2VOS(Arrays.asList(rightInfos));
-            Map<String,RoleRightVO> roleRightVOMap = roleRightVOList.stream().collect(Collectors.toMap(RoleRightVO::getFuncId,roleRightVO ->roleRightVO,(oldValue,newOldValue)->oldValue));
-            return roleRightVOMap;
-        }*/
+    @Override
+    public Map<String,RoleRightVO> getRoleRightMap(String roleId) throws PLException {
+        RoleRightInfo[] rightInfos = null;
+        String userName = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId();
+        if(Func.isBlank(roleId)){
+            rightInfos = platformClientUtil.getFrameworkService().getRoleRightByUserName(userName);
+        }else{
+            rightInfos = platformClientUtil.getFrameworkService().getRoleRightList(roleId,userName);
+        }
+        List<RoleRightVO> roleRightVOList = roleRightDOO2VOS(Arrays.asList(rightInfos));
+        Map<String,RoleRightVO> roleRightVOMap = roleRightVOList.stream().collect(Collectors.toMap(RoleRightVO::getFuncId,roleRightVO ->roleRightVO,(oldValue,newOldValue)->oldValue));
+        return roleRightVOMap;
+    }
 
-    /***
+    /**
      * UI鎺堟潈
      * @param uiAuthorDTO
      * @return
@@ -2229,7 +2223,7 @@
                 String id = plTabButton.plTableOId;
                 if(roleRightVOMap.containsKey(id)){
                     RoleRightVO roleRightVO = roleRightVOMap.get(id);
-                    Long rightValue =  roleRightVO.getRightValue();
+                    Long rightValue = roleRightVO.getRightValue();
                     int nodeValue = plTabButton.plSeq;
                     if (nodeValue >= 0 && nodeValue <= 63) {
                         long preValue = (rightValue >> nodeValue) & 1;
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java
index 309a647..33920a1 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/uidataservice/impl/UIDataCommonServiceImpl.java
@@ -154,9 +154,9 @@
         if(Func.isNotEmpty(dataGridQuery.getSourceData())){
             dataGridQuery.setSourceData(this.convertMapValueJson2Map(dataGridQuery.getSourceData()));
         }
-        //鍏堝垽鏂煡璇㈡ā鏉挎槸鍚﹂厤缃簡鑷畾涔夋煡璇㈢被
         UIComponentVO componentVO = uiEngineService.getComponentByOid(dataGridQuery.getComponentOid(), null);
         UITableDefineVO tableDefineVO = componentVO.getTableDefineVO();
+        //鍏堝垽鏂煡璇㈡ā鏉挎槸鍚﹂厤缃簡鑷畾涔夋煡璇㈢被
         String bsCustQueryCLsOrUrl = componentVO.getBsDataModel()   ;
         // TODO: 2024/12/5 Ludc 鏍规嵁UI閰嶇疆鐨勮繘琛屽垽鏂槸鍚︿娇鐢ㄨ嚜瀹氫箟绫昏繘琛屾煡璇�(鑷畾涔夌被鏌ヨ鏂瑰紡浼樺厛绾ч珮浜庢煡璇㈡ā鏉�)
         if(Func.isNotBlank(bsCustQueryCLsOrUrl) && isCustomClass(bsCustQueryCLsOrUrl)){

--
Gitblit v1.9.3