| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | 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.excel.InforExcel; |
| | | import org.springblade.modules.information.mapper.InformationMapper; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.information.vo.InformationStatisticsVO; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.Role; |
| | |
| | | |
| | | @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 |
| | | public void deleteIn(String creditcode) { |
| | | baseMapper.deleteIn(creditcode); |
| | | public void deleteIn(String departmentid) { |
| | | baseMapper.deleteIn(departmentid); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteSh(String creditcode) { |
| | | baseMapper.deleteSh(creditcode); |
| | | public void deleteSh(String deptId) { |
| | | baseMapper.deleteSh(deptId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteMe(String creditcode) { |
| | | baseMapper.deleteMe(creditcode); |
| | | public void deleteMe(String deptId) { |
| | | baseMapper.deleteMe(deptId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 根据deptid 删除用户信息 |
| | | * @param deptId |
| | | */ |
| | | @Override |
| | | public void deleteUserByDeptId(String deptId) { |
| | | baseMapper.deleteUserByDeptId(deptId); |
| | | } |
| | | |
| | | @Override |
| | | public String selJurchilder(String id) { |
| | | return baseMapper.selJurchilder(id); |
| | | } |
| | | |
| | | /** |
| | | * 业务统计情况 |
| | | * @param page |
| | | * @param information |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage selectBusinessStatistics(IPage page, InformationVO information) { |
| | | List<InformationStatisticsVO> list = baseMapper.selectBusinessStatistics(page, information); |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | | * 保安员情况统计 |
| | | * @param page |
| | | * @param information |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage selectSecurityStatistics(IPage page, InformationVO information) { |
| | | List<InformationStatisticsVO> list = baseMapper.selectSecurityStatistics(page,information); |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | | * 业务统计导出 |
| | | * @param information |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ExportInformationExcel> exportBusinessStatis(InformationVO information) { |
| | | List<ExportInformationExcel> list = baseMapper.exportBusinessStatis(information); |
| | | 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 List<ExportInformationSecurityStatistics> exportSecurityStatisInfo(InformationVO information) { |
| | | List<ExportInformationSecurityStatistics> list = baseMapper.exportSecurityStatisInfo(information); |
| | | 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 page |
| | | * @param deptid |
| | | * @param name |
| | | * @param hold |
| | | * @param photo |
| | | * @param examinationtype |
| | | * @param dispatch |
| | | * @param soil |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage selectUIn(IPage<List> 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)); |
| | | } |
| | | |
| | | /** |
| | | * 查询学历统计信息 |
| | | * @param deptid 部门id |
| | | * @param jurisdiction 辖区 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getEducationStatistics(String deptid, String jurisdiction) { |
| | | //查询学历分布情况,按学历分组统计对应的人数 |
| | | List<Map<String,Object>> mapList = baseMapper.getEducationStatistics(deptid,jurisdiction); |
| | | return mapList; |
| | | } |
| | | |
| | | /** |
| | | * 获取部门信息() |
| | | * @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; |
| | | } |
| | | } |