From af7122a81386da90cb04207e6ea83aa550088861 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 18 十月 2024 10:05:52 +0800 Subject: [PATCH] 代码提交 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) 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 bbca258..2301d4a 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 @@ -1693,17 +1693,17 @@ if (conditionMap == null) { conditionMap = new HashMap<>(); } - //String roleId = StringUtils.isBlank(conditionMap.get("roleId")) ? "" : conditionMap.get("roleId"); + String roleId = StringUtils.isBlank(conditionMap.get("roleId")) ? "" : conditionMap.get("roleId"); String type = StringUtils.isBlank(conditionMap.get("type")) ? "" : conditionMap.get("type"); - //String context = StringUtils.isBlank(conditionMap.get("context")) ? "" : conditionMap.get("context"); + String context = StringUtils.isBlank(conditionMap.get("context")) ? "" : conditionMap.get("context"); boolean showCheckBox = Boolean.parseBoolean(conditionMap.get("showCheckBox")); - /*Map<String,RoleRightVO> roleRightVOMap=new HashMap<>(); + 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)); - }*/ + } BizType[] bizTypes=osBtmServiceI.getBizTypes(type); List<Tree> treeList=new ArrayList<>(); Tree rootNode =new Tree("root","鍔熻兘妯″潡","root"); @@ -1729,7 +1729,7 @@ List<Tree> btmChildList = new ArrayList<>(); btmChildList.add(bizTypeTree); - setChildNode(btmChildList,contextList/*,roleRightVOMap*/,showCheckBox); + setChildNode(btmChildList,contextList,roleRightVOMap,showCheckBox); childList.add(bizTypeTree); } //long endTime = System.currentTimeMillis(); @@ -1745,14 +1745,15 @@ * @return * @throws PLException */ - @Override - public List<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)); - return roleRightVOList; - } + /* @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; + }*/ /*** * UI鎺堟潈 @@ -2125,7 +2126,7 @@ * @param contextList * @param isShowCheckBox */ - private void setChildNode(List<Tree> parentTree, List<PLUILayout>contextList, boolean isShowCheckBox){ + private void setChildNode(List<Tree> parentTree, List<PLUILayout>contextList,Map<String,RoleRightVO> roleRightVOMap, boolean isShowCheckBox){ Optional.ofNullable(parentTree).orElseGet(()->new ArrayList<>()).stream().forEach(pTree -> { Object funcObj = pTree.getData(); List<Tree> chiledTreeList = new ArrayList<>(); @@ -2143,7 +2144,7 @@ pTree.setChildren(chiledTreeList); } if(!CollectionUtil.isEmpty(chiledTreeList)) { - setChildNode(chiledTreeList, contextList, isShowCheckBox); + setChildNode(chiledTreeList, contextList,roleRightVOMap, isShowCheckBox); } }else if (funcObj instanceof PLUILayout){//UI PLUILayout context = (PLUILayout) funcObj; @@ -2160,7 +2161,7 @@ }); } if(!CollectionUtil.isEmpty(chiledTreeList)) { - setChildNode(chiledTreeList, contextList, isShowCheckBox); + setChildNode(chiledTreeList, contextList,roleRightVOMap, isShowCheckBox); } pTree.setChildren(chiledTreeList); }else if (funcObj instanceof PLTabPage) {//涓婁笅鏂� @@ -2179,7 +2180,7 @@ pTree.setChildren(chiledTreeList); } if(!CollectionUtil.isEmpty(chiledTreeList)) { - setChildNode(chiledTreeList, contextList, isShowCheckBox); + setChildNode(chiledTreeList, contextList,roleRightVOMap, isShowCheckBox); } }else if (funcObj instanceof PLPageDefination) { PLPageDefination plPageDefination = (PLPageDefination) funcObj; @@ -2198,9 +2199,9 @@ pTree.setChildren(chiledTreeList); } if(!CollectionUtil.isEmpty(chiledTreeList)) { - setChildNode(chiledTreeList, contextList, isShowCheckBox); + setChildNode(chiledTreeList, contextList,roleRightVOMap, isShowCheckBox); } - }/*else if (funcObj instanceof PLTabButton) {//鎸夐挳 + }else if (funcObj instanceof PLTabButton) {//鎸夐挳 PLTabButton plTabButton = (PLTabButton) funcObj; String id = plTabButton.plTableOId; if(roleRightVOMap.containsKey(id)){ @@ -2216,7 +2217,7 @@ }else{ pTree.setChecked(false); } - }*/ + } }); } -- Gitblit v1.9.3