From b5960d1968e007b91d4d33dd7cbb74f1b566f2c1 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 24 May 2024 10:20:01 +0800
Subject: [PATCH] 到期时间修改
---
src/main/java/org/springblade/modules/information/controller/InformationController.java | 542 ++++++------------------------------------------------
1 files changed, 62 insertions(+), 480 deletions(-)
diff --git a/src/main/java/org/springblade/modules/information/controller/InformationController.java b/src/main/java/org/springblade/modules/information/controller/InformationController.java
index 0efc721..20d823a 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/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);
- }*/
-
-
/**
* 统计保安公司未持证的保安的公司数量
*/
@@ -380,11 +324,11 @@
String userlastmouth = list.get(i).get("userlastmouth").toString();
Integer userlastmouths = Integer.parseInt(userlastmouth);
tpznum += userlastmouths;
- //公司派遣总数
+
String usernums = list.get(i).get("usernum").toString();
Integer usernumss = Integer.parseInt(usernums);
pznum += usernumss;
-
+ //公司派遣总数
String userpcthismouth = list.get(i).get("userpcthismouth").toString();
Integer userpcthismouths = Integer.parseInt(userpcthismouth);
lznum += userpcthismouths;
@@ -467,12 +411,12 @@
List<Map<String, Object>> lists = new ArrayList<>();
Integer a = 0;
Integer b = 0;
- Integer num=0;
- Integer znum=0;
- Integer cznum=0;
- Integer sbnum=0;
- Integer khnum=0;
- Integer pqnum=0;
+ Integer num = 0;
+ Integer znum = 0;
+ Integer cznum = 0;
+ Integer sbnum = 0;
+ Integer khnum = 0;
+ Integer pqnum = 0;
Integer zca = 0;
Integer zcb = 0;
Integer cza = 0;
@@ -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);
//正常保安员数量
@@ -702,31 +654,6 @@
return sortedMap;
}
-//
-// /**
-// * 统计保安员资格异常的数量
-// *
-// * @param jurisdiction
-// * @param deptid
-// * @param type 1:当天 2:当月 3:全部
-// * @return
-// */
-// @PostMapping("/selectExtype")
-// 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, type);
-// for (int i = 0; i < maps.size(); i++) {
-// String num = maps.get(i).get("num").toString();
-// count += Integer.valueOf(num);
-// }
-// map.put("count", count);
-// map.put("list", maps);
-// lists.add(map);
-// return R.data(lists);
-// }
-
/**
* 统计用户资格异常的数量
*
@@ -738,109 +665,6 @@
}
- /**
- * 统计保安员表现差的数量
- *
- * @param jurisdiction
- * @param deptid
- * @param type 1:当天 2:当月 3:全部
- * @return
- *//*
- @PostMapping("/selectBx")
- 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, type);
- for (int i = 0; i < maps.size(); i++) {
- String num = maps.get(i).get("num").toString();
- count += Integer.valueOf(num);
- }
- map.put("count", count);
- map.put("list", maps);
- 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 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++) {
-// 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 += i1;
-// }
-// map.put("Count", count);
-// map.put("jurname", jurname);
-// lists.add(map);
-// }
-// return R.data(lists);
-// }
-
-
-// /**
-// * 派遣數量統計
-// */
-// @PostMapping("/selectPCount")
-// 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);
-// 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);
-// lists.add(map);
-// return R.data(lists);
-// }
-
-// /**
-// * 单位列表
-// */
-// @PostMapping("/selectIn")
-// public R selectIn(String jurisdiction) {
-// List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction);
-// return R.data(maps);
-// }
/**
* 单位删除
@@ -855,8 +679,8 @@
* 保安员统计
*/
@PostMapping("/selectLi")
- public R<IPage> selectLi(String jurisdiction, String deptid, String stats,String startTime,String endTime, Query query) {
- IPage list = informationService.selectLi(Condition.getPage(query), jurisdiction, deptid, stats,startTime,endTime);
+ public R<IPage> selectLi(String jurisdiction, String deptid, String stats, String startTime, String endTime, Query query) {
+ IPage list = informationService.selectLi(Condition.getPage(query), jurisdiction, deptid, stats, startTime, endTime);
return R.data(list);
}
@@ -884,33 +708,6 @@
list.add(map);
return R.data(list);
}
-
-// /**
-// * 公司运营情况进入图表
-// */
-// @PostMapping("/selectTb")
-// public R<IPage> selectTb(String jurisdiction, String enterpriseName, Query query) {
-// IPage list = informationService.selectTb(Condition.getPage(query), jurisdiction, enterpriseName);
-// return R.data(list);
-// }
-//
-// /**
-// * 公司经济情况进入图表
-// */
-// @PostMapping("/selectJj")
-// public R<IPage> selectJj(String jurisdiction, String enterpriseName, Query query) {
-// IPage list = informationService.selectJj(Condition.getPage(query), jurisdiction, enterpriseName);
-// return R.data(list);
-// }
-//
-// /**
-// * 业务统计情况
-// */
-// @PostMapping("/selectYw")
-// public R<IPage> selectYw(String jurisdiction, String deptid,String stats, Query query) {
-// IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid,stats);
-// return R.data(list);
-// }
/**
* 保安员详情
@@ -940,19 +737,6 @@
return R.data(list);
}
-// /**
-// * 公司处罚数量统计
-// */
-// @PostMapping("/selectCf")
-// public R selectCf(String jurisdiction) {
-// Map<String, Object> map = new HashMap<String, Object>();
-// Integer count = 0;
-// List<Map<String, Object>> lists = new ArrayList<>();
-// List<Map<Object, Object>> maps = informationService.selectCf(jurisdiction);
-// map.put("count", maps.size());
-// return R.data(map);
-// }
-
/**
* 公司材料不全数量统计
*/
@@ -971,86 +755,6 @@
lists.add(map);
return R.data(lists);
}
-
-// /**
-// * 违规经营
-// */
-// @PostMapping("/selectWg")
-// public R selectWg(String jurisdiction) {
-// List<Map<Object, Object>> list = informationService.selectWg(jurisdiction);
-// List list1 = new ArrayList();
-// int count=0;
-// Map map = new HashMap();
-// for (int i = 0; i < list.size(); i++) {
-// //总数
-// String znums = list.get(i).get("znum").toString();
-// int znum = Integer.parseInt(znums);
-// //持证人数
-// String cznums = list.get(i).get("cznum").toString();
-// int cznum = Integer.parseInt(cznums);
-// //缴纳社保人数
-// String sbnums = list.get(i).get("sbnum").toString();
-// int sbnum = Integer.parseInt(sbnums);
-// //保安总人数为0
-// if (znum==0){
-// continue;
-// }
-// else {
-// int a = znum / 2;
-// if (cznum<=a || sbnum<=a){
-// count++;
-// list1.add(list.get(i));
-// }
-// }
-// }
-// map.put("count",count);
-// map.put("list",list1);
-// return R.data(map);
-// }
-
-// /**
-// * 经营不善
-// */
-// @PostMapping("/selectJy")
-// public R selectJy(String jurisdiction) {
-// List<Map<Object, Object>> list = informationService.selectJy(jurisdiction);
-// List list1 = new ArrayList();
-// Map map = new HashMap();
-// int count = 0;
-// for (int i = 0; i < list.size(); i++) {
-// String num = list.get(i).get("fwnum").toString();
-// int a = Integer.parseInt(num);
-// if (a == 0) {
-// count++;
-// list1.add(list.get(i));
-// }
-// }
-// map.put("count", count);
-// map.put("List", list1);
-// return R.data(map);
-// }
-
-// /**
-// * 有实无名
-// */
-// @PostMapping("/selectYs")
-// public R selectYs(String jurisdiction) {
-// List<Map<Object, Object>> list = informationService.selectYs(jurisdiction);
-// List list1 = new ArrayList();
-// Map map = new HashMap();
-// int count = 0;
-// for (int i = 0; i < list.size(); i++) {
-// String num = list.get(i).get("znum").toString();
-// int a = Integer.parseInt(num);
-// if (a == 0) {
-// count++;
-// list1.add(list.get(i));
-// }
-// }
-// map.put("count", count);
-// map.put("List", list1);
-// return R.data(map);
-// }
/**
* @return
@@ -1117,57 +821,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, 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);
-// }
/**
* 首页保安持证统计接口
@@ -1237,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);
@@ -1306,7 +959,7 @@
*/
@PostMapping("/selectWg")
public R selectWg(String jurisdiction) {
- if (jurisdiction.equals("1372091709474910209")) {
+ if (jurisdiction.equals("1372091709474910209") || jurisdiction.equals("") ) {
List<Map<Object, Object>> list = informationService.selectWg(jurisdiction);
List list1 = new ArrayList();
int count = 0;
@@ -1567,19 +1220,19 @@
* 业务统计情况
*/
@PostMapping("/selectYw")
- public R<IPage> selectYw(String jurisdiction, String deptid, String stats,String startTime,String endTime,Query query) {
+ public R<IPage> selectYw(String jurisdiction, String deptid, String stats, String startTime, String endTime, Query query) {
if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)) {
- IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid, stats,startTime,endTime);
+ IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid, stats, startTime, endTime);
return R.data(list);
} 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);
- IPage list = informationService.selectYw(Condition.getPage(query), jurisdictiond, deptid, stats,startTime,endTime);
+// 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);
+ IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid, stats, startTime, endTime);
return R.data(list);
}
}
@@ -1588,12 +1241,12 @@
public R selectPCount(String jurisdiction, String deptid) {
Map<String, Object> map = new HashMap<String, Object>();
List<Map<String, Object>> lists = new ArrayList<>();
- String childer = informationService.selJurchilder(jurisdiction);
- String[] split = childer.split(",");
- String strArrays = "";
- for (int j = 0; j < split.length; j++) {
- strArrays += "'" + split[j] + "',";
- }
+// String childer = informationService.selJurchilder(jurisdiction);
+// String[] split = childer.split(",");
+// String strArrays = "";
+// for (int j = 0; j < split.length; j++) {
+// strArrays += "'" + split[j] + "',";
+// }
Integer pnums = 0;
Integer wpnums = 0;
if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)) {
@@ -1607,8 +1260,8 @@
wpnums += b;
}
} else {
- String jurisdictiond = strArrays.substring(0, strArrays.length() - 1);
- List<Map<String, Object>> list = informationService.seleP(jurisdictiond, deptid);
+ //String jurisdictiond = strArrays.substring(0, strArrays.length() - 1);
+ List<Map<String, Object>> list = informationService.seleP(jurisdiction, deptid);
for (int i = 0; i < list.size(); i++) {
String pnum = list.get(i).get("pnum").toString();
Integer a = Integer.parseInt(pnum);
@@ -1629,93 +1282,6 @@
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, 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);
- }*/
/**
* 分局预警统计
@@ -1796,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));
+ }
}
--
Gitblit v1.9.3