From 30df94c05573a426d030510d4dd58ae1d93bfb7a Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 06 Dec 2021 14:03:37 +0800
Subject: [PATCH] 1.资格审查排序

---
 src/main/java/org/springblade/modules/information/controller/InformationController.java |  441 +++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 362 insertions(+), 79 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 5468e92..9b8ce57 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -320,6 +320,70 @@
 	}
 
 
+//	/**
+//	 * 统计这个月和上个月交社保的人数,以及金额
+//	 *
+//	 * @return
+//	 */
+//	@PostMapping("/selectTo")
+//	public R selectTo(String jurisdiction, String deptid) {
+//		//上个月人数数量
+//		Integer lnum = 0;
+//		//这个月人数数量
+//		Integer tnum = 0;
+//		//上个月派遣人数
+//		Integer tpznum = 0;
+//		//这个月人数数量
+//		Integer lpznum = 0;
+//		//上个月总人数
+//		Integer tznum = 0;
+//		//这个月总人数
+//		Integer lznum = 0;
+//		//上个月金额
+//		Double lmount = 0.0;
+//		//这个月金额
+//		Double tmount = 0.0;
+//		Map<String, Object> map = new HashMap<String, Object>();
+//		List<Map<String, Object>> lists = new ArrayList<>();
+//		List<Map<String, Object>> list = informationService.selectTo(jurisdiction, deptid);
+//		for (int i = 0; i < list.size(); i++) {
+//			String lastmonths = list.get(i).get("lastmonth").toString();
+//			Integer lastmonth = Integer.parseInt(lastmonths);
+//			lnum += lastmonth;
+//			String thismouths = list.get(i).get("thismouth").toString();
+//			Integer thismouth = Integer.parseInt(thismouths);
+//			tnum += thismouth;
+//			String lastamounts = list.get(i).get("lastamount").toString();
+//			Double lastamount = Double.parseDouble(lastamounts);
+//			lmount += lastamount;
+//			String thisamounts = list.get(i).get("thisamount").toString();
+//			Double thisamount = Double.parseDouble(thisamounts);
+//			tmount += thisamount;
+//			String userthismouth = list.get(i).get("userthismouth").toString();
+//			Integer userthismouths = Integer.parseInt(userthismouth);
+//			lpznum += userthismouths;
+//			String userlastmouth = list.get(i).get("userlastmouth").toString();
+//			Integer userlastmouths = Integer.parseInt(userlastmouth);
+//			tpznum += userlastmouths;
+//			String userpcthismouth = list.get(i).get("userpcthismouth").toString();
+//			Integer userpcthismouths = Integer.parseInt(userpcthismouth);
+//			lznum += userpcthismouths;
+//			String userpclastmouth = list.get(i).get("userpclastmouth").toString();
+//			Integer userpclastmouths = Integer.parseInt(userpclastmouth);
+//			tznum += userpclastmouths;
+//		}
+//		map.put("lastmonth", lnum);
+//		map.put("thismouth", tnum);
+//		map.put("lastamount", lmount);
+//		map.put("thisamount", tmount);
+//		map.put("userlastmouth", tpznum);
+//		map.put("userthismouth", lpznum);
+//		map.put("userpcthismouth", lznum);
+//		map.put("userpclastmouth", tznum);
+//		lists.add(map);
+//		return R.data(lists);
+//	}
+
 	/**
 	 * 统计这个月和上个月交社保的人数,以及金额
 	 *
@@ -331,18 +395,22 @@
 		Integer lnum = 0;
 		//这个月人数数量
 		Integer tnum = 0;
+		Integer znum = 0;
 		//上个月派遣人数
 		Integer tpznum = 0;
 		//这个月人数数量
 		Integer lpznum = 0;
+		Integer pznum = 0;
 		//上个月总人数
 		Integer tznum = 0;
 		//这个月总人数
 		Integer lznum = 0;
+		Integer sbnum = 0;
 		//上个月金额
 		Double lmount = 0.0;
 		//这个月金额
 		Double tmount = 0.0;
+		Double tamountnum = 0.0;
 		Map<String, Object> map = new HashMap<String, Object>();
 		List<Map<String, Object>> lists = new ArrayList<>();
 		List<Map<String, Object>> list = informationService.selectTo(jurisdiction, deptid);
@@ -353,36 +421,61 @@
 			String thismouths = list.get(i).get("thismouth").toString();
 			Integer thismouth = Integer.parseInt(thismouths);
 			tnum += thismouth;
+			//社保总数
+			String nums = list.get(i).get("num").toString();
+			Integer numss = Integer.parseInt(nums);
+			znum += numss;
+
 			String lastamounts = list.get(i).get("lastamount").toString();
 			Double lastamount = Double.parseDouble(lastamounts);
 			lmount += lastamount;
 			String thisamounts = list.get(i).get("thisamount").toString();
 			Double thisamount = Double.parseDouble(thisamounts);
 			tmount += thisamount;
+			//缴纳总数
+			String amountnums = list.get(i).get("amountnum").toString();
+			Double amountnumss = Double.parseDouble(amountnums);
+			tamountnum += amountnumss;
+
 			String userthismouth = list.get(i).get("userthismouth").toString();
 			Integer userthismouths = Integer.parseInt(userthismouth);
 			lpznum += userthismouths;
 			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;
 			String userpclastmouth = list.get(i).get("userpclastmouth").toString();
 			Integer userpclastmouths = Integer.parseInt(userpclastmouth);
 			tznum += userpclastmouths;
+			//缴纳社保总数
+			String userpcnums = list.get(i).get("userpcnum").toString();
+			Integer userpcnumss = Integer.parseInt(userpcnums);
+			sbnum += userpcnumss;
+
 		}
 		map.put("lastmonth", lnum);
 		map.put("thismouth", tnum);
+		map.put("znum", znum);
 		map.put("lastamount", lmount);
 		map.put("thisamount", tmount);
+		map.put("tamountnum", tamountnum);
 		map.put("userlastmouth", tpznum);
 		map.put("userthismouth", lpznum);
+		map.put("usernum", pznum);
 		map.put("userpcthismouth", lznum);
 		map.put("userpclastmouth", tznum);
+		map.put("userpcnum", sbnum);
 		lists.add(map);
 		return R.data(lists);
 	}
+
 
 
 	/**
@@ -438,6 +531,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 zca = 0;
 		Integer zcb = 0;
 		Integer cza = 0;
@@ -448,6 +547,7 @@
 		Integer khb = 0;
 		Integer pqa = 0;
 		Integer pqb = 0;
+		Integer integer = 0;
 		String deptname = null;
 		String jurname = null;
 		//保安员数量
@@ -466,10 +566,20 @@
 			//上个月数量
 			String lastnum = maps.get(i).get("lastnum").toString();
 			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);
+//		if(deptid.equals("")|| deptid.equals("null")){
+//			map.put("num", num-integer);
+//		}
+//		else {
+//			map.put("num", num);
+//		}
+		map.put("num", num);
 		map.put("List", maps);
 		mapC.put("baoan", map);
 		//正常保安员数量
@@ -481,9 +591,12 @@
 			//上个月数量
 			String lastnum = maps1.get(i).get("lastnum").toString();
 			zcb += Integer.valueOf(lastnum);
+			String nums = maps1.get(i).get("num").toString();
+			znum += Integer.valueOf(nums);
 		}
 		mapzc.put("thisnum", zca);
 		mapzc.put("lastnum", zcb);
+		mapzc.put("num", znum);
 		mapzc.put("List", maps1);
 		mapC.put("zcbaoan", mapzc);
 		//持证保安数量
@@ -495,9 +608,12 @@
 			//上个月数量
 			String lastnum = maps2.get(i).get("lastnum").toString();
 			czb += Integer.valueOf(lastnum);
+			String nums = maps2.get(i).get("num").toString();
+			cznum += Integer.valueOf(nums);
 		}
 		mapcz.put("thisnum", cza);
 		mapcz.put("lastnum", czb);
+		mapcz.put("num", cznum);
 		mapcz.put("List", maps2);
 		mapC.put("czbaoan", mapcz);
 		//缴纳社保数量
@@ -509,9 +625,12 @@
 			//上个月数量
 			String lastnum = maps3.get(i).get("lastnum").toString();
 			sbb += Integer.valueOf(lastnum);
+			String nums = maps3.get(i).get("num").toString();
+			sbnum += Integer.valueOf(nums);
 		}
 		mapsb.put("thisnum", sba);
 		mapsb.put("lastnum", sbb);
+		mapsb.put("num", sbnum);
 		mapsb.put("List", maps3);
 		mapC.put("sheb", mapsb);
 		//服务客户数量
@@ -523,9 +642,12 @@
 			//上个月数量
 			String lastnum = maps4.get(i).get("lastnum").toString();
 			khb += Integer.valueOf(lastnum);
+			String nums = maps4.get(i).get("num").toString();
+			khnum += Integer.valueOf(nums);
 		}
 		mapkh.put("thisnum", kha);
 		mapkh.put("lastnum", khb);
+		mapkh.put("num", khnum);
 		mapkh.put("List", maps4);
 		mapC.put("kh", mapkh);
 		//保安派遣数量
@@ -537,14 +659,136 @@
 			//上个月数量
 			String lastnum = maps5.get(i).get("lastnum").toString();
 			pqb += Integer.valueOf(lastnum);
+			String nums = maps5.get(i).get("num").toString();
+			pqnum += Integer.valueOf(nums);
 		}
 		mappq.put("thisnum", pqa);
 		mappq.put("lastnum", pqb);
+		mappq.put("num", pqnum);
 		mappq.put("List", maps5);
 		mapC.put("paiq", mappq);
 		lists.add(mapC);
 		return R.data(lists);
 	}
+
+
+//	/**
+//	 * 公司运营智能统计
+//	 *
+//	 * @return
+//	 */
+//	@GetMapping("/queryCounts")
+//	public R queryCounts(String jurisdiction, String deptid) {
+//		List<Map<String, Object>> lists = new ArrayList<>();
+//		Integer a = 0;
+//		Integer b = 0;
+//		Integer zca = 0;
+//		Integer zcb = 0;
+//		Integer cza = 0;
+//		Integer czb = 0;
+//		Integer sba = 0;
+//		Integer sbb = 0;
+//		Integer kha = 0;
+//		Integer khb = 0;
+//		Integer pqa = 0;
+//		Integer pqb = 0;
+//		String deptname = null;
+//		String jurname = null;
+//		//保安员数量
+//		Map<String, Object> map = new HashMap<String, Object>();
+//		Map<String, Object> mapzc = new HashMap<String, Object>();
+//		Map<String, Object> mapcz = new HashMap<String, Object>();
+//		Map<String, Object> mapsb = new HashMap<String, Object>();
+//		Map<String, Object> mapkh = new HashMap<String, Object>();
+//		Map<String, Object> mappq = new HashMap<String, Object>();
+//		Map<String, Object> mapC = new HashMap<String, Object>();
+//		List<Map<Object, Object>> maps = informationService.queryCountB(jurisdiction, deptid);
+//		for (int i = 0; i < maps.size(); i++) {
+//			//这个月数量
+//			String thisnum = maps.get(i).get("thisnum").toString();
+//			a += Integer.valueOf(thisnum);
+//			//上个月数量
+//			String lastnum = maps.get(i).get("lastnum").toString();
+//			b += Integer.valueOf(lastnum);
+//
+//		}
+//		map.put("thisnum", a);
+//		map.put("lastnum", b);
+//		map.put("List", maps);
+//		mapC.put("baoan", map);
+//		//正常保安员数量
+//		List<Map<Object, Object>> maps1 = informationService.queryCountZc(jurisdiction, deptid);
+//		for (int i = 0; i < maps1.size(); i++) {
+//			//这个月数量
+//			String thisnum = maps1.get(i).get("thisnum").toString();
+//			zca += Integer.valueOf(thisnum);
+//			//上个月数量
+//			String lastnum = maps1.get(i).get("lastnum").toString();
+//			zcb += Integer.valueOf(lastnum);
+//		}
+//		mapzc.put("thisnum", zca);
+//		mapzc.put("lastnum", zcb);
+//		mapzc.put("List", maps1);
+//		mapC.put("zcbaoan", mapzc);
+//		//持证保安数量
+//		List<Map<Object, Object>> maps2 = informationService.queryCountCz(jurisdiction, deptid);
+//		for (int i = 0; i < maps2.size(); i++) {
+//			//这个月数量
+//			String thisnum = maps2.get(i).get("thisnum").toString();
+//			cza += Integer.valueOf(thisnum);
+//			//上个月数量
+//			String lastnum = maps2.get(i).get("lastnum").toString();
+//			czb += Integer.valueOf(lastnum);
+//		}
+//		mapcz.put("thisnum", cza);
+//		mapcz.put("lastnum", czb);
+//		mapcz.put("List", maps2);
+//		mapC.put("czbaoan", mapcz);
+//		//缴纳社保数量
+//		List<Map<Object, Object>> maps3 = informationService.queryCountSb(jurisdiction, deptid);
+//		for (int i = 0; i < maps3.size(); i++) {
+//			//这个月数量
+//			String thisnum = maps3.get(i).get("thisnum").toString();
+//			sba += Integer.valueOf(thisnum);
+//			//上个月数量
+//			String lastnum = maps3.get(i).get("lastnum").toString();
+//			sbb += Integer.valueOf(lastnum);
+//		}
+//		mapsb.put("thisnum", sba);
+//		mapsb.put("lastnum", sbb);
+//		mapsb.put("List", maps3);
+//		mapC.put("sheb", mapsb);
+//		//服务客户数量
+//		List<Map<Object, Object>> maps4 = informationService.queryCountKh(jurisdiction, deptid);
+//		for (int i = 0; i < maps4.size(); i++) {
+//			//这个月数量
+//			String thisnum = maps4.get(i).get("thisnum").toString();
+//			kha += Integer.valueOf(thisnum);
+//			//上个月数量
+//			String lastnum = maps4.get(i).get("lastnum").toString();
+//			khb += Integer.valueOf(lastnum);
+//		}
+//		mapkh.put("thisnum", kha);
+//		mapkh.put("lastnum", khb);
+//		mapkh.put("List", maps4);
+//		mapC.put("kh", mapkh);
+//		//保安派遣数量
+//		List<Map<Object, Object>> maps5 = informationService.queryCountPq(jurisdiction, deptid);
+//		for (int i = 0; i < maps5.size(); i++) {
+//			//这个月数量
+//			String thisnum = maps5.get(i).get("thisnum").toString();
+//			pqa += Integer.valueOf(thisnum);
+//			//上个月数量
+//			String lastnum = maps5.get(i).get("lastnum").toString();
+//			pqb += Integer.valueOf(lastnum);
+//		}
+//		mappq.put("thisnum", pqa);
+//		mappq.put("lastnum", pqb);
+//		mappq.put("List", maps5);
+//		mapC.put("paiq", mappq);
+//		lists.add(mapC);
+//		return R.data(lists);
+//	}
 
 
 	/**
@@ -764,22 +1008,23 @@
 
 	/**
 	 * 派遣數量統計
-	 */
-	@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("/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);
+//	}
+
 
 //	/**
 //	 * 单位列表
@@ -803,8 +1048,8 @@
 	 * 保安员统计
 	 */
 	@PostMapping("/selectLi")
-	public R<IPage> selectLi(String jurisdiction, String deptid,String stats, Query query) {
-		IPage list = informationService.selectLi(Condition.getPage(query), jurisdiction, deptid,stats);
+	public R<IPage> selectLi(String jurisdiction, String deptid, String stats, Query query) {
+		IPage list = informationService.selectLi(Condition.getPage(query), jurisdiction, deptid, stats);
 		return R.data(list);
 	}
 
@@ -864,8 +1109,8 @@
 	 * 保安员详情
 	 */
 	@PostMapping("/selectUIn")
-	public R<IPage> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil,Query query) {
-		IPage list = informationService.selectUIn(Condition.getPage(query),deptid, name, hold, photo, examinationtype, dispatch, soil);
+	public R<IPage> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil, Query query) {
+		IPage list = informationService.selectUIn(Condition.getPage(query), deptid, name, hold, photo, examinationtype, dispatch, soil);
 		return R.data(list);
 	}
 
@@ -1015,7 +1260,7 @@
 			if (a <= 0) {
 				continue;
 			} else if (a >= 19 && a < 35) {
-				qcount ++;
+				qcount++;
 			} else if (a >= 36 && a < 59) {
 				zcount++;
 			} else {
@@ -1023,12 +1268,11 @@
 			}
 		}
 		Map map = new HashMap();
-		map.put("qcount",qcount);
-		map.put("zcount",zcount);
-		map.put("lcount",lcount);
+		map.put("qcount", qcount);
+		map.put("zcount", zcount);
+		map.put("lcount", lcount);
 		return R.data(map);
 	}
-
 
 
 	/**
@@ -1041,7 +1285,7 @@
 		//查出所有辖区
 		List<Map<Object, Object>> list = informationService.selJur();
 		List<Map<String, Object>> lists = new ArrayList<>();
-		for (int i = 0; i < list.size(); i++){
+		for (int i = 0; i < list.size(); i++) {
 			Map<String, Object> map = new HashMap<String, Object>();
 			Map<String, Object> mapc = new HashMap<String, Object>();
 			String id = list.get(i).get("id").toString();
@@ -1054,11 +1298,11 @@
 			}
 			String substring = strArrays.substring(0, strArrays.length() - 1);
 			List<Map<Object, Object>> maps = informationService.seleJuList(substring);
-			mapc.put("confess",maps.get(0).get("num"));
-			mapc.put("staff",maps.get(1).get("num"));
-			mapc.put("security",maps.get(2).get("num"));
-			mapc.put("armed",maps.get(3).get("num"));
-			mapc.put("region",maps.get(4).get("num"));
+			mapc.put("confess", maps.get(0).get("num"));
+			mapc.put("staff", maps.get(1).get("num"));
+			mapc.put("security", maps.get(2).get("num"));
+			mapc.put("armed", maps.get(3).get("num"));
+			mapc.put("region", maps.get(4).get("num"));
 			map.put("name", list.get(i).get("deptname"));
 			map.put("server", mapc);
 			lists.add(map);
@@ -1147,19 +1391,19 @@
 			String deptid = strArrays.substring(0, strArrays.length() - 1);
 			Map<String, Object> map = new HashMap<String, Object>();
 			List<Map<String, Object>> objectStringMap = iDeptService.selectHold(deptid);
-			if (objectStringMap.size()==0) {
+			if (objectStringMap.size() == 0) {
 				map.put("name", list.get(i).get("deptname"));
 				map.put("cz", cznumber);
 				map.put("wcz", wcznumber);
 				lists.add(map);
 			} else {
-				for (int c=0;c<objectStringMap.size();c++){
+				for (int c = 0; c < objectStringMap.size(); c++) {
 					String cz = objectStringMap.get(c).get("cz").toString();
 					cznumber += Integer.valueOf(cz);
 					String wcz = objectStringMap.get(c).get("wcz").toString();
 					wcznumber += Integer.valueOf(wcz);
 				}
-				map.put("name",  list.get(i).get("deptname"));
+				map.put("name", list.get(i).get("deptname"));
 				map.put("cz", cznumber);
 				map.put("wcz", wcznumber);
 				lists.add(map);
@@ -1182,7 +1426,7 @@
 		Map<String, Object> map = new HashMap<String, Object>();
 		Integer count = 0;
 		List<Map<String, Object>> lists = new ArrayList<>();
-		if (jurisdiction.equals("1372091709474910209")){
+		if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction) ) {
 			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();
@@ -1191,8 +1435,7 @@
 			map.put("count", count);
 			map.put("list", maps);
 			lists.add(map);
-		}
-		else {
+		} else {
 			String childer = informationService.selJurchilder(jurisdiction);
 			String[] split = childer.split(",");
 			String strArrays = "";
@@ -1214,7 +1457,6 @@
 	}
 
 
-
 	/**
 	 * 统计保安员资格异常的数量
 	 *
@@ -1228,7 +1470,7 @@
 		Map<String, Object> map = new HashMap<String, Object>();
 		Integer count = 0;
 		List<Map<String, Object>> lists = new ArrayList<>();
-		if (jurisdiction.equals("1372091709474910209")) {
+		if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)) {
 			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();
@@ -1237,8 +1479,7 @@
 			map.put("count", count);
 			map.put("list", maps);
 			lists.add(map);
-		}
-		else {
+		} else {
 			String childer = informationService.selJurchilder(jurisdiction);
 			String[] split = childer.split(",");
 			String strArrays = "";
@@ -1264,10 +1505,10 @@
 	 */
 	@PostMapping("/selectWg")
 	public R selectWg(String jurisdiction) {
-		if (jurisdiction.equals("1372091709474910209")){
+		if (jurisdiction.equals("1372091709474910209")) {
 			List<Map<Object, Object>> list = informationService.selectWg(jurisdiction);
 			List list1 = new ArrayList();
-			int count=0;
+			int count = 0;
 			Map map = new HashMap();
 			for (int i = 0; i < list.size(); i++) {
 				//总数
@@ -1280,22 +1521,20 @@
 				String sbnums = list.get(i).get("sbnum").toString();
 				int sbnum = Integer.parseInt(sbnums);
 				//保安总人数为0
-				if (znum==0){
+				if (znum == 0) {
 					continue;
-				}
-				else {
+				} else {
 					int a = znum / 2;
-					if (cznum<=a || sbnum<=a){
+					if (cznum <= a || sbnum <= a) {
 						count++;
 						list1.add(list.get(i));
 					}
 				}
 			}
-			map.put("count",count);
-			map.put("list",list1);
+			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 = "";
@@ -1305,7 +1544,7 @@
 			String jurisdictiond = strArrays.substring(0, strArrays.length() - 1);
 			List<Map<Object, Object>> list = informationService.selectWg(jurisdictiond);
 			List list1 = new ArrayList();
-			int count=0;
+			int count = 0;
 			Map map = new HashMap();
 			for (int i = 0; i < list.size(); i++) {
 				//总数
@@ -1318,19 +1557,18 @@
 				String sbnums = list.get(i).get("sbnum").toString();
 				int sbnum = Integer.parseInt(sbnums);
 				//保安总人数为0
-				if (znum==0){
+				if (znum == 0) {
 					continue;
-				}
-				else {
+				} else {
 					int a = znum / 2;
-					if (cznum<=a || sbnum<=a){
+					if (cznum <= a || sbnum <= a) {
 						count++;
 						list1.add(list.get(i));
 					}
 				}
 			}
-			map.put("count",count);
-			map.put("list",list1);
+			map.put("count", count);
+			map.put("list", list1);
 			return R.data(map);
 		}
 
@@ -1342,7 +1580,7 @@
 	 */
 	@PostMapping("/selectJy")
 	public R selectJy(String jurisdiction) {
-		if (jurisdiction.equals("1372091709474910209")){
+		if (jurisdiction.equals("1372091709474910209")) {
 			List<Map<Object, Object>> list = informationService.selectJy(jurisdiction);
 			List list1 = new ArrayList();
 			Map map = new HashMap();
@@ -1358,8 +1596,7 @@
 			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 = "";
@@ -1408,8 +1645,7 @@
 			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 = "";
@@ -1447,8 +1683,7 @@
 			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 = "";
@@ -1468,11 +1703,10 @@
 	 */
 	@PostMapping("/selectIn")
 	public R selectIn(String jurisdiction) {
-		if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) {
+		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 = "";
@@ -1490,11 +1724,10 @@
 	 */
 	@PostMapping("/selectTb")
 	public R<IPage> selectTb(String jurisdiction, String enterpriseName, Query query) {
-		if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)){
+		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 = "";
@@ -1513,11 +1746,10 @@
 	 */
 	@PostMapping("/selectJj")
 	public R<IPage> selectJj(String jurisdiction, String enterpriseName, Query query) {
-		if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) {
+		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 = "";
@@ -1534,12 +1766,11 @@
 	 * 业务统计情况
 	 */
 	@PostMapping("/selectYw")
-	public R<IPage> selectYw(String jurisdiction, String deptid,String stats, Query query) {
-		if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) {
+	public R<IPage> selectYw(String jurisdiction, String deptid, String stats, Query query) {
+		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 = "";
@@ -1552,4 +1783,56 @@
 		}
 	}
 
+	@PostMapping("/selectPCount")
+	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] + "',";
+		}
+		Integer pnums = 0;
+		Integer wpnums = 0;
+		if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)) {
+			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);
+				pnums += a;
+				String wpnum = list.get(i).get("wpnum").toString();
+				Integer b = Integer.parseInt(wpnum);
+				wpnums += b;
+			}
+		} else {
+			String jurisdictiond = strArrays.substring(0, strArrays.length() - 1);
+			List<Map<String, Object>> list = informationService.seleP(jurisdictiond, deptid);
+			for (int i = 0; i < list.size(); i++) {
+				String pnum = list.get(i).get("pnum").toString();
+				Integer a = Integer.parseInt(pnum);
+				pnums += a;
+				String wpnum = list.get(i).get("wpnum").toString();
+				Integer b = Integer.parseInt(wpnum);
+				wpnums += b;
+			}
+		}
+//		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", pnums);
+		map.put("WPCount", wpnums);
+		lists.add(map);
+		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);
+	}
+
 }

--
Gitblit v1.9.3