| | |
| | | String state = allocation.getState()+""; |
| | | if (state.equals("40")||state.equals("50")){ |
| | | complete++; |
| | | }else if(state.equals("10")||state.equals("20") ||state.equals("30")) { |
| | | }else { |
| | | unComplete++; |
| | | } |
| | | } |
| | |
| | | rsMap.put("unitView",allocationUnitViewDtos); |
| | | //总数 |
| | | rsMap.put("total",allocations.size()); |
| | | //完成数 |
| | | //已完成 |
| | | rsMap.put("complete",complete); |
| | | //未完成数 |
| | | //进行中 |
| | | rsMap.put("unComplete",unComplete); |
| | | //预期 |
| | | rsMap.put("overdue",overdue); |
| | |
| | | @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; |
| | | } |
| | | } |