| | |
| | | public R queryByPage(PageComPbCheckUnitDto comPbCheckUnit) { |
| | | |
| | | Long communityId = comPbCheckUnit.getCommunityId(); |
| | | if (communityId != null){ |
| | | List<Long> communityIds = comPbMemberDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | comPbCheckUnit.setCommunityIds(communityIds); |
| | | } |
| | | IPage<ComPbCheckUnitVo> checkUnitVoPage= this.baseMapper.queryAllByLimit(comPbCheckUnit, new Page(comPbCheckUnit.getPageNum(), comPbCheckUnit.getPageSize())); |
| | | checkUnitVoPage.getRecords().forEach(checkUnit -> { |
| | | if(StringUtils.isEmpty(checkUnit.getOrgName())){ |
| | |
| | | @Override |
| | | public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) { |
| | | Long communityId = comPbCheckUnit.getCommunityId(); |
| | | if (communityId != null){ |
| | | List<Long> communityIds = comPbMemberDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | comPbCheckUnit.setCommunityIds(communityIds); |
| | | } |
| | | IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize())); |
| | | checkUnitList.getRecords().forEach(checkUnit -> { |
| | | if(StringUtils.isEmpty(checkUnit.getOrgName())){ |
| | |
| | | */ |
| | | @Override |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice) { |
| | | List<Long> communityIds = comPbMemberDAO.selectIds(communityId); |
| | | List<Long> communityIds = new ArrayList<>(); |
| | | if (null != communityId){ |
| | | communityIds = comPbMemberDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | } |
| | | |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice)); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public R unitStatistics(PagePbCheckUnitCommonDto commonDto) { |
| | | Long communityId = commonDto.getCommunityId(); |
| | | if (null != communityId) { |
| | | List<Long> communityIds = comPbMemberDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | commonDto.setCommunityIds(communityIds); |
| | | } |
| | | return R.ok(this.baseMapper.unitStatistics(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) { |
| | | |
| | | List<Long> communityIds = comPbMemberDAO.selectIds(communityId); |
| | | List<Long> communityIds = new ArrayList<>(); |
| | | if (null != communityId){ |
| | | communityIds = comPbMemberDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | } |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId)); |
| | | } |
| | |
| | | @Override |
| | | public R pbStatisticsBelong(PagePbCheckUnitCommonDto commonDto) { |
| | | Long communityId = commonDto.getCommunityId(); |
| | | if (null != communityId) { |
| | | List<Long> communityIds = comPbMemberDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | commonDto.setCommunityIds(communityIds); |
| | | } |
| | | return R.ok(this.baseMapper.pbStatisticsBelong(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); |
| | | } |
| | | |