| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入information") |
| | | public R save(@Valid @RequestBody Information information) { |
| | | Dept dept= new Dept(); |
| | | Dept dept = new Dept(); |
| | | String departmentid = information.getDepartmentid(); |
| | | Long l=Long.parseLong(departmentid); |
| | | Long l = Long.parseLong(departmentid); |
| | | //自招保安公司 |
| | | if(information.getStats().equals("0")){ |
| | | if (information.getStats().equals("0")) { |
| | | Long i = 1420222768149966850L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | |
| | | dept.setDeptCategory(1); |
| | | } |
| | | //保安培训公司 |
| | | if(information.getStats().equals("1")){ |
| | | if (information.getStats().equals("1")) { |
| | | Long i = 1418458374477549569L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | |
| | | |
| | | } |
| | | //保安服务公司 |
| | | if(information.getStats().equals("2")){ |
| | | if (information.getStats().equals("2")) { |
| | | Long i = 1413470343230877697L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | |
| | | dept.setDeptCategory(1); |
| | | } |
| | | //武装守押公司 |
| | | if(information.getStats().equals("3")){ |
| | | if (information.getStats().equals("3")) { |
| | | Long i = 1420222961377357825L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | |
| | | String title = list.get(i).get("title");//部门名称 |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map<Object, Object> objectStringMap = iDeptService.selectHold(String.valueOf(list.get(i).get("jurisdiction"))); |
| | | if (objectStringMap==null) { |
| | | if (objectStringMap == null) { |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | | map.put("wcz", wcznumber); |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String cz = objectStringMap.get("cz").toString(); |
| | | cznumber = Integer.valueOf(cz); |
| | | String wcz = objectStringMap.get("wcz").toString(); |
| | |
| | | * 统计保安公司未持证的保安的公司数量 |
| | | */ |
| | | @PostMapping("/selectInCount") |
| | | public R selectInCount(String jurisdiction,String deptid) { |
| | | List<Map<Object, String>> maps = informationService.selectInCount(jurisdiction,deptid); |
| | | public R selectInCount(String jurisdiction, String deptid) { |
| | | List<Map<Object, String>> maps = informationService.selectInCount(jurisdiction, deptid); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("Count",maps.size()); |
| | | map.put("List",maps); |
| | | map.put("Count", maps.size()); |
| | | map.put("List", maps); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | /** 未缴社保数量 |
| | | /** |
| | | * 未缴社保数量 |
| | | * 通过辖区查询机构id,然后通过机构id查询当前机构交社保的人数(numj单位已交社保数量;numz单位人员总数) |
| | | */ |
| | | @PostMapping("/selectCs") |
| | | public R selectCs(String jurisdiction,String deptid) { |
| | | List<Map<String, Object>> maps = informationService.selectCs(jurisdiction,deptid); |
| | | public R selectCs(String jurisdiction, String deptid) { |
| | | List<Map<String, Object>> maps = informationService.selectCs(jurisdiction, deptid); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<String, Object>> lists1 = new ArrayList<>(); |
| | | Map<String, Object> map1 = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | for (int i=0;i<maps.size();i++){ |
| | | Integer count = 0; |
| | | for (int i = 0; i < maps.size(); i++) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | //交社保数 |
| | | String numjs = maps.get(i).get("numj").toString(); |
| | |
| | | String deptname = maps.get(i).get("deptname").toString(); |
| | | //统计未交社保人数 |
| | | int i1 = numz - numj; |
| | | count+=i1; |
| | | map.put("count",i1); |
| | | map.put("name",deptname); |
| | | count += i1; |
| | | map.put("count", i1); |
| | | map.put("name", deptname); |
| | | lists1.add(map); |
| | | } |
| | | map1.put("Count",count); |
| | | map1.put("List",lists1); |
| | | map1.put("Count", count); |
| | | map1.put("List", lists1); |
| | | lists.add(map1); |
| | | return R.data(lists); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 统计这个月和上个月交社保的人数,以及金额 |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectTo") |
| | | public R selectTo(String jurisdiction,String deptid) { |
| | | public R selectTo(String jurisdiction, String deptid) { |
| | | //上个月人数数量 |
| | | Integer lnum=0; |
| | | Integer lnum = 0; |
| | | //这个月人数数量 |
| | | Integer tnum=0; |
| | | Integer tnum = 0; |
| | | //上个月金额 |
| | | Double lmount=0.0; |
| | | Double lmount = 0.0; |
| | | //这个月金额 |
| | | Double tmount=0.0; |
| | | Double tmount = 0.0; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<String, Object>> list = informationService.selectTo(jurisdiction,deptid); |
| | | for (int i=0;i<list.size();i++){ |
| | | List<Map<String, Object>> list = informationService.selectTo(jurisdiction, deptid); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String lastmonths = list.get(i).get("lastmonth").toString(); |
| | | Integer lastmonth=Integer.parseInt(lastmonths); |
| | | lnum+=lastmonth; |
| | | Integer lastmonth = Integer.parseInt(lastmonths); |
| | | lnum += lastmonth; |
| | | String thismouths = list.get(i).get("thismouth").toString(); |
| | | Integer thismouth=Integer.parseInt(thismouths); |
| | | tnum+=thismouth; |
| | | Integer thismouth = Integer.parseInt(thismouths); |
| | | tnum += thismouth; |
| | | String lastamounts = list.get(i).get("lastamount").toString(); |
| | | Double lastamount =Double.parseDouble(lastamounts); |
| | | lmount+=lastamount; |
| | | Double lastamount = Double.parseDouble(lastamounts); |
| | | lmount += lastamount; |
| | | String thisamounts = list.get(i).get("thisamount").toString(); |
| | | Double thisamount =Double.parseDouble(thisamounts); |
| | | tmount+=thisamount; |
| | | Double thisamount = Double.parseDouble(thisamounts); |
| | | tmount += thisamount; |
| | | } |
| | | map.put("lastmonth",lnum); |
| | | map.put("thismouth",tnum); |
| | | map.put("lastamount",lmount); |
| | | map.put("thisamount",tmount); |
| | | map.put("lastmonth", lnum); |
| | | map.put("thismouth", tnum); |
| | | map.put("lastamount", lmount); |
| | | map.put("thisamount", tmount); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 查询本年所有月份交社保人数 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearSoil") |
| | | public R queryYearSoil(String jurisdiction,String deptid) { |
| | | public R queryYearSoil(String jurisdiction, String deptid) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = informationService.queryYearSoil(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | Map<String, String> map = informationService.queryYearSoil(year, jurisdiction, deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map);//key升序 |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * 查询本年所有月份社保金额(公司经济运营趋势) |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearAn") |
| | | public R queryYearAn(String jurisdiction,String deptid) { |
| | | public R queryYearAn(String jurisdiction, String deptid) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = informationService.queryYearAn(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | Map<String, String> map = informationService.queryYearAn(year, jurisdiction, deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map);//key升序 |
| | | return R.data(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 公司运营智能统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryCounts") |
| | | public R queryCounts(String jurisdiction,String deptid) { |
| | | public R queryCounts(String jurisdiction, String deptid) { |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | Integer a=0; |
| | | Integer b=0; |
| | | Integer zca=0; |
| | | Integer zcb=0; |
| | | Integer cza=0; |
| | | Integer czb=0; |
| | | Integer sba=0; |
| | | Integer sbb=0; |
| | | Integer kha=0; |
| | | Integer khb=0; |
| | | Integer pqa=0; |
| | | Integer pqb=0; |
| | | String deptname=null; |
| | | String jurname=null; |
| | | Integer a = 0; |
| | | Integer b = 0; |
| | | Integer zca = 0; |
| | | Integer zcb = 0; |
| | | Integer cza = 0; |
| | | Integer czb = 0; |
| | | Integer sba = 0; |
| | | Integer sbb = 0; |
| | | Integer kha = 0; |
| | | Integer khb = 0; |
| | | Integer pqa = 0; |
| | | Integer pqb = 0; |
| | | String deptname = null; |
| | | String jurname = null; |
| | | //保安员数量 |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Map<String, Object> mapzc = new HashMap<String, Object>(); |
| | |
| | | Map<String, Object> mappq = new HashMap<String, Object>(); |
| | | Map<String, Object> mapC = new HashMap<String, Object>(); |
| | | List<Map<Object, Object>> maps = informationService.queryCountB(jurisdiction, deptid); |
| | | for (int i=0;i<maps.size();i++){ |
| | | for (int i = 0; i < maps.size(); i++) { |
| | | //这个月数量 |
| | | String thisnum = maps.get(i).get("thisnum").toString(); |
| | | a+= Integer.valueOf(thisnum); |
| | | a += Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | String lastnum = maps.get(i).get("lastnum").toString(); |
| | | b+=Integer.valueOf(lastnum); |
| | | b += Integer.valueOf(lastnum); |
| | | |
| | | } |
| | | map.put("thisnum",a); |
| | | map.put("lastnum",b); |
| | | map.put("List",maps); |
| | | mapC.put("baoan",map); |
| | | map.put("thisnum", a); |
| | | map.put("lastnum", b); |
| | | map.put("List", maps); |
| | | mapC.put("baoan", map); |
| | | //正常保安员数量 |
| | | List<Map<Object, Object>> maps1 = informationService.queryCountZc(jurisdiction, deptid); |
| | | for (int i=0;i<maps1.size();i++){ |
| | | for (int i = 0; i < maps1.size(); i++) { |
| | | //这个月数量 |
| | | String thisnum = maps1.get(i).get("thisnum").toString(); |
| | | zca+= Integer.valueOf(thisnum); |
| | | zca += Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | String lastnum = maps1.get(i).get("lastnum").toString(); |
| | | zcb+= Integer.valueOf(lastnum); |
| | | zcb += Integer.valueOf(lastnum); |
| | | } |
| | | mapzc.put("thisnum",zca); |
| | | mapzc.put("lastnum",zcb); |
| | | mapzc.put("List",maps1); |
| | | mapC.put("zcbaoan",mapzc); |
| | | mapzc.put("thisnum", zca); |
| | | mapzc.put("lastnum", zcb); |
| | | mapzc.put("List", maps1); |
| | | mapC.put("zcbaoan", mapzc); |
| | | //持证保安数量 |
| | | List<Map<Object, Object>> maps2 = informationService.queryCountCz(jurisdiction, deptid); |
| | | for (int i=0;i<maps2.size();i++){ |
| | | for (int i = 0; i < maps2.size(); i++) { |
| | | //这个月数量 |
| | | String thisnum = maps2.get(i).get("thisnum").toString(); |
| | | cza+= Integer.valueOf(thisnum); |
| | | cza += Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | String lastnum = maps2.get(i).get("lastnum").toString(); |
| | | czb+= Integer.valueOf(lastnum); |
| | | czb += Integer.valueOf(lastnum); |
| | | } |
| | | mapcz.put("thisnum",cza); |
| | | mapcz.put("lastnum",czb); |
| | | mapcz.put("List",maps2); |
| | | mapC.put("czbaoan",mapcz); |
| | | mapcz.put("thisnum", cza); |
| | | mapcz.put("lastnum", czb); |
| | | mapcz.put("List", maps2); |
| | | mapC.put("czbaoan", mapcz); |
| | | //缴纳社保数量 |
| | | List<Map<Object, Object>> maps3 = informationService.queryCountSb(jurisdiction, deptid); |
| | | for (int i=0;i<maps3.size();i++){ |
| | | for (int i = 0; i < maps3.size(); i++) { |
| | | //这个月数量 |
| | | String thisnum = maps3.get(i).get("thisnum").toString(); |
| | | sba+= Integer.valueOf(thisnum); |
| | | sba += Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | String lastnum = maps3.get(i).get("lastnum").toString(); |
| | | sbb+= Integer.valueOf(lastnum); |
| | | sbb += Integer.valueOf(lastnum); |
| | | } |
| | | mapsb.put("thisnum",sba); |
| | | mapsb.put("lastnum",sbb); |
| | | mapsb.put("List",maps3); |
| | | mapC.put("sheb",mapsb); |
| | | mapsb.put("thisnum", sba); |
| | | mapsb.put("lastnum", sbb); |
| | | mapsb.put("List", maps3); |
| | | mapC.put("sheb", mapsb); |
| | | //服务客户数量 |
| | | List<Map<Object, Object>> maps4 = informationService.queryCountKh(jurisdiction, deptid); |
| | | for (int i=0;i<maps4.size();i++){ |
| | | for (int i = 0; i < maps4.size(); i++) { |
| | | //这个月数量 |
| | | String thisnum = maps4.get(i).get("thisnum").toString(); |
| | | kha+= Integer.valueOf(thisnum); |
| | | kha += Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | String lastnum = maps4.get(i).get("lastnum").toString(); |
| | | khb+= Integer.valueOf(lastnum); |
| | | khb += Integer.valueOf(lastnum); |
| | | } |
| | | mapkh.put("thisnum",kha); |
| | | mapkh.put("lastnum",khb); |
| | | mapkh.put("List",maps4); |
| | | mapC.put("kh",mapkh); |
| | | mapkh.put("thisnum", kha); |
| | | mapkh.put("lastnum", khb); |
| | | mapkh.put("List", maps4); |
| | | mapC.put("kh", mapkh); |
| | | //保安派遣数量 |
| | | List<Map<Object, Object>> maps5 = informationService.queryCountPq(jurisdiction, deptid); |
| | | for (int i=0;i<maps5.size();i++){ |
| | | for (int i = 0; i < maps5.size(); i++) { |
| | | //这个月数量 |
| | | String thisnum = maps5.get(i).get("thisnum").toString(); |
| | | pqa+= Integer.valueOf(thisnum); |
| | | pqa += Integer.valueOf(thisnum); |
| | | //上个月数量 |
| | | String lastnum = maps5.get(i).get("lastnum").toString(); |
| | | pqb+= Integer.valueOf(lastnum); |
| | | pqb += Integer.valueOf(lastnum); |
| | | } |
| | | mappq.put("thisnum",pqa); |
| | | mappq.put("lastnum",pqb); |
| | | mappq.put("List",maps5); |
| | | mapC.put("paiq",mappq); |
| | | mappq.put("thisnum", pqa); |
| | | mappq.put("lastnum", pqb); |
| | | mappq.put("List", maps5); |
| | | mapC.put("paiq", mappq); |
| | | lists.add(mapC); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询本年公司运营智能统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearG") |
| | | public R queryYearG(String jurisdiction,String deptid) { |
| | | public R queryYearG(String jurisdiction, String deptid) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, Object> mapz = new HashMap<String, Object>(); |
| | | Map<String, Object> mapzc1= new HashMap<String, Object>(); |
| | | Map<String, Object> mapcz1= new HashMap<String, Object>(); |
| | | Map<String, Object> mapsb1= new HashMap<String, Object>(); |
| | | Map<String, Object> mapzc1 = new HashMap<String, Object>(); |
| | | Map<String, Object> mapcz1 = new HashMap<String, Object>(); |
| | | Map<String, Object> mapsb1 = new HashMap<String, Object>(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | Map<String, String> map = informationService.queryYearZ(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | mapz.put("baoan",map); |
| | | Map<String, String> map = informationService.queryYearZ(year, jurisdiction, deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map);//key升序 |
| | | mapz.put("baoan", map); |
| | | lists.add(mapz); |
| | | //正常保安数量 |
| | | Map<String, String> mapzc = informationService.queryYearZc(year,jurisdiction,deptid); |
| | | mapzc = (HashMap<String, String>) sortMapBykeyAsc(mapzc) ;//key升序 |
| | | mapzc1.put("zc",mapzc); |
| | | Map<String, String> mapzc = informationService.queryYearZc(year, jurisdiction, deptid); |
| | | mapzc = (HashMap<String, String>) sortMapBykeyAsc(mapzc);//key升序 |
| | | mapzc1.put("zc", mapzc); |
| | | lists.add(mapzc1); |
| | | //保安持证数量 |
| | | Map<String, String> mapcz = informationService.queryYearZc(year,jurisdiction,deptid); |
| | | mapcz = (HashMap<String, String>) sortMapBykeyAsc(mapcz) ;//key升序 |
| | | mapcz1.put("chiz",mapcz); |
| | | Map<String, String> mapcz = informationService.queryYearZc(year, jurisdiction, deptid); |
| | | mapcz = (HashMap<String, String>) sortMapBykeyAsc(mapcz);//key升序 |
| | | mapcz1.put("chiz", mapcz); |
| | | lists.add(mapcz1); |
| | | //缴纳社保数 |
| | | Map<String, String> mapsb = informationService.queryYearSoil(year,jurisdiction,deptid); |
| | | mapsb = (HashMap<String, String>) sortMapBykeyAsc(mapsb) ;//key升序 |
| | | mapsb1.put("sheb",mapsb); |
| | | Map<String, String> mapsb = informationService.queryYearSoil(year, jurisdiction, deptid); |
| | | mapsb = (HashMap<String, String>) sortMapBykeyAsc(mapsb);//key升序 |
| | | mapsb1.put("sheb", mapsb); |
| | | //保安派遣 |
| | | Map<String, String> mapde = informationService.queryYearBanan(year, jurisdiction, deptid); |
| | | mapde = (HashMap<String, String>) sortMapBykeyAsc(mapde) ;//key升序 |
| | | mapsb1.put("paiq",mapde); |
| | | mapde = (HashMap<String, String>) sortMapBykeyAsc(mapde);//key升序 |
| | | mapsb1.put("paiq", mapde); |
| | | lists.add(mapsb1); |
| | | return R.data(lists); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 查询本年所有月份的客户数量 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearKh") |
| | | public R queryYearKh(String jurisdiction,String deptid) { |
| | | public R queryYearKh(String jurisdiction, String deptid) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = informationService.queryYearKh(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | Map<String, String> map = informationService.queryYearKh(year, jurisdiction, deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map);//key升序 |
| | | return R.data(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询本年所有月份的保安派遣数量 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearBanan") |
| | | public R queryYearBanan(String jurisdiction,String deptid) { |
| | | public R queryYearBanan(String jurisdiction, String deptid) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | String year = String.valueOf(cal.get(Calendar.YEAR)); |
| | | Map<String, String> map = informationService.queryYearBanan(year,jurisdiction,deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map) ;//key升序 |
| | | Map<String, String> map = informationService.queryYearBanan(year, jurisdiction, deptid); |
| | | map = (HashMap<String, String>) sortMapBykeyAsc(map);//key升序 |
| | | return R.data(map); |
| | | } |
| | | |
| | | //升序 |
| | | public static Map<String, String> sortMapBykeyAsc(Map<String, String> oriMap) { |
| | | public static Map<String, String> sortMapBykeyAsc(Map<String, String> oriMap) { |
| | | Map<String, String> sortedMap = new LinkedHashMap<String, String>(); |
| | | try { |
| | | if (oriMap != null && !oriMap.isEmpty()) { |
| | |
| | | |
| | | /** |
| | | * 统计保安员资格异常的数量 |
| | | * |
| | | * @param jurisdiction |
| | | * @param deptid |
| | | * @param type 1:当天 2:当月 3:全部 |
| | | * @param type 1:当天 2:当月 3:全部 |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectExtype") |
| | | public R selectExtype(String jurisdiction,String deptid,String type) { |
| | | public R selectExtype(String jurisdiction, String deptid, String type) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | Integer count = 0; |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<Object, Object>> maps = informationService.selectExtype(jurisdiction, deptid,type); |
| | | for (int i=0;i<maps.size();i++){ |
| | | List<Map<Object, Object>> maps = informationService.selectExtype(jurisdiction, deptid, type); |
| | | for (int i = 0; i < maps.size(); i++) { |
| | | String num = maps.get(i).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | | count += Integer.valueOf(num); |
| | | } |
| | | map.put("count",count); |
| | | map.put("list",maps); |
| | | map.put("count", count); |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | /** |
| | | * 统计用户资格异常的数量 |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectExtypeUser") |
| | | public int selectExtypeUser() { |
| | | return informationService.selectExtypeUser(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计保安员表现差的数量 |
| | | * |
| | | * @param jurisdiction |
| | | * @param deptid |
| | | * @param type 1:当天 2:当月 3:全部 |
| | | * @param type 1:当天 2:当月 3:全部 |
| | | * @return |
| | | */ |
| | | @PostMapping("/selectBx") |
| | | public R selectBx(String jurisdiction,String deptid,String type) { |
| | | public R selectBx(String jurisdiction, String deptid, String type) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Integer count=0; |
| | | Integer count = 0; |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | List<Map<Object, Object>> maps = informationService.selectBx(jurisdiction, deptid,type); |
| | | for (int i=0;i<maps.size();i++){ |
| | | List<Map<Object, Object>> maps = informationService.selectBx(jurisdiction, deptid, type); |
| | | for (int i = 0; i < maps.size(); i++) { |
| | | String num = maps.get(i).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | | count += Integer.valueOf(num); |
| | | } |
| | | map.put("count",count); |
| | | map.put("list",maps); |
| | | map.put("count", count); |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 分局预警统计 |
| | | */ |
| | | @PostMapping("/selectFj") |
| | | public R selectFj(){ |
| | | public R selectFj() { |
| | | //辖区信息 |
| | | List<Map<Object, Object>> list = informationService.selectJur(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i=0;i<list.size();i++){ |
| | | Integer count=0; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Integer count = 0; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | //辖区id |
| | | String jurisdiction = list.get(i).get("id").toString(); |
| | | //辖区名称 |
| | | String jurname = list.get(i).get("dept_name").toString(); |
| | | //保安员表现差预警数量 |
| | | List<Map<Object, Object>> mapbx = informationService.selectBx(jurisdiction, "",""); |
| | | for (int ibx=0;ibx<mapbx.size();ibx++){ |
| | | List<Map<Object, Object>> mapbx = informationService.selectBx(jurisdiction, "", ""); |
| | | for (int ibx = 0; ibx < mapbx.size(); ibx++) { |
| | | String num = mapbx.get(ibx).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | | count += Integer.valueOf(num); |
| | | } |
| | | //保安员资格异常的数量 |
| | | List<Map<Object, Object>> mapEx = informationService.selectExtype(jurisdiction, "",""); |
| | | for (int iex=0;iex<mapEx.size();iex++){ |
| | | List<Map<Object, Object>> mapEx = informationService.selectExtype(jurisdiction, "", ""); |
| | | for (int iex = 0; iex < mapEx.size(); iex++) { |
| | | String num = mapEx.get(iex).get("num").toString(); |
| | | count+= Integer.valueOf(num); |
| | | count += Integer.valueOf(num); |
| | | } |
| | | //保安公司未持证数量 |
| | | List<Map<Object, String>> mapgs = informationService.selectInCount(jurisdiction,""); |
| | | count+=mapgs.size(); |
| | | List<Map<Object, String>> mapgs = informationService.selectInCount(jurisdiction, ""); |
| | | count += mapgs.size(); |
| | | //未缴社保数量 |
| | | List<Map<String, Object>> mapsb = informationService.selectCs(jurisdiction,""); |
| | | for (int isb=0;isb<mapsb.size();isb++){ |
| | | List<Map<String, Object>> mapsb = informationService.selectCs(jurisdiction, ""); |
| | | for (int isb = 0; isb < mapsb.size(); isb++) { |
| | | //交社保数 |
| | | String numjs = mapsb.get(isb).get("numj").toString(); |
| | | Integer numj = Integer.parseInt(numjs); |
| | |
| | | Integer numz = Integer.parseInt(numzs); |
| | | //统计未交社保人数 |
| | | int i1 = numz - numj; |
| | | count+=i1; |
| | | count += i1; |
| | | } |
| | | map.put("Count",count); |
| | | map.put("jurname",jurname); |
| | | map.put("Count", count); |
| | | map.put("jurname", jurname); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 派遣數量統計 |
| | | */ |
| | | @PostMapping("/selectPCount") |
| | | public R selectPCount(String jurisdiction,String deptid) { |
| | | public R selectPCount(String jurisdiction, String deptid) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | Map map1 = informationService.selectPcount(jurisdiction, deptid); |
| | | String pnum = map1.get("pnum").toString(); |
| | | Integer a=Integer.valueOf(pnum); |
| | | Integer a = Integer.valueOf(pnum); |
| | | Map map2 = informationService.selectWPcount(jurisdiction, deptid); |
| | | String wpnum = map2.get("wpnum").toString(); |
| | | Integer b=Integer.valueOf(wpnum); |
| | | map.put("PCount",a); |
| | | map.put("WPCount",b); |
| | | Integer b = Integer.valueOf(wpnum); |
| | | map.put("PCount", a); |
| | | map.put("WPCount", b); |
| | | lists.add(map); |
| | | return R.data(lists); |
| | | } |
| | |
| | | * 保安员统计 |
| | | */ |
| | | @PostMapping("/selectLi") |
| | | public R selectLi(String jurisdiction,String deptid) { |
| | | public R selectLi(String jurisdiction, String deptid) { |
| | | List<Map<Object, Object>> list = informationService.selectLi(jurisdiction, deptid); |
| | | return R.data(list); |
| | | } |
| | |
| | | * 单位类型统计 |
| | | */ |
| | | @PostMapping("/seCountI") |
| | | public R seCountI(String jurisdiction,String deptid) { |
| | | public R seCountI(String jurisdiction, String deptid) { |
| | | List<Map<Object, Object>> list = informationService.seCountI(jurisdiction, deptid); |
| | | return R.data(list); |
| | | } |
| | |
| | | * 保安在职男女数量 |
| | | */ |
| | | @PostMapping("/seCountUg") |
| | | public R seCountUg(String jurisdiction,String deptid) { |
| | | public R seCountUg(String jurisdiction, String deptid) { |
| | | String mnum = informationService.seCountUm(jurisdiction, deptid); |
| | | String gnum = informationService.seCountUg(jurisdiction, deptid); |
| | | Map map = new HashMap(); |
| | | map.put("mnum",mnum); |
| | | map.put("gnum",gnum); |
| | | map.put("mnum", mnum); |
| | | map.put("gnum", gnum); |
| | | List list = new ArrayList(); |
| | | list.add(map); |
| | | return R.data(list); |