zengh
2021-08-15 0cab6d8afcc97e8bc94ef200e24d8839281f44c8
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -605,16 +605,19 @@
   }
   /**
    * 统计保安员资格异常的数量
    * @param jurisdiction
    * @param deptid
    * @param type 1:当天  2:当月 3:全部
    * @return
    */
   @PostMapping("/selectExtype")
   public R selectExtype(String jurisdiction,String deptid) {
   public R selectExtype(String jurisdiction,String deptid,String type) {
      Map<String, Object> map = new HashMap<String, Object>();
      Integer count=0;
      List<Map<String, Object>> lists = new ArrayList<>();
      List<Map<Object, Object>> maps = informationService.selectExtype(jurisdiction, deptid);
      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);
@@ -625,15 +628,20 @@
      return R.data(lists);
   }
   /**
    * 统计保安员表现差的数量
    * @param jurisdiction
    * @param deptid
    * @param type 1:当天  2:当月 3:全部
    * @return
    */
   @PostMapping("/selectBx")
   public R selectBx(String jurisdiction,String deptid) {
   public R selectBx(String jurisdiction,String deptid,String type) {
      Map<String, Object> map = new HashMap<String, Object>();
      Integer count=0;
      List<Map<String, Object>> lists = new ArrayList<>();
      List<Map<Object, Object>> maps = informationService.selectBx(jurisdiction, deptid);
      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);
@@ -663,13 +671,13 @@
         //辖区名称
         String jurname = list.get(i).get("dept_name").toString();
         //保安员表现差预警数量
         List<Map<Object, Object>> mapbx = informationService.selectBx(jurisdiction, "");
         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, "");
         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);
@@ -736,4 +744,38 @@
      return R.success("删除成功");
   }
   /**
    * 保安员统计
    */
   @PostMapping("/selectLi")
   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) {
      List<Map<Object, Object>> list = informationService.seCountI(jurisdiction, deptid);
      return R.data(list);
   }
   /**
    * 保安在职男女数量
    */
   @PostMapping("/seCountUg")
   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);
      List list = new ArrayList();
      list.add(map);
      return R.data(list);
   }
}