From acad75793d64779c8c8b19a98a9d74dc12a8cd5e Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期二, 01 十一月 2022 22:19:12 +0800
Subject: [PATCH] 违章统计
---
ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java | 116 +++++++++++++++++++++++++++++++-------
ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java | 6 +
ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java | 39 +++++--------
3 files changed, 113 insertions(+), 48 deletions(-)
diff --git a/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java b/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java
index 7a62da9..2bfb1af 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java
@@ -5,8 +5,8 @@
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.controller.BaseController;
-import com.ycl.dto.statistics.UnlawfulTypeDto;
-import com.ycl.vo.equipment.HandheldTerminalVo;
+import com.ycl.dto.statistics.UnlawfulDto;
+import com.ycl.dto.statistics.UnlawfulShopDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.format.annotation.DateTimeFormat;
@@ -17,6 +17,7 @@
import java.time.LocalDateTime;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/**
@@ -31,32 +32,101 @@
@Api(tags = "杩濈珷-杩濇硶缁熻")
public class StatisticsController extends BaseController {
+ List<UnlawfulDto> ls = new ArrayList<>(Arrays.asList(
+ new UnlawfulDto("甯傚満鐩戠", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鍏畨", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鑷劧璧勬簮", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鐢熸�佺幆澧�", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鍦版柟绔嬫硶", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鍦伴渿", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鏁欒偛", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("缁忎俊", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鏋椾笟", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鍐滄潙鐜鍗敓", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("姘旇薄", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("浜洪槻", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("姘磋鏀�", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("搴旀�ョ鐞�", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
+ new UnlawfulDto("鍏朵粬", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0))
+ );
+
@GetMapping("/unlawful/type")
@ApiOperation("鎸夎繚瑙勭被鍨嬬粺璁�")
@LogSave(operationType = "鎸夎繚瑙勭被鍨嬬粺璁�", contain = "鏌ヨ")
- public CommonResult<IPage<UnlawfulTypeDto>> searchByType(@RequestParam(required = true) Integer currentPage,
- @RequestParam(required = true) Integer pageSize,
- @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime,
- @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
- IPage<UnlawfulTypeDto> page = new Page<>();
- List<UnlawfulTypeDto> ls = new ArrayList<>();
- ls.add(new UnlawfulTypeDto("甯傚満鐩戠", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鍏畨", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鑷劧璧勬簮", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鐢熸�佺幆澧�", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鍦版柟绔嬫硶", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鍦伴渿", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鏁欒偛", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("缁忎俊", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鏋椾笟", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鍐滄潙鐜鍗敓", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("姘旇薄", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("浜洪槻", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("姘磋鏀�", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("搴旀�ョ鐞�", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
- ls.add(new UnlawfulTypeDto("鍏朵粬", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9));
+ public CommonResult<IPage<UnlawfulDto>> searchByType(@RequestParam(required = true) Integer currentPage,
+ @RequestParam(required = true) Integer pageSize,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
+ IPage<UnlawfulDto> page = new Page<>();
page.setTotal(ls.size());
page.setRecords(ls);
return CommonResult.success(page);
}
+
+ @GetMapping("/unlawful/point")
+ @ApiOperation("鎸夌偣浣嶇粺璁�")
+ @LogSave(operationType = "鎸夌偣浣嶇粺璁�", contain = "鏌ヨ")
+ public CommonResult<IPage<UnlawfulDto>> searchByPoint(@RequestParam(required = true) Integer currentPage,
+ @RequestParam(required = true) Integer pageSize,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
+ IPage<UnlawfulDto> page = new Page<>();
+ page.setTotal(ls.size());
+ page.setRecords(ls);
+ return CommonResult.success(page);
+ }
+
+ @GetMapping("/unlawful/time")
+ @ApiOperation("鎸夋椂闂寸粺璁�")
+ @LogSave(operationType = "鎸夋椂闂寸粺璁�", contain = "鏌ヨ")
+ public CommonResult<IPage<UnlawfulDto>> searchByTime(@RequestParam(required = true) Integer currentPage,
+ @RequestParam(required = true) Integer pageSize,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
+ IPage<UnlawfulDto> page = new Page<>();
+ page.setTotal(ls.size());
+ page.setRecords(ls);
+ return CommonResult.success(page);
+ }
+
+ @GetMapping("/unlawful/area")
+ @ApiOperation("鎸夊尯鍩熺粺璁�")
+ @LogSave(operationType = "鎸夊尯鍩熺粺璁�", contain = "鏌ヨ")
+ public CommonResult<IPage<UnlawfulDto>> searchByArea(@RequestParam(required = true) Integer currentPage,
+ @RequestParam(required = true) Integer pageSize,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
+ IPage<UnlawfulDto> page = new Page<>();
+ page.setTotal(ls.size());
+ page.setRecords(ls);
+ return CommonResult.success(page);
+ }
+
+ @GetMapping("/unlawful/shop")
+ @ApiOperation("闂ㄥ墠涓夊寘缁熻")
+ @LogSave(operationType = "闂ㄥ墠涓夊寘缁熻", contain = "鏌ヨ")
+ public CommonResult<IPage<UnlawfulShopDto>> searchByShop(@RequestParam(required = true) Integer currentPage,
+ @RequestParam(required = true) Integer pageSize,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime,
+ @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
+ IPage<UnlawfulShopDto> page = new Page<>();
+ List<UnlawfulShopDto> ls = new ArrayList<>();
+ ls.add(new UnlawfulShopDto("搴楅摵1", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵2", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵3", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵4", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵5", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵6", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵7", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵8", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵9", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵10", 100, 10, 1, 20, 5, 20, 0.6));
+ ls.add(new UnlawfulShopDto("搴楅摵11", 100, 10, 1, 20, 5, 20, 0.7));
+ ls.add(new UnlawfulShopDto("搴楅摵12", 100, 10, 1, 20, 5, 20, 0.8));
+ ls.add(new UnlawfulShopDto("搴楅摵13", 100, 10, 1, 20, 5, 20, 0.9));
+ page.setTotal(ls.size());
+ page.setRecords(ls);
+ return CommonResult.success(page);
+ }
+
}
diff --git a/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java
similarity index 90%
rename from ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java
rename to ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java
index 426f896..705bcce 100644
--- a/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java
+++ b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java
@@ -15,7 +15,7 @@
@Data
@AllArgsConstructor
@NoArgsConstructor
-public class UnlawfulTypeDto {
+public class UnlawfulDto {
/**
* 绫诲瀷鍚嶇О
@@ -67,4 +67,8 @@
*/
private Double registerRatio;
+ /**
+ * 鍑嗙‘鐜�
+ */
+ private Double accuracyRatio;
}
diff --git a/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
similarity index 62%
copy from ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java
copy to ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
index 426f896..008bc80 100644
--- a/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java
+++ b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
@@ -6,7 +6,7 @@
/**
- * UnlawfulTypeDto 鎸夎繚瑙勭被鍨嬬粺璁�
+ * UnlawfulShopDto 闂ㄥ墠涓夊寘缁熻
*
* @version V1.0
* @author: AI
@@ -15,10 +15,10 @@
@Data
@AllArgsConstructor
@NoArgsConstructor
-public class UnlawfulTypeDto {
+public class UnlawfulShopDto {
/**
- * 绫诲瀷鍚嶇О
+ * 鍟嗘埛鍚嶇О
*/
private String name;
@@ -28,9 +28,19 @@
private Integer count;
/**
- * 鍗犳瘮
+ * 鍖呭崼鐢�
*/
- private Double ratio;
+ private Integer sanitation;
+
+ /**
+ * 鍖呯З缁�
+ */
+ private Integer orderliness;
+
+ /**
+ * 鍖呰鏂�
+ */
+ private Integer facility;
/**
* 绔嬫
@@ -38,29 +48,10 @@
private Integer register;
/**
- * 鏆備笉绔嬫
- */
- private Integer notRegister;
-
- /**
- * 缁撴
- */
- private Integer closing;
-
- /**
- * 鍐嶅涔�
- */
- private Integer relearn;
-
- /**
* 宸插鏍�
*/
private Integer checked;
- /**
- * 瀹℃牳鐜�
- */
- private Double checkedRatio;
/**
* 绔嬫鐜�
--
Gitblit v1.8.0