| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 首页保安公司统计接口 |
| | | * |
| | |
| | | return R.data(lists); |
| | | } |
| | | |
| | | /** |
| | | * 分局预警统计 |
| | | */ |
| | | @PostMapping("/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; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | //辖区id |
| | | String id = list.get(i).get("id").toString(); |
| | | //辖区名称 |
| | | String jurname = list.get(i).get("dept_name").toString(); |
| | | String childer = informationService.selJurchilder(id); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | //保安员表现差预警数量 |
| | | 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); |
| | | } |
| | | //保安员资格异常的数量 |
| | | 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); |
| | | } |
| | | //保安公司未持证数量 |
| | | 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++) { |
| | | //交社保数 |
| | | String numjs = mapsb.get(isb).get("numj").toString(); |
| | | Integer numj = Integer.parseInt(numjs); |
| | | // //单位总人数 |
| | | // String numzs = mapsb.get(isb).get("numz").toString(); |
| | | // Integer numz = Integer.parseInt(numzs); |
| | | // //统计未交社保人数 |
| | | // int i1 = numz - numj; |
| | | count += numj; |
| | | } |
| | | map.put("Count", count); |
| | | map.put("jurname", jurname); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | // /** |
| | | // * 分局预警统计 |
| | | // */ |
| | | // @PostMapping("/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; |
| | | // Map<String, Object> map = new HashMap<String, Object>(); |
| | | // //辖区id |
| | | // String id = list.get(i).get("id").toString(); |
| | | // //辖区名称 |
| | | // String jurname = list.get(i).get("dept_name").toString(); |
| | | // String childer = informationService.selJurchilder(id); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | // //保安员表现差预警数量 |
| | | // 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); |
| | | // } |
| | | // //保安员资格异常的数量 |
| | | // 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); |
| | | // } |
| | | // //保安公司未持证数量 |
| | | // 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++) { |
| | | // //交社保数 |
| | | // String numjs = mapsb.get(isb).get("numj").toString(); |
| | | // Integer numj = Integer.parseInt(numjs); |
| | | // count += numj; |
| | | // } |
| | | // map.put("Count", count); |
| | | // map.put("jurname", jurname); |
| | | // lists.add(map); |
| | | // } |
| | | // return R.data(lists); |
| | | // } |
| | | |
| | | /** |
| | | * 首页保安持证统计接口 |
| | |
| | | map.put("count", count); |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | map.put("count", count); |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | //保安总人数为0 |
| | | if (znum==0){ |
| | | continue; |
| | | } |
| | | else { |
| | | } else { |
| | | int a = znum / 2; |
| | | if (cznum<=a || sbnum<=a){ |
| | | count++; |
| | |
| | | map.put("count",count); |
| | | map.put("list",list1); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | //保安总人数为0 |
| | | if (znum==0){ |
| | | continue; |
| | | } |
| | | else { |
| | | } else { |
| | | int a = znum / 2; |
| | | if (cznum<=a || sbnum<=a){ |
| | | count++; |
| | |
| | | map.put("count", count); |
| | | map.put("List", list1); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | map.put("count", count); |
| | | map.put("List", list1); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | List<Map<Object, Object>> maps = informationService.selectCf(jurisdiction); |
| | | map.put("count", maps.size()); |
| | | return R.data(map); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) { |
| | | List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction); |
| | | return R.data(maps); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)){ |
| | | IPage list = informationService.selectTb(Condition.getPage(query), jurisdiction, enterpriseName); |
| | | return R.data(list); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) { |
| | | IPage list = informationService.selectJj(Condition.getPage(query), jurisdiction, enterpriseName); |
| | | return R.data(list); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) { |
| | | IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid, stats); |
| | | return R.data(list); |
| | | } |
| | | else { |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | |
| | | return R.data(lists); |
| | | } |
| | | |
| | | /** |
| | | * 分局预警统计 |
| | | */ |
| | | @PostMapping("/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; |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | //辖区id |
| | | String id = list.get(i).get("id").toString(); |
| | | //辖区名称 |
| | | String jurname = list.get(i).get("dept_name").toString(); |
| | | String childer = informationService.selJurchilder(id); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | //保安员表现差预警数量 |
| | | 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); |
| | | } |
| | | //保安员资格异常的数量 |
| | | 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); |
| | | } |
| | | //违规经营 |
| | | List<Map<Object, Object>> listwg = informationService.selectWg(jurisdiction); |
| | | int countwg = 0; |
| | | for (int ic = 0; ic < listwg.size(); ic++) { |
| | | //总数 |
| | | String znums = listwg.get(ic).get("znum").toString(); |
| | | int znum = Integer.parseInt(znums); |
| | | //持证人数 |
| | | String cznums = listwg.get(ic).get("cznum").toString(); |
| | | int cznum = Integer.parseInt(cznums); |
| | | //缴纳社保人数 |
| | | String sbnums = listwg.get(ic).get("sbnum").toString(); |
| | | int sbnum = Integer.parseInt(sbnums); |
| | | //保安总人数为0 |
| | | if (znum == 0) { |
| | | continue; |
| | | } else { |
| | | int a = znum / 2; |
| | | if (cznum <= a || sbnum <= a) { |
| | | countwg++; |
| | | } |
| | | } |
| | | } |
| | | //经营不善 |
| | | List<Map<Object, Object>> listjy = informationService.selectJy(jurisdiction); |
| | | int countjy = 0; |
| | | for (int iyc = 0; iyc < listjy.size(); iyc++) { |
| | | String num = listjy.get(iyc).get("fwnum").toString(); |
| | | int a = Integer.parseInt(num); |
| | | if (a == 0) { |
| | | countjy++; |
| | | } |
| | | } |
| | | //有实无名 |
| | | List<Map<Object, Object>> listwm = informationService.selectYs(jurisdiction); |
| | | int countwm = 0; |
| | | for (int iwm = 0; iwm < listwm.size(); iwm++) { |
| | | String num = listwm.get(iwm).get("znum").toString(); |
| | | int a = Integer.parseInt(num); |
| | | if (a == 0) { |
| | | countwm++; |
| | | } |
| | | } |
| | | //处罚 |
| | | List<Map<Object, Object>> maps = informationService.selectCf(jurisdiction); |
| | | int size = maps.size(); |
| | | map.put("Count", count+countjy+countwg+countwm+size); |
| | | map.put("jurname", jurname); |
| | | lists.add(map); |
| | | } |
| | | return R.data(lists); |
| | | } |
| | | |
| | | |
| | | } |