From 5923f2345a695625da776338b9a218415f22fe0a Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 26 三月 2024 14:29:23 +0800
Subject: [PATCH] 大屏数据恢复成实际数据

---
 ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java |   86 +++++++++++++++++++++---------------------
 1 files changed, 43 insertions(+), 43 deletions(-)

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 c645879..75547fb 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,29 +54,29 @@
     @GetMapping("/statistics")
     public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
-        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.9946d));
-        dispose.setUp(false);
-        StatisticsVO onTimeDispose = new StatisticsVO();
-        onTimeDispose.setCount(2743L);
-        onTimeDispose.setRatio(BigDecimal.valueOf(1.0000));
-        onTimeDispose.setUp(false);
-        StatisticsVO register = new StatisticsVO();
-        register.setCount(2758L);
-        register.setRatio(BigDecimal.valueOf(0.3619));
-        register.setUp(false);
-        Map<String, Object> map = new HashMap<>();
-        map.put("reported", report);
-        map.put("disposition", dispose);
-        map.put("dispositionInTime", onTimeDispose);
-        map.put("register", register);
-        return CommonResult.success(map);
+        return 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(new BigDecimal(0.9946d).setScale(4, BigDecimal.ROUND_HALF_UP).abs());
+//        dispose.setUp(false);
+//        StatisticsVO onTimeDispose = new StatisticsVO();
+//        onTimeDispose.setCount(2743L);
+//        onTimeDispose.setRatio(BigDecimal.valueOf(1.0000));
+//        onTimeDispose.setUp(false);
+//        StatisticsVO register = new StatisticsVO();
+//        register.setCount(2758L);
+//        register.setRatio(BigDecimal.valueOf(0.3619));
+//        register.setUp(false);
+//        Map<String, Object> map = new HashMap<>();
+//        map.put("reported", report);
+//        map.put("disposition", dispose);
+//        map.put("dispositionInTime", onTimeDispose);
+//        map.put("register", register);
+//        return CommonResult.success(map);
     }
 
     @ApiOperation(value = "浜嬩欢绫诲瀷")
@@ -85,8 +85,8 @@
         checkApiUtil.cockpit(params);
         EnforcementEventsVO.TypeAndSourceVO typeAndSourceVO = new EnforcementEventsVO.TypeAndSourceVO();
         Long count = iViolationsService.count();
-//        typeAndSourceVO.setAll(iViolationsService.count());
-        typeAndSourceVO.setAll(7621L);
+        typeAndSourceVO.setAll(iViolationsService.count());
+//        typeAndSourceVO.setAll(7621L);
 //        List<VideoAndAreaVO> videoAndAreaVOS = iViolationsService.selectType();
 //        videoAndAreaVOS.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(4, BigDecimal.ROUND_HALF_UP)));
 //        typeAndSourceVO.setRecords(videoAndAreaVOS);
@@ -157,11 +157,11 @@
             return videoAndAreaVO;
         }).collect(Collectors.toList());
 
-        collect.get(0).setCount(631L);
-        collect.get(1).setCount(569L);
-        collect.get(2).setCount(550L);
-        collect.get(3).setCount(491L);
-        collect.get(4).setCount(490L);
+//        collect.get(0).setCount(631L);
+//        collect.get(1).setCount(569L);
+//        collect.get(2).setCount(550L);
+//        collect.get(3).setCount(491L);
+//        collect.get(4).setCount(490L);
         return CommonResult.success(collect);
     }
 
@@ -193,13 +193,13 @@
     @GetMapping("/area")
     public CommonResult area(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
-//      return CommonResult.success(iBaseCaseService.areaCount());
-        List<VideoAndAreaVO> videoAndAreaVOS = new ArrayList<>();
-        VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO();
-        videoAndAreaVO.setName("濡欓珮琛楅亾");
-        videoAndAreaVO.setCount(7621L);
-        videoAndAreaVOS.add(videoAndAreaVO);
-        return CommonResult.success(videoAndAreaVOS);
+      return CommonResult.success(iBaseCaseService.areaCount());
+//        List<VideoAndAreaVO> videoAndAreaVOS = new ArrayList<>();
+//        VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO();
+//        videoAndAreaVO.setName("濡欓珮琛楅亾");
+//        videoAndAreaVO.setCount(7621L);
+//        videoAndAreaVOS.add(videoAndAreaVO);
+//        return CommonResult.success(videoAndAreaVOS);
     }
 
     @ApiOperation(value = "寤惰浜嬩欢")
@@ -214,13 +214,13 @@
     public CommonResult<EnforcementEventsVO.InfoVO> info(@Validated CockpitVO params) {
         checkApiUtil.cockpit(params);
         EnforcementEventsVO.InfoVO infoVO = new EnforcementEventsVO.InfoVO();
-//        infoVO.setToday(iBaseCaseService.dayCount());
-        infoVO.setToday(41);
-//        infoVO.setWeek(iBaseCaseService.weekCount());
-        infoVO.setWeek(41);
+        infoVO.setToday(iBaseCaseService.dayCount());
+//        infoVO.setToday(41);
+        infoVO.setWeek(iBaseCaseService.weekCount());
+//        infoVO.setWeek(41);
         infoVO.setDispatch(iBaseCaseService.dispatchCount());
-//        infoVO.setIdentification(iBaseCaseService.alCount());
-        infoVO.setIdentification(7621);
+        infoVO.setIdentification(iBaseCaseService.alCount());
+//        infoVO.setIdentification(7621);
         IPage<EventVO> page = iBaseCaseService.selectEventList(params.getBeginTime(), params.getEndTime(),params.getPageIndex(),params.getPageSize());
         infoVO.setEvent(page.getRecords());
         infoVO.setTotal(page.getTotal());

--
Gitblit v1.8.0