From 36a2d9a19b0b9ca2209555f6479ae1ef0198efd3 Mon Sep 17 00:00:00 2001
From: mg <maokecheng@163.com>
Date: 星期三, 02 十一月 2022 09:35:12 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server

---
 ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java                  |   11 
 ycl-platform/src/main/java/com/ycl/util/CheckApiUtil.java                                                |   17 +-
 ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java |   15 +-
 ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java                |  132 ++++++++++++++++++
 ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java                    |   10 +
 ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java   |   19 +-
 ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java                                       |   74 ++++++++++
 ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java                   |    2 
 ycl-platform/src/main/java/com/ycl/service/equipment/IHandheldTerminalService.java                       |    4 
 ycl-platform/src/main/java/com/ycl/service/equipment/ILoudspeakerService.java                            |    2 
 ycl-platform/src/main/resources/mapper/equipment/HandheldTerminalMapper.xml                              |    2 
 ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/AnalysisController.java                  |   19 ++
 ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java                 |    2 
 ycl-platform/src/main/java/com/ycl/mapper/equipment/HandheldTerminalMapper.java                          |    3 
 ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java                         |   15 +
 ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java                       |    9 
 ycl-platform/src/main/java/com/ycl/service/equipment/impl/HandheldTerminalServiceImpl.java               |    9 
 ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java                                   |   61 ++++++++
 18 files changed, 362 insertions(+), 44 deletions(-)

diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
index 4d1d238..178c339 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
@@ -5,10 +5,12 @@
 import com.ycl.vo.cockpit.CockpitVO;
 import com.ycl.vo.cockpit.aiIot.AIIotVO;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
@@ -33,7 +35,7 @@
     @ApiOperation(value = "鐩戞祴鏁版嵁")
     @GetMapping("/detection")
     public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
         AIIotVO.DetectionVO detectionVO = new AIIotVO.DetectionVO();
         detectionVO.setVideo(121);
         detectionVO.setIndividual(20);
@@ -45,8 +47,9 @@
 
     @ApiOperation(value = "瀹炴椂瑙嗛鐩戞帶")
     @GetMapping("/video")
-    public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+    @ApiImplicitParam(name = "regionId",value = "鍦板尯Id",required = true,dataType = "String")
+    public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params, @RequestParam(required = true)String regionId) {
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,regionId);
         List<AIIotVO.VideoVO> videoVOS = new ArrayList<>();
         AIIotVO.VideoVO a = null;
         for (int i = 0; i < 4; i++) {
@@ -67,7 +70,7 @@
     @ApiOperation(value = "AI绠楁硶鏁堣兘")
     @GetMapping("/efficiency")
     public CommonResult<List<AIIotVO.EfficiencyVO>> efficiency(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<AIIotVO.EfficiencyVO> efficiencyVOS = new ArrayList<>();
         AIIotVO.EfficiencyVO a = null;
         for (int i = 0; i < 4; i++) {
@@ -83,7 +86,7 @@
     @ApiOperation(value = "娓e湡鑱斿姩")
     @GetMapping("/slag_car")
     public CommonResult<AIIotVO.SlagCarVO> slagCar(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
         AIIotVO.SlagCarVO slagCarVO = new AIIotVO.SlagCarVO();
         slagCarVO.setCar(236);
         slagCarVO.setTeam(20);
@@ -93,7 +96,7 @@
     @ApiOperation(value = "AI浜嬩欢缁熻")
     @GetMapping("/event_statistics")
     public CommonResult<List<AIIotVO.StatisticsVO>> statistics(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<AIIotVO.StatisticsVO> statisticsVOS = new ArrayList<>();
         List<AIIotVO.Statistics1VO> statistics1VOS = new ArrayList<>();
         AIIotVO.StatisticsVO a = null;
diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
index 1c19a87..fb20fd6 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
@@ -34,7 +34,7 @@
     @ApiOperation(value = "鎵ф硶浜嬩欢缁熻")
     @GetMapping("/statistics")
     public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         Map<String, Object> map = new HashMap<>();
         EnforcementEventsVO.StatisticsEventVO eventVO = new EnforcementEventsVO.StatisticsEventVO();
         eventVO.setCount(10);
@@ -49,7 +49,7 @@
     @ApiOperation(value = "浜嬩欢绫诲瀷")
     @GetMapping("/type")
     public CommonResult<EnforcementEventsVO.TypeAndSourceVO> type(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<EnforcementEventsVO.TypeAndSourceVO1> typeVO1s = new ArrayList<>();
         EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO();
         EnforcementEventsVO.TypeAndSourceVO1 typeVO1 = null;
@@ -68,13 +68,14 @@
     @ApiOperation(value = "瑙嗛鎶撴媿鍛婂彂鐐逛綅")
     @GetMapping("/video")
     public CommonResult<List<EnforcementEventsVO.VideoAndAreaVO>> video(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<EnforcementEventsVO.VideoAndAreaVO> videoVOS = new ArrayList<>();
         EnforcementEventsVO.VideoAndAreaVO videoVO = null;
         for (int i = 0; i < 4; i++) {
             videoVO = new EnforcementEventsVO.VideoAndAreaVO();
             videoVO.setName("鍥㈢粨灞�");
             videoVO.setCount(10);
+            videoVO.setRatio(new BigDecimal("0.65").setScale(2, RoundingMode.HALF_UP));
             videoVOS.add(videoVO);
         }
         return CommonResult.success(videoVOS);
@@ -83,7 +84,7 @@
     @ApiOperation(value = "浜嬩欢鏉ユ簮")
     @GetMapping("/source")
     public CommonResult<EnforcementEventsVO.TypeAndSourceVO> source(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<EnforcementEventsVO.TypeAndSourceVO1> typeVO1s = new ArrayList<>();
         EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO();
         EnforcementEventsVO.TypeAndSourceVO1 typeVO1 = null;
@@ -102,7 +103,7 @@
     @ApiOperation(value = "浜嬩欢鍖哄煙缁熻")
     @GetMapping("/area")
     public CommonResult<List<EnforcementEventsVO.VideoAndAreaVO>> area(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<EnforcementEventsVO.VideoAndAreaVO> videoVOS = new ArrayList<>();
         EnforcementEventsVO.VideoAndAreaVO videoVO = null;
         for (int i = 0; i < 4; i++) {
@@ -117,7 +118,7 @@
     @ApiOperation(value = "寤惰浜嬩欢")
     @GetMapping("/delay")
     public CommonResult<List<EnforcementEventsVO.DelayVO>> delay(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         List<EnforcementEventsVO.DelayVO> delayVOS = new ArrayList<>();
         EnforcementEventsVO.DelayVO delayVO = null;
         for (int i = 0; i < 4; i++) {
@@ -133,7 +134,7 @@
     @ApiOperation(value = "浜嬩欢淇℃伅")
     @GetMapping("/info")
     public CommonResult<EnforcementEventsVO.InfoVO> info(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
         EnforcementEventsVO.InfoVO infoVO = new EnforcementEventsVO.InfoVO();
         EnforcementEventsVO.EventVO eventVO = new EnforcementEventsVO.EventVO();
         infoVO.setToday(5);
diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
index 21d3745..4517bfa 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
@@ -5,10 +5,12 @@
 import com.ycl.vo.cockpit.CockpitVO;
 import com.ycl.vo.cockpit.statisticsEvents.StatisticsEventsVO;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
@@ -31,8 +33,9 @@
 
     @ApiOperation(value = "鎵ф硶浜嬩欢")
     @GetMapping("/law_enforcement_event")
-    public CommonResult<List<StatisticsEventsVO.LawEnforcementEventVO>> detection(@Validated CockpitVO.Params2VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime());
+    @ApiImplicitParam(name = "regionId",value = "鍦板尯Id",required = true,dataType = "String")
+    public CommonResult<List<StatisticsEventsVO.LawEnforcementEventVO>> detection(@Validated CockpitVO.Params2VO params, @RequestParam(required = true)String regionId) {
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),regionId);
         List<StatisticsEventsVO.LawEnforcementEventVO> lawEnforcementEventVOS = new ArrayList<>();
         StatisticsEventsVO.LawEnforcementEventVO a = null;
         for (int i = 0; i < 4; i++) {
@@ -48,8 +51,9 @@
 
     @ApiOperation(value = "鐗╄仈鎰熺煡")
     @GetMapping("/lot")
-    public CommonResult<List<StatisticsEventsVO.LotVO>> lot(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+    @ApiImplicitParam(name = "regionId",value = "鍦板尯Id",required = true,dataType = "String")
+    public CommonResult<List<StatisticsEventsVO.LotVO>> lot(@Validated CockpitVO.Params1VO params,@RequestParam(required = true)String regionId) {
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,regionId);
         List<StatisticsEventsVO.LotVO> lotVOS = new ArrayList<>();
         StatisticsEventsVO.LotVO a = null;
         for (int i = 0; i < 4; i++) {
@@ -57,6 +61,7 @@
             a.setName("鍥㈢粨灞�");
             a.setType("鎽勫儚澶�");
             a.setCount(10);
+            a.setRatio(new BigDecimal("-0.3").setScale(2, RoundingMode.HALF_UP));
             lotVOS.add(a);
         }
         return CommonResult.success(lotVOS);
@@ -65,7 +70,7 @@
     @ApiOperation(value = "鎵ф硶闃熶紞")
     @GetMapping("/team")
     public CommonResult<StatisticsEventsVO.TeamVO> team(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
         StatisticsEventsVO.TeamVO teamVO = new StatisticsEventsVO.TeamVO();
         teamVO.setAll(30);
         teamVO.setAssistant(10);
@@ -79,7 +84,7 @@
     @ApiOperation(value = "缃戞牸鍛�")
     @GetMapping("/grid_member")
     public CommonResult<List<StatisticsEventsVO.GridMemberVO>> gridMember(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
         List<StatisticsEventsVO.GridMemberVO> gridMemberVOS = new ArrayList<>();
         StatisticsEventsVO.GridMemberVO a = null;
         for (int i = 0; i < 4; i++) {
@@ -95,7 +100,7 @@
     @ApiOperation(value = "鎸囨暟浣撳緛")
     @GetMapping("/index_signs")
     public CommonResult<StatisticsEventsVO.IndexSignsVO> indexSigns(@Validated CockpitVO.Params1VO params) {
-        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null);
+        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
         StatisticsEventsVO.IndexSignsVO indexSignsVO = new StatisticsEventsVO.IndexSignsVO();
         indexSignsVO.setEvent(1);
         indexSignsVO.setGridMember(20);
diff --git a/ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java b/ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java
index 5c68bca..f358c8b 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/epuipment/HandheldTerminalController.java
@@ -1,6 +1,7 @@
 package com.ycl.controller.epuipment;
 
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ycl.annotation.LogSave;
 import com.ycl.api.CommonResult;
@@ -35,11 +36,11 @@
 
     @GetMapping("/query")
     @ApiOperation("鏌ヨ")
-    @LogSave
-    public CommonResult<Page<HandheldTerminalVo>> search(@RequestParam(required = false) Integer size,
-                                                         @RequestParam(required = false) Integer current,
-                                                         @RequestParam(required = false) Short state) {
-        return CommonResult.success(handheldTerminalService.search(size, current, state));
+    @LogSave(operationType = "鎵嬫寔璁惧绠$悊", contain = "鏌ヨ")
+    public CommonResult<IPage<HandheldTerminalVo>> search(@RequestParam(required = true) Integer currentPage,
+                                                          @RequestParam(required = true) Integer pageSize,
+                                                          @RequestParam(required = false) Short state) {
+        return CommonResult.success(handheldTerminalService.search(pageSize, currentPage, state));
     }
 
     @PostMapping("/add")
diff --git a/ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java b/ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java
index 68b6cee..5283fc6 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/epuipment/LoudspeakerController.java
@@ -3,6 +3,7 @@
 
 import com.alibaba.excel.EasyExcel;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ycl.annotation.LogSave;
 import com.ycl.api.CommonResult;
@@ -50,10 +51,10 @@
     @GetMapping("/query")
     @ApiOperation("鏌ヨ")
     @LogSave
-    public CommonResult search(@RequestParam(required = false) Integer size,
-                               @RequestParam(required = false) Integer current,
-                               @RequestParam(required = false) Short state) {
-        return null;
+    public CommonResult<IPage<Loudspeaker>> search(@RequestParam(required = true) Integer currentPage,
+                                                   @RequestParam(required = true) Integer pageSize,
+                                                   @RequestParam(required = false) Short state) {
+        return CommonResult.success(loudspeakerService.search(pageSize, currentPage, state));
     }
 
     @PostMapping("/add")
diff --git a/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/AnalysisController.java b/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/AnalysisController.java
new file mode 100644
index 0000000..b3348e7
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/AnalysisController.java
@@ -0,0 +1,19 @@
+package com.ycl.controller.intelligentPatrol;
+
+import com.ycl.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * AnalysisController
+ * 
+ * @author: AI
+ * @date:  2022-11-01 16:43
+ * @version V1.0
+**/
+@RestController
+@RequestMapping("/intelligentPatrol")
+@Api(tags = "鏅鸿兘宸℃煡")
+public class AnalysisController extends BaseController {
+}
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
new file mode 100644
index 0000000..2bfb1af
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java
@@ -0,0 +1,132 @@
+package com.ycl.controller.intelligentPatrol;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ycl.annotation.LogSave;
+import com.ycl.api.CommonResult;
+import com.ycl.controller.BaseController;
+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;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * StatisticsController
+ *
+ * @version V1.0
+ * @author: AI
+ * @date: 2022-11-01 16:40
+ **/
+@RestController
+@RequestMapping("/intelligentPatrol/statistics")
+@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<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/UnlawfulDto.java b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java
new file mode 100644
index 0000000..705bcce
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java
@@ -0,0 +1,74 @@
+package com.ycl.dto.statistics;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * UnlawfulTypeDto 鎸夎繚瑙勭被鍨嬬粺璁�
+ *
+ * @version V1.0
+ * @author: AI
+ * @date: 2022-11-01 17:09
+ **/
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UnlawfulDto {
+
+    /**
+     * 绫诲瀷鍚嶇О
+     */
+    private String name;
+
+    /**
+     * 浜嬩欢鎬绘暟
+     */
+    private Integer count;
+
+    /**
+     * 鍗犳瘮
+     */
+    private Double ratio;
+
+    /**
+     * 绔嬫
+     */
+    private Integer register;
+
+    /**
+     * 鏆備笉绔嬫
+     */
+    private Integer notRegister;
+
+    /**
+     * 缁撴
+     */
+    private Integer closing;
+
+    /**
+     * 鍐嶅涔�
+     */
+    private Integer relearn;
+
+    /**
+     * 宸插鏍�
+     */
+    private Integer checked;
+
+    /**
+     * 瀹℃牳鐜�
+     */
+    private Double checkedRatio;
+
+    /**
+     * 绔嬫鐜�
+     */
+    private Double registerRatio;
+
+    /**
+     * 鍑嗙‘鐜�
+     */
+    private Double accuracyRatio;
+}
diff --git a/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
new file mode 100644
index 0000000..008bc80
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
@@ -0,0 +1,61 @@
+package com.ycl.dto.statistics;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * UnlawfulShopDto 闂ㄥ墠涓夊寘缁熻
+ *
+ * @version V1.0
+ * @author: AI
+ * @date: 2022-11-01 17:09
+ **/
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UnlawfulShopDto {
+
+    /**
+     * 鍟嗘埛鍚嶇О
+     */
+    private String name;
+
+    /**
+     * 浜嬩欢鎬绘暟
+     */
+    private Integer count;
+
+    /**
+     * 鍖呭崼鐢�
+     */
+    private Integer sanitation;
+
+    /**
+     * 鍖呯З缁�
+     */
+    private Integer orderliness;
+
+    /**
+     * 鍖呰鏂�
+     */
+    private Integer facility;
+
+    /**
+     * 绔嬫
+     */
+    private Integer register;
+
+    /**
+     * 宸插鏍�
+     */
+    private Integer checked;
+
+
+    /**
+     * 绔嬫鐜�
+     */
+    private Double registerRatio;
+
+}
diff --git a/ycl-platform/src/main/java/com/ycl/mapper/equipment/HandheldTerminalMapper.java b/ycl-platform/src/main/java/com/ycl/mapper/equipment/HandheldTerminalMapper.java
index 996116f..a0a2cff 100644
--- a/ycl-platform/src/main/java/com/ycl/mapper/equipment/HandheldTerminalMapper.java
+++ b/ycl-platform/src/main/java/com/ycl/mapper/equipment/HandheldTerminalMapper.java
@@ -1,6 +1,7 @@
 package com.ycl.mapper.equipment;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ycl.vo.equipment.HandheldTerminalVo;
 import com.ycl.entity.equipment.HandheldTerminal;
@@ -16,5 +17,5 @@
  */
 public interface HandheldTerminalMapper extends BaseMapper<HandheldTerminal> {
 
-    Page<HandheldTerminalVo> search(Page<HandheldTerminalVo> page, @Param("state") Short state);
+    IPage<HandheldTerminalVo> search(IPage<HandheldTerminalVo> page, @Param("state") Short state);
 }
diff --git a/ycl-platform/src/main/java/com/ycl/service/equipment/IHandheldTerminalService.java b/ycl-platform/src/main/java/com/ycl/service/equipment/IHandheldTerminalService.java
index 5c05252..3eb8c2b 100644
--- a/ycl-platform/src/main/java/com/ycl/service/equipment/IHandheldTerminalService.java
+++ b/ycl-platform/src/main/java/com/ycl/service/equipment/IHandheldTerminalService.java
@@ -1,6 +1,6 @@
 package com.ycl.service.equipment;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ycl.vo.equipment.HandheldTerminalVo;
 import com.ycl.entity.equipment.HandheldTerminal;
@@ -14,5 +14,5 @@
  * @since 2022-10-14
  */
 public interface IHandheldTerminalService extends IService<HandheldTerminal> {
-    Page<HandheldTerminalVo> search(Integer size, Integer current, Short state);
+    IPage<HandheldTerminalVo> search(Integer size, Integer current, Short state);
 }
diff --git a/ycl-platform/src/main/java/com/ycl/service/equipment/ILoudspeakerService.java b/ycl-platform/src/main/java/com/ycl/service/equipment/ILoudspeakerService.java
index c30eff8..ac91f5f 100644
--- a/ycl-platform/src/main/java/com/ycl/service/equipment/ILoudspeakerService.java
+++ b/ycl-platform/src/main/java/com/ycl/service/equipment/ILoudspeakerService.java
@@ -1,5 +1,6 @@
 package com.ycl.service.equipment;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ycl.entity.equipment.EquipmentBayonet;
 import com.ycl.entity.equipment.Loudspeaker;
@@ -13,4 +14,5 @@
  * @since 2022-10-14
  */
 public interface ILoudspeakerService extends IService<Loudspeaker> {
+    IPage<Loudspeaker> search(Integer pageSize, Integer currentPage, Short state);
 }
diff --git a/ycl-platform/src/main/java/com/ycl/service/equipment/impl/HandheldTerminalServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/equipment/impl/HandheldTerminalServiceImpl.java
index 3c9090c..01751da 100644
--- a/ycl-platform/src/main/java/com/ycl/service/equipment/impl/HandheldTerminalServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/equipment/impl/HandheldTerminalServiceImpl.java
@@ -1,5 +1,6 @@
 package com.ycl.service.equipment.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ycl.vo.equipment.HandheldTerminalVo;
@@ -19,9 +20,9 @@
 @Service
 public class HandheldTerminalServiceImpl extends ServiceImpl<HandheldTerminalMapper, HandheldTerminal> implements IHandheldTerminalService {
     @Override
-    public Page<HandheldTerminalVo> search(Integer size, Integer current, Short state) {
-        Page<HandheldTerminalVo> page = new Page<>(size, current);
-        page = baseMapper.search(page, state);
-        return page;
+    public IPage<HandheldTerminalVo> search(Integer size, Integer current, Short state) {
+        Page<HandheldTerminalVo> page = new Page<>(current, size);
+        IPage<HandheldTerminalVo> page1 = baseMapper.search(page, state);
+        return page1;
     }
 }
diff --git a/ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java
index 015efdc..c361626 100644
--- a/ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/equipment/impl/LoudspeakerServiceImpl.java
@@ -1,9 +1,13 @@
 package com.ycl.service.equipment.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ycl.entity.equipment.Loudspeaker;
 import com.ycl.mapper.equipment.LoudspeakerMapper;
 import com.ycl.service.equipment.ILoudspeakerService;
+import com.ycl.vo.equipment.HandheldTerminalVo;
 import org.springframework.stereotype.Service;
 
 /**
@@ -16,4 +20,10 @@
  */
 @Service
 public class LoudspeakerServiceImpl extends ServiceImpl<LoudspeakerMapper, Loudspeaker> implements ILoudspeakerService {
+    @Override
+    public IPage<Loudspeaker> search(Integer pageSize, Integer currentPage, Short state) {
+        Page<Loudspeaker> page = new Page<>(currentPage, pageSize);
+        LambdaQueryWrapper<Loudspeaker> queryWrapper = new LambdaQueryWrapper<Loudspeaker>().eq(state != null, Loudspeaker::getState, state);
+        return baseMapper.selectPage(page, queryWrapper);
+    }
 }
diff --git a/ycl-platform/src/main/java/com/ycl/util/CheckApiUtil.java b/ycl-platform/src/main/java/com/ycl/util/CheckApiUtil.java
index 1d3b50c..ccb60d5 100644
--- a/ycl-platform/src/main/java/com/ycl/util/CheckApiUtil.java
+++ b/ycl-platform/src/main/java/com/ycl/util/CheckApiUtil.java
@@ -23,14 +23,14 @@
     /**
      * 椹鹃┒鑸�
      *
-     * @param appId
-     * @param appKey
-     * @param sign
-     * @param name
-     * @param beginTime
-     * @param endTime
+     * @param appId     appId
+     * @param appKey    appKey
+     * @param sign      sign
+     * @param beginTime 寮�濮嬫椂闂�
+     * @param endTime   缁撴潫鏃堕棿
+     * @param regionId  鍖哄煙Id
      */
-    public void cockpit(String appId, String appKey, String sign, String beginTime, String endTime) {
+    public void cockpit(String appId, String appKey, String sign, String beginTime, String endTime, String regionId) {
         apiKeyService.checkIsExist(appId, appKey, "椹鹃┒浠�");
         StringBuffer sb = new StringBuffer();
         sb.append(appId);
@@ -40,6 +40,9 @@
             sb.append(beginTime);
             sb.append(endTime);
         }
+        if (!StringUtils.isBlank(regionId)) {
+            sb.append(regionId);
+        }
         result = MD5Util.md5Encrypt32Lower(sb.toString());
         if (!sign.equals(result)) {
             throw new ApiException(ResultCode.SIGN_ERROR);
diff --git a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java
index c52ad94..17ed8f9 100644
--- a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java
+++ b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EnforcementEventsVO.java
@@ -53,6 +53,8 @@
         private String name;
         @ApiModelProperty(value = "娆℃暟")
         private Integer count;
+        @ApiModelProperty(value = "鏁版嵁鍗犳瘮")
+        private BigDecimal ratio;
     }
 
     @Data
diff --git a/ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java b/ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java
index 170883d..0d06c47 100644
--- a/ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java
+++ b/ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java
@@ -36,6 +36,8 @@
         private String name;
         @ApiModelProperty(value = "鏁伴噺")
         private Integer count;
+        @ApiModelProperty(value = "姣斾緥")
+        private BigDecimal ratio;
     }
 
     @ApiModel(description = "鎵ф硶闃熶紞")
diff --git a/ycl-platform/src/main/resources/mapper/equipment/HandheldTerminalMapper.xml b/ycl-platform/src/main/resources/mapper/equipment/HandheldTerminalMapper.xml
index a140cfb..6247fc7 100644
--- a/ycl-platform/src/main/resources/mapper/equipment/HandheldTerminalMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/equipment/HandheldTerminalMapper.xml
@@ -32,7 +32,7 @@
         LEFT JOIN ums_depart p on d.parent_id = p.id
         <where>
             <if test="state!=null">
-                ht.state = #{carNum}
+                ht.state = #{state}
             </if>
         </where>
         order by ht.id desc

--
Gitblit v1.8.0