From f24c180ae9afa33ddef6ff1aa73baa35df73f2ca Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 24 Aug 2021 11:14:12 +0800
Subject: [PATCH] 用户新增发证时间字段
---
src/main/java/org/springblade/modules/information/controller/InformationController.java | 158 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 125 insertions(+), 33 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 0255a18..16a66c5 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;
@@ -29,6 +30,7 @@
import org.springblade.core.mp.support.Query;
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.jurisdiction.service.JurisdictionService;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.system.entity.Dept;
@@ -40,6 +42,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;
@@ -799,8 +802,8 @@
* 保安员统计
*/
@PostMapping("/selectLi")
- public R selectLi(String jurisdiction, String deptid,Integer current,Integer size) {
- List<Map<Object, Object>> list = informationService.selectLi(jurisdiction, deptid,current,size);
+ public R<IPage> selectLi(String jurisdiction, String deptid, Query query) {
+ IPage list = informationService.selectLi(Condition.getPage(query), jurisdiction, deptid);
return R.data(list);
}
@@ -833,8 +836,8 @@
* 公司运营情况进入图表
*/
@PostMapping("/selectTb")
- public R selectTb(String jurisdiction, String enterpriseName, Integer current, Integer size) {
- List<Map<Object, Object>> list = informationService.selectTb(jurisdiction, enterpriseName, current, size);
+ public R<IPage> selectTb(String jurisdiction, String enterpriseName, Query query) {
+ IPage list = informationService.selectTb(Condition.getPage(query), jurisdiction, enterpriseName);
return R.data(list);
}
@@ -842,8 +845,8 @@
* 公司经济情况进入图表
*/
@PostMapping("/selectJj")
- public R selectJj(String jurisdiction, String enterpriseName, Integer current, Integer size) {
- List<Map<Object, Object>> list = informationService.selectJj(jurisdiction, enterpriseName, current, size);
+ public R<IPage> selectJj(String jurisdiction, String enterpriseName, Query query) {
+ IPage list = informationService.selectJj(Condition.getPage(query), jurisdiction, enterpriseName);
return R.data(list);
}
@@ -851,8 +854,8 @@
* 业务统计情况
*/
@PostMapping("/selectYw")
- public R selectYw(String jurisdiction, String deptid,Integer current,Integer size) {
- List<Map<Object, Object>> list = informationService.selectYw(jurisdiction, deptid,current,size);
+ public R<IPage> selectYw(String jurisdiction, String deptid, Query query) {
+ IPage list = informationService.selectYw(Condition.getPage(query), jurisdiction, deptid);
return R.data(list);
}
@@ -860,8 +863,8 @@
* 保安员详情
*/
@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);
}
@@ -869,8 +872,8 @@
* 业务统计明细
*/
@PostMapping("/selectDis")
- public R selectDis(String jurisdiction, String deptid, String fid, Integer current, Integer size) {
- List<Map<Object, Object>> list = informationService.selectDis(jurisdiction, deptid, fid, current, size);
+ public R<IPage> selectDis(String jurisdiction, String deptid, String fid, Query query) {
+ IPage list = informationService.selectDis(Condition.getPage(query), jurisdiction, deptid, fid);
return R.data(list);
}
@@ -922,25 +925,114 @@
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("num").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("num").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);
+ }
+
+
}
--
Gitblit v1.9.3