| | |
| | | String sql = "select f.ploid from plfunction f where lower(f.plmoduleno) = :functionId"; |
| | | Map<String,String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("functionId",functionId.toLowerCase(Locale.ROOT).trim()); |
| | | List<ClientBusinessObject> functionCbos = boService.queryBySql(sql, conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> functionCbos = boService.queryBySql(sql, conditionMap); |
| | | if(CollectionUtils.isEmpty(functionCbos)){ |
| | | //都没有这个功能 |
| | | return new ArrayList<>(); |
| | |
| | | sql = "select rf.plrightvalue from PLROLERIGHT rf left join pluserrole ur on rf.plroleoid = ur.plroleuid " + |
| | | " where ur.pluseruid =:useroid and rf.plfuncoid = :functionOid"; |
| | | conditionMap.put("useroid",VciBaseUtil.getCurrentUserOid()); |
| | | List<ClientBusinessObject> cbos = boService.queryBySql(sql, conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> cbos = boService.queryBySql(sql, conditionMap); |
| | | if(CollectionUtils.isEmpty(cbos)){ |
| | | //没有授权 |
| | | return new ArrayList<>(); |
| | |
| | | //获取具体包含哪些按钮 |
| | | sql = "select o.ploperoid,o.plno from PLFUNCOPERATION o where o.plfuncoid = :functionOid "; |
| | | conditionMap.remove("useroid"); |
| | | List<ClientBusinessObject> operationLinkCbos = boService.queryBySql(sql, conditionMap); |
| | | List<com.vci.client.bof.ClientBusinessObject> operationLinkCbos = boService.queryBySql(sql, conditionMap); |
| | | if(CollectionUtils.isEmpty(operationLinkCbos)){ |
| | | //根本没有按钮 |
| | | return new ArrayList<>(); |
| | |
| | | return new ArrayList<>(); |
| | | } |
| | | sql = "select ploid as oid,plname,pluniqueflag,pldesc,plalias,plsequence from ploperation where ploid in (" + VciBaseUtil.toInSql(hasRightOids.toArray(new String[0])) + ")"; |
| | | List<ClientBusinessObject> opertionCBOs = boService.queryBySql(sql, new HashMap<>()); |
| | | List<com.vci.client.bof.ClientBusinessObject> opertionCBOs = boService.queryBySql(sql, new HashMap<>()); |
| | | List<SmOperationVO> operationVOS = new ArrayList<>(); |
| | | Optional.ofNullable(opertionCBOs).orElseGet(()->new ArrayList<>()).stream().forEach(cbo->{ |
| | | SmOperationVO operationVO = new SmOperationVO(); |