| | |
| | | return R.success("删除成功"); |
| | | } |
| | | |
| | | // /** |
| | | // * 首页保安公司统计接口 |
| | | // * |
| | | // * @return |
| | | // */ |
| | | // @PostMapping("/SelectCount") |
| | | // public R SelectCount() { |
| | | // List<Map<Object, String>> list = iDeptService.selectCount(); |
| | | // List<Map<String, Object>> lists = new ArrayList<>(); |
| | | // for (int i = 0; i < list.size(); i++) { |
| | | // String title = list.get(i).get("title");//部门名称 |
| | | // String departmentid = String.valueOf(list.get(i).get("jurisdiction"));//部门id |
| | | // Map<String, Object> map = new HashMap<String, Object>(); |
| | | // Map maps = informationService.selectCount(departmentid); |
| | | // map.put("name", title); |
| | | // map.put("server", maps); |
| | | // lists.add(map); |
| | | // } |
| | | // return R.data(lists); |
| | | // } |
| | | |
| | | /** |
| | | * 首页保安持证统计接口 |
| | | * |
| | | * @return |
| | | *//* |
| | | @PostMapping("/SelectCounthold") |
| | | public R SelectCounthold() { |
| | | List<Map<Object, String>> list = iDeptService.selectCount(); |
| | | List<Map<String, Object>> lists = new ArrayList<>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | int cznumber = 0;//总的持证数量 |
| | | int wcznumber = 0;//总的未持证数量 |
| | | 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) { |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | | map.put("wcz", wcznumber); |
| | | lists.add(map); |
| | | } else { |
| | | String cz = objectStringMap.get("cz").toString(); |
| | | cznumber = Integer.valueOf(cz); |
| | | String wcz = objectStringMap.get("wcz").toString(); |
| | | wcznumber = Integer.valueOf(wcz); |
| | | map.put("name", title); |
| | | map.put("cz", cznumber); |
| | | map.put("wcz", wcznumber); |
| | | lists.add(map); |
| | | } |
| | | } |
| | | return R.data(lists); |
| | | }*/ |
| | | |
| | | |
| | | /** |
| | | * 统计保安公司未持证的保安的公司数量 |
| | | */ |
| | |
| | | } |
| | | map.put("thisnum", a); |
| | | map.put("lastnum", b); |
| | | map.put("num", num-integer); |
| | | if(deptid.equals("")|| deptid.equals("null")){ |
| | | map.put("num", num-integer); |
| | | } |
| | | else { |
| | | map.put("num", num); |
| | | } |
| | | map.put("List", maps); |
| | | mapC.put("baoan", map); |
| | | //正常保安员数量 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | // /** |
| | | // * 单位列表 |
| | | // */ |
| | | // @PostMapping("/selectIn") |
| | | // public R selectIn(String jurisdiction) { |
| | | // List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction); |
| | | // return R.data(maps); |
| | | // } |
| | | |
| | | /** |
| | | * 单位删除 |
| | |
| | | map.put("list", maps); |
| | | lists.add(map); |
| | | } else { |
| | | String childer = informationService.selJurchilder(jurisdiction); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdictiond = strArrays.substring(0, strArrays.length() - 1); |
| | | List<Map<Object, Object>> maps = informationService.selectBx(jurisdictiond, deptid, type); |
| | | // String childer = informationService.selJurchilder(jurisdiction); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdictiond = strArrays.substring(0, strArrays.length() - 1); |
| | | 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); |