| | |
| | | @Override |
| | | public Page<AllocationPageExt> extPage(AllocationPageCond allocationPageCond) { |
| | | List<Integer> unitList = unitResult(); |
| | | Integer codeId = unitAreaCode(); |
| | | allocationPageCond.setUnitList(unitList); |
| | | return this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond); |
| | | Page<AllocationPageExt> page = this.baseMapper.extPage(allocationPageCond.getPage().convertPage(), allocationPageCond); |
| | | if(CollectionUtils.isNotEmpty(page.getRecords())){ |
| | | page.getRecords().forEach(it->{ |
| | | if((CollectionUtils.isEmpty(unitList)&&codeId.equals(1))||codeId.equals(2)){ |
| | | it.setIsApprove(1); |
| | | }else { |
| | | it.setIsApprove(0); |
| | | } |
| | | }); |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | return Arrays.asList(0); |
| | | } |
| | | |
| | | @Override |
| | | public Integer unitAreaCode() { |
| | | QxUser user = UserHelper.getCurrentUser(); |
| | | List<Integer> userList = responsibilityUnitMapper.selectCodeList("JBD",user.getUserId()); |
| | | if(CollectionUtils.isNotEmpty(userList)){ |
| | | return 1; |
| | | } |
| | | if(Objects.nonNull(user.getUnitId())){ |
| | | String code = responsibilityUnitMapper.selectAreaCode(user.getUnitId()); |
| | | if(code.length()>6){ |
| | | return 0; |
| | | }else { |
| | | return 2; |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | } |