From e986bd63309fba70f7f3cfaf70aadec46220917b Mon Sep 17 00:00:00 2001
From: baizonghao <1719256278@qq.com>
Date: 星期四, 30 三月 2023 20:06:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

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 e8bf477..1aea260 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
@@ -6,6 +6,7 @@
 import com.ycl.api.CommonResult;
 import com.ycl.entity.cockpitManage.TeamConstruction;
 import com.ycl.entity.cockpitManage.TeamIndex;
+import com.ycl.service.apidata.IApiDataService;
 import com.ycl.service.cockpitManage.ITeamConstructionService;
 import com.ycl.service.equipment.IOrgGridService;
 import com.ycl.service.video.impl.IVideoPointService;
@@ -46,6 +47,14 @@
 
     private IOrgGridService orgGridService;
 
+
+    private IApiDataService iApiDataService;
+
+    @Autowired
+    public void setIApiDataService(IApiDataService apiDataService) {
+        this.iApiDataService = apiDataService;
+    }
+
     @Autowired
     public void setTeamConstructionService(ITeamConstructionService teamConstructionService) {
         this.teamConstructionService = teamConstructionService;
@@ -82,16 +91,8 @@
     @GetMapping("/lot")
     public CommonResult<List<StatisticsEventsVO.LotVO>> lot(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
-        List<StatisticsEventsVO.LotVO> lotVOS = new ArrayList<>();
-        StatisticsEventsVO.LotVO a = null;
-        for (int i = 0; i < 4; i++) {
-            a = new StatisticsEventsVO.LotVO();
-            a.setName("鍥㈢粨灞�");
-            a.setType("鎽勫儚澶�");
-            a.setCount(10);
-            a.setRatio(new BigDecimal("-0.3").setScale(2, RoundingMode.HALF_UP));
-            lotVOS.add(a);
-        }
+        List<StatisticsEventsVO.LotVO> lotVOS = iApiDataService.listLot(params.getStreetId(), params.getBeginTime(), params.getEndTime());
+
         return CommonResult.success(lotVOS);
     }
 
@@ -147,13 +148,17 @@
     @ApiOperation(value = "top10")
     @GetMapping("/top10")
     public CommonResult<List<StatisticsEventsVO.Top10VO>> top10(@Validated CockpitVO params) {
-        checkApiUtil.cockpit(params);
-        List<StatisticsEventsVO.Top10VO> ls = new ArrayList<>();
-        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 100.0));
-        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 90.0));
-        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 80.0));
-        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 70.0));
-        return CommonResult.success(ls);
+//        checkApiUtil.cockpit(params);
+//        List<StatisticsEventsVO.Top10VO> ls = new ArrayList<>();
+//        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 100.0));
+//        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 90.0));
+//        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 80.0));
+//        ls.add(new StatisticsEventsVO.Top10VO("xx涓槦", 70.0));
+//        return CommonResult.success(ls);
+        String beginTime = params.getBeginTime();
+        String endTime = params.getEndTime();
+        List<StatisticsEventsVO.Top10VO> res = iApiDataService.listTop10(beginTime, endTime);
+        return CommonResult.success(res);
     }
 
 
@@ -161,11 +166,8 @@
     @GetMapping("/arithmetic_event")
     public CommonResult<List<StatisticsEventsVO.ArithmeticVO>> arithmeticEvent(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
-        List<StatisticsEventsVO.ArithmeticVO> ls = new ArrayList<>();
-        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 10, 0.1));
-        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 20, 0.2));
-        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 30, 0.3));
-        ls.add(new StatisticsEventsVO.ArithmeticVO("xx涓槦", 40, 0.4));
+        List<StatisticsEventsVO.ArithmeticVO> ls = iApiDataService.arithmeticEvent(params.getStreetId(), params.getBeginTime(), params.getEndTime());
+
         return CommonResult.success(ls);
     }
 

--
Gitblit v1.8.0