| | |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.information.vo.ResponseVo; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | //辖区信息 |
| | | List<Map<Object, Object>> list = informationService.selectJur(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | |
| | | //1.保安员表现差预警数量 |
| | | List<ResponseVo> performanceGroupCountList = informationService.getSecurityPerformanceGroupCountList(); |
| | | System.out.println("保安员表现差预警数量 = " + performanceGroupCountList); |
| | | |
| | | //2.保安员资格异常的数量 |
| | | List<ResponseVo> examinationGroupCountList = informationService.getSecurityExaminationGroupCountList(); |
| | | System.out.println("保安员资格异常的数量 = " + examinationGroupCountList); |
| | | |
| | | //3.考试通过率低于50% |
| | | List<ResponseVo> examPassingGroupCountList = informationService.getSecurityExamPassingGroupCountList(); |
| | | System.out.println("考试通过率低于50% = " + examPassingGroupCountList); |
| | | |
| | | //4.持证率低于50% |
| | | List<ResponseVo> holdGroupCountList = informationService.getSecurityHoldAndSoidAndDispatchGroupCountList(1); |
| | | System.out.println("持证率低于50% = " + holdGroupCountList); |
| | | |
| | | //5.社保缴纳率低于50% |
| | | List<ResponseVo> soidGroupCountList = informationService.getSecurityHoldAndSoidAndDispatchGroupCountList(2); |
| | | System.out.println("社保缴纳率低于50% = " + soidGroupCountList); |
| | | |
| | | //6.派遣率低于50% |
| | | List<ResponseVo> dispatchGroupCountList = informationService.getSecurityHoldAndSoidAndDispatchGroupCountList(3); |
| | | System.out.println("派遣率低于50% = " + dispatchGroupCountList); |
| | | |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | int count = 0; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | |
| | | String id = list.get(i).get("id").toString(); |
| | | //辖区名称 |
| | | String jurname = list.get(i).get("dept_name").toString(); |
| | | |
| | | //1.保安员表现差预警数量 |
| | | List<ResponseVo> performanceGroupCountList = informationService.getSecurityPerformanceGroupCountList(); |
| | | //遍历计算总数 |
| | | for (ResponseVo responseVo : performanceGroupCountList) { |
| | | //辖区id相同则数量相加 |
| | | if (responseVo.getId().equals(id)){ |
| | | count += performanceGroupCountList.get(i).getNum(); |
| | | count += responseVo.getNum(); |
| | | } |
| | | } |
| | | |
| | | |
| | | //2.保安员资格异常的数量 |
| | | List<ResponseVo> examinationGroupCountList = informationService.getSecurityExaminationGroupCountList(); |
| | | //遍历计算总数 |
| | | for (ResponseVo responseVo : examinationGroupCountList) { |
| | | //辖区id相同则数量相加 |
| | | if (responseVo.getId().equals(id)){ |
| | | count += examinationGroupCountList.get(i).getNum(); |
| | | count += responseVo.getNum(); |
| | | } |
| | | } |
| | | |
| | | //3.考试通过率低于50% |
| | | List<ResponseVo> examPassingGroupCountList = informationService.getSecurityExamPassingGroupCountList(); |
| | | //遍历计算总数 |
| | | for (ResponseVo responseVo : examPassingGroupCountList) { |
| | | //辖区id相同则数量相加 |
| | | if (responseVo.getId().equals(id)){ |
| | | count += examPassingGroupCountList.get(i).getNum(); |
| | | count += responseVo.getNum(); |
| | | } |
| | | } |
| | | |
| | | //4.持证率低于50% |
| | | List<ResponseVo> holdGroupCountList = informationService.getSecurityHoldAndSoidAndDispatchGroupCountList(1); |
| | | //遍历计算总数 |
| | | for (ResponseVo responseVo : holdGroupCountList) { |
| | | //辖区id相同则数量相加 |
| | | if (responseVo.getId().equals(id)){ |
| | | count += holdGroupCountList.get(i).getNum(); |
| | | count += responseVo.getNum(); |
| | | } |
| | | } |
| | | |
| | | //5.社保缴纳率低于50% |
| | | List<ResponseVo> soidGroupCountList = informationService.getSecurityHoldAndSoidAndDispatchGroupCountList(2); |
| | | //遍历计算总数 |
| | | for (ResponseVo responseVo : soidGroupCountList) { |
| | | //辖区id相同则数量相加 |
| | | if (responseVo.getId().equals(id)){ |
| | | count += soidGroupCountList.get(i).getNum(); |
| | | count += responseVo.getNum(); |
| | | } |
| | | } |
| | | |
| | | //6.派遣率低于50% |
| | | List<ResponseVo> dispatchGroupCountList = informationService.getSecurityHoldAndSoidAndDispatchGroupCountList(3); |
| | | //遍历计算总数 |
| | | for (ResponseVo responseVo : dispatchGroupCountList) { |
| | | //辖区id相同则数量相加 |
| | | if (responseVo.getId().equals(id)){ |
| | | count += dispatchGroupCountList.get(i).getNum(); |
| | | count += responseVo.getNum(); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区及保安公司统计未缴纳社保人员 |
| | | * @param query 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getNotSocialNumber") |
| | | public R<IPage<UserVO>> getNotSocialNumber(InformationVO information, Query query){ |
| | | return R.data(informationService.getNotSocialAndInsuranceAndDispatcherNumber(Condition.getPage(query), information,1)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区及保安公司统计未缴纳保险人员 |
| | | * @param query 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getNotInsuranceNumber") |
| | | public R<IPage<UserVO>> getNotInsuranceNumber(InformationVO information, Query query){ |
| | | return R.data(informationService.getNotSocialAndInsuranceAndDispatcherNumber(Condition.getPage(query), information,2)); |
| | | } |
| | | |
| | | /** |
| | | * 根据辖区及保安公司统计未派遣人员 |
| | | * @param query 分页条件 |
| | | * @param information 查询条件 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getNotDispatcherNumber") |
| | | public R<IPage<UserVO>> getNotDispatcherNumber(InformationVO information, Query query){ |
| | | return R.data(informationService.getNotSocialAndInsuranceAndDispatcherNumber(Condition.getPage(query), information,3)); |
| | | } |
| | | } |