From 0d95bea786a3ecf999a7e2f0172310c508ff6a96 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Thu, 01 Feb 2024 15:47:16 +0800
Subject: [PATCH] fix:补充提交
---
screen-api/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java
index d6c68c8..15221e1 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java
@@ -560,7 +560,7 @@
Map<String, List<OnlineRateVo>> collectList=new HashMap<>();
List<OnlineRateVo> OnlineRateVoList = deviceMapper.getLists(onlineRatePageCond.getOrganizationId(),onlineRatePageCond.getState());
if (!ObjectUtils.isEmpty(OnlineRateVoList)){
- collectList = OnlineRateVoList.stream().collect(Collectors.groupingBy(OnlineRateVo::getHourState));
+
for (OnlineRateVo onlineRateVo : OnlineRateVoList) {
List<HistoryHourly> valueByMacAndTime = historyHourlyService.getValueByMacAndTime(onlineRateVo.getMac(), start, end);
ArrayList<Date> dates = new ArrayList<>();
@@ -685,7 +685,9 @@
}
});
}*/
-
+ if (!ObjectUtils.isEmpty(OnlineRateVoList)){
+ collectList = OnlineRateVoList.stream().collect(Collectors.groupingBy(OnlineRateVo::getHourState));
+ }
return ObjectUtils.isEmpty(onlineRatePageCond.getHourState())?OnlineRateVoList:collectList.get(onlineRatePageCond.getHourState());
}
--
Gitblit v1.8.0