| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.client.common.providers.ServiceProvider; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.VCIError; |
| | | import com.vci.corba.framework.data.FunctionInfo; |
| | | import com.vci.corba.portal.data.PLTabPage; |
| | |
| | | * @return 菜单,包含上下级 |
| | | */ |
| | | @Override |
| | | public List<MenuVO> treeCurrentUserMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws VCIError { |
| | | public List<MenuVO> treeCurrentUserMenu(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException { |
| | | SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException(); |
| | | // if(sessionInfo == null || CollectionUtils.isEmpty(sessionInfo.getFunctionOids())){ |
| | | // return new ArrayList<Tree>(); |
| | |
| | | // PortalServicePrx uiService = ServiceProvider.getUIService(); |
| | | // FrameworkServicePrx frameService = ServiceProvider.getFrameService(); |
| | | FunctionInfo[] menus = ServiceProvider.getFrameService().getModuleListByParentId("modelManagmentNode", true); |
| | | // FunctionInfo[] menus = ServiceProvider.getFrameService().("modelManagmentNode", true); |
| | | |
| | | // PLAction[] allPLAction = uiService.getAllPLAction(); |
| | | List<MenuVO> functionVOList = new ArrayList<>(); |
| | |
| | | return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public List<MenuVO> findChildFunctionVO(String parentOid) throws VCIError { |
| | | public List<MenuVO> findChildFunctionVO(String parentOid) throws PLException { |
| | | FunctionInfo[] menus = ServiceProvider.getFrameService().getModuleListByParentId(parentOid, true); |
| | | List<MenuVO> functionVOList = new ArrayList<>(); |
| | | for (FunctionInfo menu : menus) { |
| | |
| | | |
| | | |
| | | @Override |
| | | public UIContentVO getUIContentByBtmTypeAndId(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws VCIError { |
| | | public UIContentVO getUIContentByBtmTypeAndId(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException { |
| | | SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException(); |
| | | // if(sessionInfo == null || CollectionUtils.isEmpty(sessionInfo.getFunctionOids())){ |
| | | // return new ArrayList<Tree>(); |
| | |
| | | if(!CollectionUtils.isEmpty(functionVOS)){ |
| | | functionVOList.addAll(functionVOS); |
| | | String sql = "select plfuncoid,plroleoid from plroleright where plroleoid in (" + WebUtil.toInSql(roleOids.toArray(new String[0])) + ")"; |
| | | List<ClientBusinessObject> cbos = boService.queryBySql(sql, null); |
| | | List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, null); |
| | | if(!CollectionUtils.isEmpty(cbos)){ |
| | | cbos.stream().forEach(cbo->{ |
| | | String roleOid = cbo.getAttributeValue("plroleoid"); |