智慧保安后台管理项目备份
zhongrj
2024-05-24 b5960d1968e007b91d4d33dd7cbb74f1b566f2c1
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -197,62 +197,6 @@
      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);
   }*/
   /**
    * 统计保安公司未持证的保安的公司数量
    */
@@ -483,6 +427,7 @@
      Integer khb = 0;
      Integer pqa = 0;
      Integer pqb = 0;
      Integer integer = 0;
      String deptname = null;
      String jurname = null;
      //保安员数量
@@ -503,10 +448,17 @@
         b += Integer.valueOf(lastnum);
         String nums = maps.get(i).get("num").toString();
         num += Integer.valueOf(nums);
         String fznums = maps.get(i).get("fznum").toString();
         integer += Integer.valueOf(fznums);
      }
      map.put("thisnum", a);
      map.put("lastnum", b);
      map.put("num", num);
      if(deptid.equals("")|| deptid.equals("null")){
         map.put("num", num-integer);
      }
      else {
         map.put("num", num);
      }
      map.put("List", maps);
      mapC.put("baoan", map);
      //正常保安员数量
@@ -713,15 +665,6 @@
   }
//   /**
//    * 单位列表
//    */
//   @PostMapping("/selectIn")
//   public R selectIn(String jurisdiction) {
//      List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction);
//      return R.data(maps);
//   }
   /**
    * 单位删除
@@ -947,14 +890,14 @@
         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);
@@ -1340,93 +1283,6 @@
      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);
   }*/
   /**
    * 分局预警统计
    */
@@ -1506,4 +1362,20 @@
      }
      return R.data(lists);
   }
   @PostMapping("/selectBxc")
   public R<IPage> selectBxc(String jurisdiction,String type,Query query) {
      IPage maps = informationService.selectBxc(Condition.getPage(query), jurisdiction,type);
      return R.data(maps);
   }
   /**
    * 获取部门信息()
    * @param information
    * @return
    */
   @GetMapping("/getInformationDetails")
   public R getInformationDetails(InformationVO information) {
      return R.data(informationService.getInformationDetails(information));
   }
}