| | |
| | | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.vo.InformationStatisticsVO; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.information.mapper.InformationMapper; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.information.vo.ResponseVo; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | |
| | | |
| | | @Override |
| | | public IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.selectInformationPage(page, information)); |
| | | List<InformationVO> informationVOS = baseMapper.selectInformationPage(page, information); |
| | | //遍历 |
| | | if (informationVOS.size()>0){ |
| | | //判断有无子级 |
| | | for (InformationVO informationVO : informationVOS) { |
| | | List<Dept> deptList = baseMapper.getDeptHashChildren(informationVO); |
| | | //有子级 |
| | | if (deptList.size()>0){ |
| | | Dept dept = new Dept(); |
| | | dept.setId(Long.parseLong(informationVO.getDepartmentid())); |
| | | //查询当前子单位的人数 |
| | | Integer z = baseMapper.selectInformationUserNumCount(dept) + Integer.parseInt(informationVO.getZnum()); |
| | | informationVO.setZnum(z.toString()); |
| | | //已派遣人数 |
| | | Integer p = baseMapper.selectInformationDispatcherNumCount(dept) + Integer.parseInt(informationVO.getPnum()); |
| | | informationVO.setPnum(p.toString()); |
| | | //持证人数 |
| | | Integer c = baseMapper.selectInformationHoldNumCount(dept) + Integer.parseInt(informationVO.getCnum()); |
| | | informationVO.setCnum(c.toString()); |
| | | } |
| | | } |
| | | } |
| | | return page.setRecords(informationVOS); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage selectLi(IPage page,String jurisdiction, String deptid,String stats) { |
| | | return page.setRecords(baseMapper.selectLi(page,jurisdiction, deptid,stats)); |
| | | public IPage selectLi(IPage page,String jurisdiction, String deptid,String stats,String startTime,String endTime) { |
| | | return page.setRecords(baseMapper.selectLi(page,jurisdiction, deptid,stats,startTime,endTime)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage selectYw(IPage page,String jurisdiction, String deptid,String stats) { |
| | | return page.setRecords(baseMapper.selectYw(page,jurisdiction, deptid,stats)); |
| | | public IPage selectYw(IPage page,String jurisdiction, String deptid,String stats,String startTime,String endTime) { |
| | | List<InformationStatisticsVO> list = baseMapper.selectYw(page, jurisdiction, deptid, stats, startTime, endTime); |
| | | if (list.size()>0) { |
| | | //遍历 |
| | | for (InformationStatisticsVO informationStatisticsVO : list) { |
| | | List<Dept> deptList = baseMapper.getDeptHashChildrens(informationStatisticsVO); |
| | | //有子级 |
| | | if (deptList.size()>0){ |
| | | Dept dept = new Dept(); |
| | | dept.setId(Long.parseLong(informationStatisticsVO.getDepartmentid())); |
| | | //查询当前子单位的人数 |
| | | Integer z = baseMapper.selectInformationUserNumCount(dept) + informationStatisticsVO.getZnum(); |
| | | informationStatisticsVO.setZnum(z); |
| | | //已派遣人数 |
| | | Integer p = baseMapper.selectInformationDispatcherNumCount(dept) + informationStatisticsVO.getPqnum(); |
| | | informationStatisticsVO.setPqnum(p); |
| | | //持证人数 |
| | | Integer c = baseMapper.selectInformationHoldNumCount(dept) + informationStatisticsVO.getCznum(); |
| | | informationStatisticsVO.setCznum(c); |
| | | //服务单位数 |
| | | Integer f = baseMapper.selectInformationUnitNumCount(dept) + informationStatisticsVO.getFwnum(); |
| | | informationStatisticsVO.setFwnum(f); |
| | | //服务单位到期数 |
| | | Integer d = baseMapper.selectInformationUnitExpireNumCount(dept) + informationStatisticsVO.getDqnum(); |
| | | informationStatisticsVO.setDqnum(d); |
| | | } |
| | | } |
| | | } |
| | | return page.setRecords(list); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public List<ResponseVo> getSecurityHoldAndSoidAndDispatchGroupCountList(Integer type) { |
| | | return baseMapper.getSecurityHoldAndSoidAndDispatchGroupCountList(type); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> seleFj(String jurisdiction) { |
| | | return baseMapper.seleFj(jurisdiction); |
| | | } |
| | | } |