From f26dc28abc0f5efc0ab0143d3554474ebbc6c169 Mon Sep 17 00:00:00 2001
From: whycxzp <glperry@163.com>
Date: 星期四, 10 四月 2025 09:32:03 +0800
Subject: [PATCH] 提交电池告警参数,电池实时数据历史和电源实时数据历史

---
 src/main/java/com/whyc/util/SubTablePageInfoUtil.java |   44 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/whyc/util/SubTablePageInfoUtil.java b/src/main/java/com/whyc/util/SubTablePageInfoUtil.java
index 956cb48..48bb96e 100644
--- a/src/main/java/com/whyc/util/SubTablePageInfoUtil.java
+++ b/src/main/java/com/whyc/util/SubTablePageInfoUtil.java
@@ -9,7 +9,9 @@
 import com.whyc.pojo.db_alarm.DevLithiumAlarmDataYear;
 import com.whyc.pojo.db_lithium_ram_db.DevLithiumInf;
 import com.whyc.pojo.db_power_alarm.PowerAlarmHistory;
+import com.whyc.pojo.db_power_history.BattRealTimeDataHistory;
 import com.whyc.pojo.db_power_history.BattStationTempHistory;
+import com.whyc.pojo.db_power_history.PowerRealTimeDataHistory;
 import com.whyc.pojo.db_user.UserInf;
 import com.whyc.service.DevLithiumInfService;
 import com.whyc.service.SubTableService;
@@ -229,6 +231,23 @@
                     int currentCount = service.getBattStationTempHisCount(tempHistory);
                     queryCountMap.put(tableYear, currentCount);
                 }
+                else if (pojo instanceof BattRealTimeDataHistory) {
+                    BattRealTimeDataHistory tempHistory = new BattRealTimeDataHistory();
+                    tempHistory.setStartTime(queryTime.get(0));
+                    tempHistory.setEndTime(queryTime.get(1));
+                    tempHistory.setRecordYearMonth(tableName);
+                    int currentCount = service.getBattRealTimeDataHisCount(tempHistory);
+                    queryCountMap.put(tableYear, currentCount);
+                }
+                else if (pojo instanceof PowerRealTimeDataHistory) {
+                    PowerRealTimeDataHistory tempHistory = new PowerRealTimeDataHistory();
+                    tempHistory.setStartTime(queryTime.get(0));
+                    tempHistory.setEndTime(queryTime.get(1));
+                    tempHistory.setRecordYearMonth(tableName);
+                    int currentCount = service.getPowerRealTimeDataHisCount(tempHistory);
+                    queryCountMap.put(tableYear, currentCount);
+                }
+
                 latch.countDown();
             });
         }
@@ -278,7 +297,8 @@
                 battAlarmHistory.setLimitEnd(limitList.get(1));
                 List<BattAlarmHistory> list =  service.getBattHisList(battAlarmHistory);
                 dataList.addAll(list);
-            }else if (pojo instanceof BattStationTempHistory){
+            }
+            else if (pojo instanceof BattStationTempHistory){
                 BattStationTempHistory tempHistory = new BattStationTempHistory();
                 tempHistory.setStartTime(queryTime.get(0));
                 tempHistory.setEndTime(queryTime.get(1));
@@ -289,6 +309,28 @@
                 List<BattStationTempHistory> list =  service.getBattStationTempHisList(tempHistory);
                 dataList.addAll(list);
             }
+            else if (pojo instanceof BattRealTimeDataHistory){
+                BattRealTimeDataHistory tempHistory = new BattRealTimeDataHistory();
+                tempHistory.setStartTime(queryTime.get(0));
+                tempHistory.setEndTime(queryTime.get(1));
+                tempHistory.setRecordYearMonth(recordYear);
+                List<Integer> limitList = tableAndLimitMap.get(key);
+                tempHistory.setLimitStart(limitList.get(0));
+                tempHistory.setLimitEnd(limitList.get(1));
+                List<BattRealTimeDataHistory> list =  service.getBattRealTimeDataHisList(tempHistory);
+                dataList.addAll(list);
+            }
+            else if (pojo instanceof PowerRealTimeDataHistory){
+                PowerRealTimeDataHistory tempHistory = new PowerRealTimeDataHistory();
+                tempHistory.setStartTime(queryTime.get(0));
+                tempHistory.setEndTime(queryTime.get(1));
+                tempHistory.setRecordYearMonth(recordYear);
+                List<Integer> limitList = tableAndLimitMap.get(key);
+                tempHistory.setLimitStart(limitList.get(0));
+                tempHistory.setLimitEnd(limitList.get(1));
+                List<PowerRealTimeDataHistory> list =  service.getPowerRealTimeDataHisList(tempHistory);
+                dataList.addAll(list);
+            }
         }
         pageInfo.setList(dataList);
         return pageInfo;

--
Gitblit v1.9.1