From 02635ed29a2a9381df5681dcf7d3367466cffb2c Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 06 三月 2026 10:02:28 +0800
Subject: [PATCH] 功能优化

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java |   49 +++++++++++++++----------------------------------
 1 files changed, 15 insertions(+), 34 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index 3ba9af1..7dcfc40 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -1710,41 +1710,23 @@
     @Override
     public    YearDeviceDataVO yearFightingAdminDeviceData(){
         YearDeviceDataVO data = new YearDeviceDataVO();
-//        FireStatisticRequest param = new FireStatisticRequest();
-//        param.setIndexCode("api_fire_statistic");
-//        BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param);
-//        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ) {
-//            data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum()));
-//            data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum()));
-//        }
-//        param = new FireStatisticRequest();
-//        param.setIndexCode("api_fire_statistic_month");
-//        BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param);
-//        if(response1 != null && StringUtils.equals(response1.getCode(), HKConstants.RESPONSE_SUCCEE)
-//                && response1.getData()!=null ) {
-//            data.setMonthAddNum(Constants.formatIntegerNum(response1.getData().getMaintenanceNumMonth()));
-//            data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum()));
-//        }
-
-        data.setProtectNum(Constants.ZERO);
-        data.setPlanProtectTotal(Constants.ZERO);
-        data.setMonthAddNum(Constants.ZERO);
-        data.setMonthTotalNum(Constants.ZERO);
-        BaseResponse<SensorStatusStatisticResponse> response = HKService.sensorStatusStatistic();
-        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)
-                && response.getData()!=null ) {
-            data.setProtectNum(Constants.formatIntegerNum(response.getData().getSensorMainNum()));
-            data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getSensorNum()));
-            data.setMonthAddNum(Constants.formatIntegerNum(response.getData().getSensorMainMonthNum()));
-            data.setMonthTotalNum(Constants.formatIntegerNum(response.getData().getSensorNum()));
+        FireStatisticRequest param = new FireStatisticRequest();
+        param.setIndexCode("api_fire_statistic");
+        BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param);
+        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ) {
+            data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum()));
+            data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum()));
         }
-
+        param = new FireStatisticRequest();
+        param.setIndexCode("api_fire_statistic_month");
+        BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param);
+        if(response1 != null && StringUtils.equals(response1.getCode(), HKConstants.RESPONSE_SUCCEE)
+                && response1.getData()!=null ) {
+            data.setMonthAddNum(Constants.formatIntegerNum(response1.getData().getMaintenanceNumMonth()));
+            data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum()));
+        }
         return data;
     }
-
-
-
-
 
     /**
      * 銆愭秷闃茬鎺с�戠湅鏉�-鍒嗙被鍜屾眹鎬荤殑鍚勭姸鎬佽澶囨暟閲�
@@ -2596,8 +2578,7 @@
                 .selectAs(Platform::getName,PlatformWarnEvent::getPlatformName)
                 .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId)
                 .eq(PlatformWarnEvent::getIsdeleted,Constants.ZERO)
-                //.apply(" to_days(t.create_date) = to_days(now()) ")
-                .apply(" ( t.create_date > now() - INTERVAL 10 MINUTE ) ")
+                .apply("to_days(t.create_date) = to_days(now())")
                 .orderByDesc(PlatformWarnEvent::getCreateDate)
                 .last(" limit "+limit)
         );

--
Gitblit v1.9.3