| | |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.frameworkcore.model.SmFunctionForPlatform1; |
| | | import com.vci.frameworkcore.model.SmRoleForPlatform1; |
| | | import com.vci.frameworkcore.pagemodel.MenuVO; |
| | | import com.vci.frameworkcore.pagemodel.SmFunctionVO; |
| | | import com.vci.model.SmFunctionForPlatform1; |
| | | import com.vci.model.SmRoleForPlatform1; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.pageModel.UIContentVO; |
| | | import com.vci.pagemodel.UIContentVO; |
| | | import com.vci.web.service.UIEngineServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | |
| | | Map<String, List<FunctionInfo>> map = rightControlUtil.getAllChildrenFunctionsByUserName( |
| | | parentId, sessionInfo.getUserId(), userRoleRights); |
| | | List<MenuVO> functionVOList = new ArrayList<>(); |
| | | if(CollectionUtils.isEmpty(map.get(parentId))){ |
| | | return functionVOList; |
| | | } |
| | | for (FunctionInfo menu : map.get(parentId)) { |
| | | if(!menu.isValid){ |
| | | continue; |
| | |
| | | MenuVO functionVO = new MenuVO(); |
| | | functionVO.setId(menu.id); |
| | | functionVO.setSource(menu.image); |
| | | if(StringUtils.isBlank(menu.resourceB)){ |
| | | continue; |
| | | } |
| | | // if(StringUtils.isBlank(menu.resourceB)){ |
| | | // continue; |
| | | // } |
| | | functionVO.setPath(menu.resourceB); |
| | | functionVO.setParentId(menu.parentId); |
| | | functionVO.setCode(menu.aliasName); |
| | |
| | | functionVO.setName(menu.name); |
| | | functionVO.getMeta().put("keepAlive",false); |
| | | functionVO.setSort((int) menu.seq); |
| | | functionVO.setChildren(findChildFunctionVO(menu.id)); |
| | | functionVO.setChildren(findChildFunctionVO(menu.id, map)); |
| | | if(functionVO.getChildren().size() > 0){ |
| | | functionVO.setHasChildren(true); |
| | | }else { |
| | |
| | | return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public List<MenuVO> findChildFunctionVO(String parentOid) throws PLException { |
| | | FunctionInfo[] menus = platformClientUtil.getFrameworkService().getModuleListByParentId(parentOid, true); |
| | | public List<MenuVO> findChildFunctionVO(String parentOid,Map<String, List<FunctionInfo>> map) throws PLException { |
| | | List<FunctionInfo> menus = map.get(parentOid); |
| | | List<MenuVO> functionVOList = new ArrayList<>(); |
| | | if(menus == null){ |
| | | return functionVOList; |
| | | } |
| | | for (FunctionInfo menu : menus) { |
| | | if(!menu.isValid){ |
| | | continue; |
| | |
| | | MenuVO functionVO = new MenuVO(); |
| | | functionVO.setId(menu.id); |
| | | functionVO.setSource(menu.image); |
| | | if(StringUtils.isBlank(menu.resourceB) ){ |
| | | continue; |
| | | } |
| | | // if(StringUtils.isBlank(menu.resourceB) ){ |
| | | // continue; |
| | | // } |
| | | functionVO.setPath(menu.resourceB); |
| | | functionVO.setCode(menu.aliasName); |
| | | functionVO.setAlias(menu.aliasName); |
| | |
| | | functionVO.setName(menu.name); |
| | | functionVO.getMeta().put("keepAlive",false); |
| | | functionVO.setSort((int) menu.seq); |
| | | functionVO.setChildren(findChildFunctionVO(menu.id)); |
| | | functionVO.setChildren(findChildFunctionVO(menu.id,map)); |
| | | if(functionVO.getChildren().size() > 0){ |
| | | functionVO.setHasChildren(true); |
| | | }else { |
| | |
| | | conditionMap.put(key,value); |
| | | }); |
| | | conditionMap.put("ploid", notIn ? QueryOptionConstant.NOTIN : QueryOptionConstant.IN + "select plfuncoid from plroleright where plroleoid in (" + WebUtil.toInSql(roleOids.toArray(new String[0])) + ")"); |
| | | VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(conditionMap,SmRoleForPlatform1.class); |
| | | VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(conditionMap, SmRoleForPlatform1.class); |
| | | List<SmFunctionForPlatform1> functionForPlatform1s = boService.selectByQueryWrapper(queryWrapper, SmFunctionForPlatform1.class); |
| | | if(!CollectionUtils.isEmpty(functionForPlatform1s)){ |
| | | functions.addAll(functionForPlatform1s); |