| | |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 1){ |
| | | List<TBranchOfficeArea> branchOfficeAreaList = branchOfficeAreaService.selectList(new EntityWrapper<TBranchOfficeArea>()); |
| | | List<TBranchOffice> branchOffices = branchOfficeService.selectList(new EntityWrapper<TBranchOffice>().eq("status", 1)); |
| | | List<Integer> collect = new ArrayList<>(); |
| | | if(branchOffices.size() == 0){ |
| | | collect.add(-1); |
| | | }else{ |
| | | collect = branchOffices.stream().map(TBranchOffice::getId).collect(Collectors.toList()); |
| | | } |
| | | List<TBranchOfficeArea> branchOfficeAreaList = branchOfficeAreaService.selectList(new EntityWrapper<TBranchOfficeArea>().in("branchOfficeId", collect)); |
| | | if(CollectionUtils.isEmpty(branchOfficeAreaList)){ |
| | | model.addAttribute("provinceList",new ArrayList<>()); |
| | | } |