| | |
| | | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.excel.ExportInformationExcel; |
| | | import org.springblade.modules.information.excel.ExportInformationSecurityStatistics; |
| | | 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; |
| | | |
| | |
| | | public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements IInformationService { |
| | | |
| | | @Override |
| | | public IPage<Information> selectInformationPage(IPage<Information> page, Information information) { |
| | | return page.setRecords(baseMapper.selectInformationPage(page, information)); |
| | | public IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO 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) { |
| | | return page.setRecords(baseMapper.selectLi(page,jurisdiction, deptid)); |
| | | public IPage selectLi(IPage page,String jurisdiction, String deptid,String stats,String startTime,String endTime) { |
| | | List<InformationStatisticsVO> list = baseMapper.selectLi(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.getNum(); |
| | | informationStatisticsVO.setNum(z); |
| | | //持证人数 |
| | | Integer c = baseMapper.selectInformationHoldNumCount(dept) + informationStatisticsVO.getCznum(); |
| | | informationStatisticsVO.setCznum(c); |
| | | //已派遣人数 |
| | | Integer p = baseMapper.selectInformationDispatcherNumCount(dept) + informationStatisticsVO.getPqnum(); |
| | | informationStatisticsVO.setPqnum(p); |
| | | //未派遣人数 |
| | | Integer wpq = baseMapper.selectInformationNotDispatcherNumCount(dept) + informationStatisticsVO.getWpqnum(); |
| | | informationStatisticsVO.setWpqnum(wpq); |
| | | //已采集照片数 |
| | | Integer ycjzp = baseMapper.selectInformationUnitAvatarNumCount(dept) + informationStatisticsVO.getYcjzpnum(); |
| | | informationStatisticsVO.setYcjzpnum(ycjzp); |
| | | //未采集照片数 |
| | | Integer wcjzp = baseMapper.selectInformationUnitNotAvatarNumCount(dept) + informationStatisticsVO.getWcjzpnum(); |
| | | informationStatisticsVO.setWcjzpnum(wcjzp); |
| | | //已采集指纹数 |
| | | Integer ycjzw = baseMapper.selectInformationUnitZwNumCount(dept) + informationStatisticsVO.getYcjzwnum(); |
| | | informationStatisticsVO.setYcjzwnum(ycjzw); |
| | | //审查异常数 |
| | | Integer scyc = baseMapper.selectInformationUnitYcNumCount(dept) + informationStatisticsVO.getScycnum(); |
| | | informationStatisticsVO.setScycnum(scyc); |
| | | //缴纳社保数 |
| | | Integer jnsb = baseMapper.selectInformationUnitJnsbNumCount(dept) + informationStatisticsVO.getJnsbnum(); |
| | | informationStatisticsVO.setJnsbnum(jnsb); |
| | | } |
| | | } |
| | | } |
| | | return page.setRecords(list); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectTb(String jurisdiction,String enterpriseName,Integer current,Integer size) { |
| | | return baseMapper.selectTb(jurisdiction, enterpriseName,current,size); |
| | | public IPage selectTb(IPage page,String jurisdiction,String enterpriseName) { |
| | | return page.setRecords(baseMapper.selectTb(page,jurisdiction, enterpriseName)); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectJj(String jurisdiction,String enterpriseName,Integer current,Integer size) { |
| | | return baseMapper.selectJj(jurisdiction, enterpriseName,current,size); |
| | | public IPage selectJj(IPage page,String jurisdiction,String enterpriseName) { |
| | | return page.setRecords(baseMapper.selectJj(page,jurisdiction, enterpriseName)); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectYw(String jurisdiction, String deptid,Integer current,Integer size) { |
| | | return baseMapper.selectYw(jurisdiction, deptid,current,size); |
| | | 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<Map<Object, Object>> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch,String soil) { |
| | | return baseMapper.selectUIn(deptid, name, hold, photo, examinationtype, dispatch,soil); |
| | | public IPage selectUIn(IPage page,String deptid, String name, String hold, String photo, String examinationtype, String dispatch,String soil) { |
| | | return page.setRecords(baseMapper.selectUIn(page,deptid, name, hold, photo, examinationtype, dispatch,soil)); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectDis(String jurisdiction,String deptid,String fid,Integer current,Integer size) { |
| | | return baseMapper.selectDis(jurisdiction,deptid,fid,current,size); |
| | | public IPage selectDis(IPage page,String jurisdiction,String deptid,String fid) { |
| | | return page.setRecords(baseMapper.selectDis(page,jurisdiction,deptid,fid)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | return baseMapper.selectCl(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object,Object>> selectWg(String jurisdiction) { |
| | | return baseMapper.selectWg(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectJy(String jurisdiction) { |
| | | return baseMapper.selectJy(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectYs(String jurisdiction) { |
| | | return baseMapper.selectYs(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectAge(String jurisdiction, String deptid) { |
| | | return baseMapper.selectAge(jurisdiction, deptid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selJur() { |
| | | return baseMapper.selJur(); |
| | | } |
| | | |
| | | @Override |
| | | public String selJurchilder(String id) { |
| | | return baseMapper.selJurchilder(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> seleJuList(String substring) { |
| | | return baseMapper.seleJuList(substring); |
| | | } |
| | | |
| | | /** |
| | | * 获取保安公司信息(本市保安公司,分公司)包含经纬度 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<InformationVO> getSecurityUnitPositionInfo() { |
| | | return baseMapper.getSecurityUnitPositionInfo(); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询保安公司分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitInfoPage(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitInfoPage(page, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计保安公司持证情况分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitHoldInfoPage(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitHoldInfoPage(page, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计保安公司持证率低于50%的保安公司个数及保安公司分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitHoldLess50Page(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitLess50Page(page,1,information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计保安公司派遣率低于50%的保安公司个数及保安公司分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitDispatcherLess50Page(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitLess50Page(page,2, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计保安公司社保缴纳率低于50%的保安公司个数及保安公司分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitSoilLess50Page(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitLess50Page(page,3, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计保安公司考试通过率低于50%的保安公司个数及保安公司分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitExamLess50Page(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitExamLess50Page(page, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司)预警信息,包含(未持证,现实表现差,未缴纳社保,资格审查异常) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSubstationWarnInfoPage(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSubstationWarnInfoPage(page, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司))服务对象小于2家的公司数量的分页信息 |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitServerLess2Page(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitServerLess2Page(page, information)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区查询统计保安公司保险缴纳率低于90%的保安公司个数及保安公司分页信息(本市保安公司,分公司) |
| | | * @param page 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InformationVO> getSecurityUnitInsuranceLessPage(IPage<InformationVO> page, InformationVO information) { |
| | | return page.setRecords(baseMapper.getSecurityUnitLess50Page(page,4, information)); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectBxs(String jurisdiction) { |
| | | return baseMapper.selectBxs(jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> seleP(String jurisdiction, String deptid) { |
| | | return baseMapper.seleP(jurisdiction, deptid); |
| | | } |
| | | |
| | | /** |
| | | * 统计表现差的信息 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ResponseVo> getSecurityPerformanceGroupCountList() { |
| | | return baseMapper.getSecurityPerformanceGroupCountList(); |
| | | } |
| | | |
| | | /** |
| | | * 统计资格审查异常信息 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ResponseVo> getSecurityExaminationGroupCountList() { |
| | | return baseMapper.getSecurityExaminationGroupCountList(); |
| | | } |
| | | |
| | | /** |
| | | * 考试通过率低于50% |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ResponseVo> getSecurityExamPassingGroupCountList() { |
| | | return baseMapper.getSecurityExamPassingGroupCountList(); |
| | | } |
| | | |
| | | /** |
| | | * 查询 1 持证率低于50%, 2 社保缴纳率低于50%, 3 派遣率低于50% |
| | | * @param type 1 持证率低于50%, 2 社保缴纳率低于50%, 3 派遣率低于50% |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ResponseVo> getSecurityHoldAndSoidAndDispatchGroupCountList(Integer type) { |
| | | return baseMapper.getSecurityHoldAndSoidAndDispatchGroupCountList(type); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> seleFj(String jurisdiction) { |
| | | return baseMapper.seleFj(jurisdiction); |
| | | } |
| | | @Override |
| | | public IPage selectBxc(IPage page,String jurisdiction,String type) { |
| | | return page.setRecords(baseMapper.selectBxc(page,jurisdiction,type)); |
| | | } |
| | | |
| | | /** |
| | | * 保安员统计 |
| | | * @param jurisdiction 辖区id |
| | | * @param deptid 部门名称 |
| | | * @param stats 公司类型 |
| | | * @param startTime 企业注册时间 |
| | | * @param endTime 企业注册时间 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ExportInformationSecurityStatistics> exportSecurityStatisInfo(String jurisdiction, String deptid, String stats, String startTime, String endTime) { |
| | | List<ExportInformationSecurityStatistics> list = baseMapper.exportSecurityStatisInfo(jurisdiction, deptid, stats, startTime, endTime); |
| | | if (list.size()>0) { |
| | | //遍历 |
| | | for (ExportInformationSecurityStatistics informationStatisticsVO : list) { |
| | | List<Dept> deptList = baseMapper.getDeptChildrens(informationStatisticsVO.getDepartmentid()); |
| | | //有子级 |
| | | if (deptList.size()>0){ |
| | | Dept dept = new Dept(); |
| | | dept.setId(Long.parseLong(informationStatisticsVO.getDepartmentid())); |
| | | //查询当前子单位的人数 |
| | | Integer z = baseMapper.selectInformationUserNumCount(dept) + informationStatisticsVO.getNum(); |
| | | informationStatisticsVO.setNum(z); |
| | | //持证人数 |
| | | Integer c = baseMapper.selectInformationHoldNumCount(dept) + informationStatisticsVO.getCznum(); |
| | | informationStatisticsVO.setCznum(c); |
| | | //已派遣人数 |
| | | Integer p = baseMapper.selectInformationDispatcherNumCount(dept) + informationStatisticsVO.getPqnum(); |
| | | informationStatisticsVO.setPqnum(p); |
| | | //未派遣人数 |
| | | Integer wpq = baseMapper.selectInformationNotDispatcherNumCount(dept) + informationStatisticsVO.getWpqnum(); |
| | | informationStatisticsVO.setWpqnum(wpq); |
| | | //已采集照片数 |
| | | Integer ycjzp = baseMapper.selectInformationUnitAvatarNumCount(dept) + informationStatisticsVO.getYcjzpnum(); |
| | | informationStatisticsVO.setYcjzpnum(ycjzp); |
| | | //未采集照片数 |
| | | Integer wcjzp = baseMapper.selectInformationUnitNotAvatarNumCount(dept) + informationStatisticsVO.getWcjzpnum(); |
| | | informationStatisticsVO.setWcjzpnum(wcjzp); |
| | | //已采集指纹数 |
| | | Integer ycjzw = baseMapper.selectInformationUnitZwNumCount(dept) + informationStatisticsVO.getYcjzwnum(); |
| | | informationStatisticsVO.setYcjzwnum(ycjzw); |
| | | //审查异常数 |
| | | Integer scyc = baseMapper.selectInformationUnitYcNumCount(dept) + informationStatisticsVO.getScycnum(); |
| | | informationStatisticsVO.setScycnum(scyc); |
| | | //缴纳社保数 |
| | | Integer jnsb = baseMapper.selectInformationUnitJnsbNumCount(dept) + informationStatisticsVO.getJnsbnum(); |
| | | informationStatisticsVO.setJnsbnum(jnsb); |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 业务情况统计 |
| | | * @param jurisdiction 辖区id |
| | | * @param deptid 部门名称 |
| | | * @param stats 公司类型 |
| | | * @param startTime 企业注册时间 |
| | | * @param endTime 企业注册时间 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ExportInformationExcel> exportBusinessStatis(String jurisdiction, String deptid, String stats, String startTime, String endTime) { |
| | | List<ExportInformationExcel> list = baseMapper.exportBusinessStatis(jurisdiction, deptid, stats, startTime, endTime); |
| | | if (list.size()>0) { |
| | | //遍历 |
| | | for (ExportInformationExcel informationStatisticsVO : list) { |
| | | List<Dept> deptList = baseMapper.getDeptChildrens(informationStatisticsVO.getDepartmentid()); |
| | | //有子级 |
| | | 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 list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取部门信息() |
| | | * @param information |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getInformationDetails(InformationVO information) { |
| | | //根据部门id 查询部门信息(如果有总公司,则遍历出总公司来) |
| | | List<String> deptIdList = baseMapper.getDeptDetails(information); |
| | | //取第一个查询部门信息 |
| | | InformationVO informationVO = baseMapper.getInformationDetails(deptIdList.get(0)); |
| | | //返回 |
| | | return informationVO; |
| | | } |
| | | } |