From bb81166c8d0818c9211c334ed7b67d5f1166b81a Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 09 一月 2024 10:47:16 +0800
Subject: [PATCH] 看板数据修改

---
 ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java |   48 ++++++-----
 ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java                         |  160 +++++++++++++++++++++++++++++++--------
 2 files changed, 152 insertions(+), 56 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 d4a0543..f12f6e3 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
@@ -133,39 +133,133 @@
     public CommonResult<List<AIIotStatisticsVO>> statistics(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
 
-        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime());
-        AIIotStatisticsVO staticVO1 = list.get(0);
-        List<AIIotStatisticsRecordVO> records1 = staticVO1.getRecords();
-        records1.get(0).setCount(210);
-        records1.get(1).setCount(183);
-        records1.get(2).setCount(157);
-        records1.get(3).setCount(231);
-        records1.get(4).setCount(256);
-        records1.get(5).setCount(311);
-        AIIotStatisticsVO staticVO2 = list.get(1);
-        List<AIIotStatisticsRecordVO> records2 = staticVO2.getRecords();
-        records2.get(0).setCount(273);
-        records2.get(1).setCount(231);
-        records2.get(2).setCount(303);
-        records2.get(3).setCount(219);
-        records2.get(4).setCount(245);
-        records2.get(5).setCount(223);
-        AIIotStatisticsVO staticVO3 = list.get(2);
-        List<AIIotStatisticsRecordVO> records3 = staticVO3.getRecords();
-        records3.get(0).setCount(313);
-        records3.get(1).setCount(247);
-        records3.get(2).setCount(267);
-        records3.get(3).setCount(249);
-        records3.get(4).setCount(265);
-        records3.get(5).setCount(306);
-        AIIotStatisticsVO staticVO4 = list.get(3);
-        List<AIIotStatisticsRecordVO> records4 = staticVO4.getRecords();
-        records4.get(0).setCount(267);
-        records4.get(1).setCount(347);
-        records4.get(2).setCount(354);
-        records4.get(3).setCount(314);
-        records4.get(4).setCount(317);
-        records4.get(5).setCount(274);
+//        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime());
+        List<AIIotStatisticsVO> list = new ArrayList<>();
+        AIIotStatisticsVO a1 = new AIIotStatisticsVO();
+        String type1 = "闈炴満鍔ㄨ溅涔卞仠鏀�";
+        List<AIIotStatisticsRecordVO> records1 = new ArrayList<>();
+        AIIotStatisticsRecordVO ai1 = new AIIotStatisticsRecordVO();
+        ai1.setMonth("2024-01");
+        ai1.setCount(210);
+        AIIotStatisticsRecordVO ai2 = new AIIotStatisticsRecordVO();
+        ai2.setMonth("2023-12");
+        ai2.setCount(183);
+        AIIotStatisticsRecordVO ai3 = new AIIotStatisticsRecordVO();
+        ai3.setMonth("2023-11");
+        ai3.setCount(157);
+        AIIotStatisticsRecordVO ai4 = new AIIotStatisticsRecordVO();
+        ai4.setMonth("2023-10");
+        ai4.setCount(231);
+        AIIotStatisticsRecordVO ai5 = new AIIotStatisticsRecordVO();
+        ai5.setMonth("2023-09");
+        ai5.setCount(256);
+        AIIotStatisticsRecordVO ai6 = new AIIotStatisticsRecordVO();
+        ai6.setMonth("2023-08");
+        ai6.setCount(311);
+        records1.add(ai1);
+        records1.add(ai2);
+        records1.add(ai3);
+        records1.add(ai4);
+        records1.add(ai5);
+        records1.add(ai6);
+        a1.setType(type1);
+        a1.setRecords(records1);
+        list.add(a1);
+
+        AIIotStatisticsVO a2 = new AIIotStatisticsVO();
+        String type2 = "搴楀缁忚惀";
+        List<AIIotStatisticsRecordVO> records2 = new ArrayList<>();
+        AIIotStatisticsRecordVO bi1 = new AIIotStatisticsRecordVO();
+        bi1.setMonth("2024-01");
+        bi1.setCount(273);
+        AIIotStatisticsRecordVO bi2 = new AIIotStatisticsRecordVO();
+        bi2.setMonth("2023-12");
+        bi2.setCount(231);
+        AIIotStatisticsRecordVO bi3 = new AIIotStatisticsRecordVO();
+        bi3.setMonth("2023-11");
+        bi3.setCount(303);
+        AIIotStatisticsRecordVO bi4 = new AIIotStatisticsRecordVO();
+        bi4.setMonth("2023-10");
+        bi4.setCount(219);
+        AIIotStatisticsRecordVO bi5 = new AIIotStatisticsRecordVO();
+        bi5.setMonth("2023-09");
+        bi5.setCount(245);
+        AIIotStatisticsRecordVO bi6 = new AIIotStatisticsRecordVO();
+        bi6.setMonth("2023-08");
+        bi6.setCount(223);
+        records2.add(bi1);
+        records2.add(bi2);
+        records2.add(bi3);
+        records2.add(bi4);
+        records2.add(bi5);
+        records2.add(bi6);
+        a2.setType(type2);
+        a2.setRecords(records2);
+        list.add(a2);
+
+        AIIotStatisticsVO a3 = new AIIotStatisticsVO();
+        String type3 = "鏃犵収缁忚惀娓稿晢";
+        List<AIIotStatisticsRecordVO> records3 = new ArrayList<>();
+        AIIotStatisticsRecordVO ci1 = new AIIotStatisticsRecordVO();
+        ci1.setMonth("2024-01");
+        ci1.setCount(313);
+        AIIotStatisticsRecordVO ci2 = new AIIotStatisticsRecordVO();
+        ci2.setMonth("2023-12");
+        ci2.setCount(247);
+        AIIotStatisticsRecordVO ci3 = new AIIotStatisticsRecordVO();
+        ci3.setMonth("2023-11");
+        ci3.setCount(267);
+        AIIotStatisticsRecordVO ci4 = new AIIotStatisticsRecordVO();
+        ci4.setMonth("2023-10");
+        ci4.setCount(249);
+        AIIotStatisticsRecordVO ci5 = new AIIotStatisticsRecordVO();
+        ci5.setMonth("2023-09");
+        ci5.setCount(265);
+        AIIotStatisticsRecordVO ci6 = new AIIotStatisticsRecordVO();
+        ci6.setMonth("2023-08");
+        ci6.setCount(306);
+        records3.add(ci1);
+        records3.add(ci2);
+        records3.add(ci3);
+        records3.add(ci4);
+        records3.add(ci5);
+        records3.add(ci6);
+        a3.setType(type3);
+        a3.setRecords(records3);
+        list.add(a3);
+
+
+        AIIotStatisticsVO a4 = new AIIotStatisticsVO();
+        String type4 = "鍗犻亾缁忚惀";
+        List<AIIotStatisticsRecordVO> records4 = new ArrayList<>();
+        AIIotStatisticsRecordVO di1 = new AIIotStatisticsRecordVO();
+        di1.setMonth("2024-01");
+        di1.setCount(267);
+        AIIotStatisticsRecordVO di2 = new AIIotStatisticsRecordVO();
+        di2.setMonth("2023-12");
+        di2.setCount(347);
+        AIIotStatisticsRecordVO di3 = new AIIotStatisticsRecordVO();
+        di3.setMonth("2023-11");
+        di3.setCount(354);
+        AIIotStatisticsRecordVO di4 = new AIIotStatisticsRecordVO();
+        di4.setMonth("2023-10");
+        di4.setCount(314);
+        AIIotStatisticsRecordVO di5 = new AIIotStatisticsRecordVO();
+        di5.setMonth("2023-09");
+        di5.setCount(317);
+        AIIotStatisticsRecordVO di6 = new AIIotStatisticsRecordVO();
+        di6.setMonth("2023-08");
+        di6.setCount(274);
+        records4.add(di1);
+        records4.add(di2);
+        records4.add(di3);
+        records4.add(di4);
+        records4.add(di5);
+        records4.add(di6);
+        a4.setType(type4);
+        a4.setRecords(records4);
+        list.add(a4);
+
         return CommonResult.success(list);
     }
 }
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 f276bc7..49e780e 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
@@ -54,14 +54,14 @@
     @GetMapping("/statistics")
     public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
-//        CommonResult.success(iBaseCaseService.statistics());
+        CommonResult.success(iBaseCaseService.statistics());
         StatisticsVO report = new StatisticsVO();
         report.setCount(63L);
         report.setRatio(BigDecimal.valueOf(0.9141));
         report.setUp(true);
         StatisticsVO dispose = new StatisticsVO();
         dispose.setCount(2743L);
-        dispose.setRatio(BigDecimal.valueOf(0.9946));
+        dispose.setRatio(new BigDecimal("0.9946").setScale(4, BigDecimal.ROUND_HALF_UP).abs());
         dispose.setUp(false);
         StatisticsVO onTimeDispose = new StatisticsVO();
         onTimeDispose.setCount(2743L);
@@ -97,39 +97,39 @@
         videoAndAreaVO.setCount(4269L);
 
         VideoAndAreaVO videoAndAreaVO1 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("闈炴満鍔ㄨ溅涔卞仠鏀�");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.2245));
-        videoAndAreaVO.setCount(1711L);
+        videoAndAreaVO1.setName("闈炴満鍔ㄨ溅涔卞仠鏀�");
+        videoAndAreaVO1.setRatio(BigDecimal.valueOf(0.2245));
+        videoAndAreaVO1.setCount(1711L);
 
         VideoAndAreaVO videoAndAreaVO2 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("鍗犻亾缁忚惀");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0633));
-        videoAndAreaVO.setCount(482L);
+        videoAndAreaVO2.setName("鍗犻亾缁忚惀");
+        videoAndAreaVO2.setRatio(BigDecimal.valueOf(0.0633));
+        videoAndAreaVO2.setCount(482L);
 
         VideoAndAreaVO videoAndAreaVO3 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("鏃犵収缁忚惀娓稿晢");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0413));
-        videoAndAreaVO.setCount(315L);
+        videoAndAreaVO3.setName("鏃犵収缁忚惀娓稿晢");
+        videoAndAreaVO3.setRatio(BigDecimal.valueOf(0.0413));
+        videoAndAreaVO3.setCount(315L);
 
         VideoAndAreaVO videoAndAreaVO4 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("搴楀缁忚惀");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0392));
-        videoAndAreaVO.setCount(291L);
+        videoAndAreaVO4.setName("搴楀缁忚惀");
+        videoAndAreaVO4.setRatio(BigDecimal.valueOf(0.0392));
+        videoAndAreaVO4.setCount(291L);
 
         VideoAndAreaVO videoAndAreaVO5 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("杩濊鎾戜紴");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0217));
-        videoAndAreaVO.setCount(165L);
+        videoAndAreaVO5.setName("杩濊鎾戜紴");
+        videoAndAreaVO5.setRatio(BigDecimal.valueOf(0.0217));
+        videoAndAreaVO5.setCount(165L);
 
         VideoAndAreaVO videoAndAreaVO6 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("鍏朵粬");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0160));
-        videoAndAreaVO.setCount(122L);
+        videoAndAreaVO6.setName("鍏朵粬");
+        videoAndAreaVO6.setRatio(BigDecimal.valueOf(0.0160));
+        videoAndAreaVO6.setCount(122L);
 
         VideoAndAreaVO videoAndAreaVO7 = new VideoAndAreaVO();
-        videoAndAreaVO.setName("缇ゅ彂鎬т簨浠�");
-        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0123));
-        videoAndAreaVO.setCount(94L);
+        videoAndAreaVO7.setName("缇ゅ彂鎬т簨浠�");
+        videoAndAreaVO7.setRatio(BigDecimal.valueOf(0.0123));
+        videoAndAreaVO7.setCount(94L);
 
         videoAndAreaVOS.add(videoAndAreaVO);
         videoAndAreaVOS.add(videoAndAreaVO1);
@@ -139,6 +139,8 @@
         videoAndAreaVOS.add(videoAndAreaVO5);
         videoAndAreaVOS.add(videoAndAreaVO6);
         videoAndAreaVOS.add(videoAndAreaVO7);
+
+        typeAndSourceVO.setRecords(videoAndAreaVOS);
         return CommonResult.success(typeAndSourceVO);
     }
 

--
Gitblit v1.8.0