From 3b1e22dc8460daafc2ecbae478ddcbe5ea21b944 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 18 Sep 2021 17:27:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/information/controller/InformationController.java | 1043 +++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 848 insertions(+), 195 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 c103b5d..282f6c8 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -18,6 +18,7 @@
import io.swagger.annotations.*;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
@@ -30,6 +31,7 @@
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
+import org.springblade.modules.information.vo.InformationVO;
import org.springblade.modules.jurisdiction.service.JurisdictionService;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.system.entity.Dept;
@@ -41,6 +43,7 @@
import org.springblade.core.boot.ctrl.BladeController;
import springfox.documentation.annotations.ApiIgnore;
+import java.text.DecimalFormat;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -95,8 +98,8 @@
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入information")
- public R<IPage<Information>> page(Information information, Query query) {
- IPage<Information> pages = informationService.selectInformationPage(Condition.getPage(query), information);
+ public R<IPage<InformationVO>> page(InformationVO information, Query query) {
+ IPage<InformationVO> pages = informationService.selectInformationPage(Condition.getPage(query), information);
return R.data(pages);
}
@@ -193,32 +196,32 @@
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("/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();
@@ -246,7 +249,7 @@
}
}
return R.data(lists);
- }
+ }*/
/**
@@ -568,7 +571,7 @@
mapzc1.put("zc", mapzc);
lists.add(mapzc1);
//保安持证数量
- Map<String, String> mapcz = informationService.queryYearZc(year, jurisdiction, deptid);
+ Map<String, String> mapcz = informationService.queryYearCz(year, jurisdiction, deptid);
mapcz = (HashMap<String, String>) sortMapBykeyAsc(mapcz);//key升序
mapcz1.put("chiz", mapcz);
lists.add(mapcz1);
@@ -647,30 +650,30 @@
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);
- }
+//
+// /**
+// * 统计保安员资格异常的数量
+// *
+// * @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);
+// }
/**
* 统计用户资格异常的数量
@@ -690,7 +693,7 @@
* @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>();
@@ -705,87 +708,87 @@
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("/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("/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);
- }
+// /**
+// * 单位列表
+// */
+// @PostMapping("/selectIn")
+// public R selectIn(String jurisdiction) {
+// List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction);
+// return R.data(maps);
+// }
/**
* 单位删除
@@ -800,8 +803,8 @@
* 保安员统计
*/
@PostMapping("/selectLi")
- public R<IPage> selectLi(String jurisdiction, String deptid, Query query) {
- IPage list = informationService.selectLi(Condition.getPage(query),jurisdiction, deptid);
+ 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);
}
@@ -830,39 +833,39 @@
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, Query query) {
- IPage list = informationService.selectYw(Condition.getPage(query),jurisdiction, deptid);
- 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);
+// }
/**
* 保安员详情
*/
@PostMapping("/selectUIn")
- public R selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil) {
- List<Map<Object, Object>> list = informationService.selectUIn(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);
}
@@ -871,7 +874,7 @@
*/
@PostMapping("/selectDis")
public R<IPage> selectDis(String jurisdiction, String deptid, String fid, Query query) {
- IPage list = informationService.selectDis(Condition.getPage(query),jurisdiction, deptid, fid);
+ IPage list = informationService.selectDis(Condition.getPage(query), jurisdiction, deptid, fid);
return R.data(list);
}
@@ -885,24 +888,18 @@
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);
- 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("/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);
+// }
/**
* 公司材料不全数量统计
@@ -923,25 +920,681 @@
return R.data(lists);
}
-// public static void main(String[] args) throws Exception {
-// //ftp服务器IP地址
-// String ftpHost = "192.168.0.105";
-// //ftp服务器端口
-// int ftpPort = 21;
-// //ftp服务器用户名
-// String ftpUserName = "yly";
-// //ftp服务器密码
-// String ftpPassword = "Yly@123";
-// //ftp服务器路径
-// String ftpPath = "";
-// //本地路径
-// String localPath = "D:\\anbao";
-// //文件名
-// String fileName = "sql.json";
-// FtpUtil.downloadFtpFile(ftpHost, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName);
-// String s = TestJson();
-// String sql = stringReplace(s);
-// MysqlCenlint.inster(sql);
-// MysqlCenlint.delete();
+// /**
+// * 违规经营
+// */
+// @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
+ */
+ @PostMapping("/selectAge")
+ public R selectAge(String jurisdiction, String deptid) {
+ List<Map<Object, Object>> list = informationService.selectAge(jurisdiction, deptid);
+ int qcount = 0;//青年
+ int zcount = 0;//中年
+ int lcount = 0;//老年
+ for (int i = 0; i < list.size(); i++) {
+ String age = list.get(i).get("age").toString();
+ int a = Integer.parseInt(age);
+ if (a <= 0) {
+ continue;
+ } else if (a >= 19 && a < 35) {
+ qcount ++;
+ } else if (a >= 36 && a < 59) {
+ zcount++;
+ } else {
+ lcount++;
+ }
+ }
+ Map map = new HashMap();
+ map.put("qcount",qcount);
+ map.put("zcount",zcount);
+ map.put("lcount",lcount);
+ return R.data(map);
+ }
+
+
+
+ /**
+ * 首页保安公司统计接口
+ *
+ * @return
+ */
+ @PostMapping("/SelectCount")
+ public R SelectCount() {
+ //查出所有辖区
+ List<Map<Object, Object>> list = informationService.selJur();
+ List<Map<String, Object>> lists = new ArrayList<>();
+ 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();
+ //查出辖区下面所有的子菜单
+ String childer = informationService.selJurchilder(id);
+ String[] split = childer.split(",");
+ String strArrays = "";
+ for (int j = 0; j < split.length; j++) {
+ strArrays += "'" + split[j] + "',";
+ }
+ 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"));
+ map.put("name", list.get(i).get("deptname"));
+ map.put("server", mapc);
+ 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, 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 += numj;
+ }
+ map.put("Count", count);
+ map.put("jurname", jurname);
+ lists.add(map);
+ }
+ return R.data(lists);
+ }
+
+ /**
+ * 首页保安持证统计接口
+ *
+ * @return
+ */
+ @PostMapping("/SelectCounthold")
+ public R SelectCounthold() {
+ List<Map<Object, Object>> list = informationService.selJur();
+ List<Map<String, Object>> lists = new ArrayList<>();
+ for (int i = 0; i < list.size(); i++) {
+ int cznumber = 0;//总的持证数量
+ int wcznumber = 0;//总的未持证数量
+ String id = list.get(i).get("id").toString();
+ //查出辖区下面所有的子菜单
+ String childer = informationService.selJurchilder(id);
+ String[] split = childer.split(",");
+ String strArrays = "";
+ for (int j = 0; j < split.length; j++) {
+ strArrays += "'" + split[j] + "',";
+ }
+ 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) {
+ 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++){
+ 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("cz", cznumber);
+ map.put("wcz", wcznumber);
+ lists.add(map);
+
+ }
+ }
+ return R.data(lists);
+ }
+
+ /**
+ * 统计保安员表现差的数量
+ *
+ * @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<>();
+ if (jurisdiction.equals("1372091709474910209")){
+ 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);
+ }
+ 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);
+ 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);
+ }
+
+
+
+ /**
+ * 统计保安员资格异常的数量
+ *
+ * @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<>();
+ if (jurisdiction.equals("1372091709474910209")) {
+ 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);
+ }
+ 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.selectExtype(jurisdictiond, 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("/selectWg")
+ public R selectWg(String jurisdiction) {
+ if (jurisdiction.equals("1372091709474910209")){
+ 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);
+ }
+ 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>> list = informationService.selectWg(jurisdictiond);
+ 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) {
+ if (jurisdiction.equals("1372091709474910209")){
+ 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);
+ }
+ 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>> list = informationService.selectJy(jurisdictiond);
+ 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) {
+ if (jurisdiction.equals("1372091709474910209")) {
+ 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);
+ }
+ 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>> list = informationService.selectYs(jurisdictiond);
+ 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);
+ }
+ }
+
+ /**
+ * 公司处罚数量统计
+ */
+ @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<>();
+ if (jurisdiction.equals("1372091709474910209")) {
+ List<Map<Object, Object>> maps = informationService.selectCf(jurisdiction);
+ map.put("count", maps.size());
+ return R.data(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.selectCf(jurisdictiond);
+ map.put("count", maps.size());
+ return R.data(map);
+ }
+ }
+
+
+ /**
+ * 单位列表
+ */
+ @PostMapping("/selectIn")
+ public R selectIn(String jurisdiction) {
+ if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) {
+ List<Map<Object, Object>> maps = informationService.selectIn(jurisdiction);
+ return R.data(maps);
+ }
+ 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.selectIn(jurisdictiond);
+ return R.data(maps);
+ }
+ }
+
+ /**
+ * 公司运营情况进入图表
+ */
+ @PostMapping("/selectTb")
+ public R<IPage> selectTb(String jurisdiction, String enterpriseName, Query query) {
+ if (jurisdiction.equals("1372091709474910209") || "".equals(jurisdiction)){
+ IPage list = informationService.selectTb(Condition.getPage(query), jurisdiction, enterpriseName);
+ 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.selectTb(Condition.getPage(query), jurisdictiond, enterpriseName);
+ return R.data(list);
+ }
+
+ }
+
+ /**
+ * 公司经济情况进入图表
+ */
+ @PostMapping("/selectJj")
+ public R<IPage> selectJj(String jurisdiction, String enterpriseName, Query query) {
+ if (jurisdiction.equals("1372091709474910209")|| "".equals(jurisdiction)) {
+ IPage list = informationService.selectJj(Condition.getPage(query), jurisdiction, enterpriseName);
+ 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.selectJj(Condition.getPage(query), jurisdictiond, enterpriseName);
+ return R.data(list);
+ }
+ }
+
+ /**
+ * 业务统计情况
+ */
+ @PostMapping("/selectYw")
+ 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 {
+ 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);
+ return R.data(list);
+ }
+ }
+
+ @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);
+ }
+
}
--
Gitblit v1.9.3