From 74c912b06445d5ba78c33810030dd22a018051df Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Thu, 19 Oct 2023 15:31:22 +0800
Subject: [PATCH] fix:监测站数据问题
---
screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java
index b16ba1d..55b0461 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java
@@ -524,6 +524,37 @@
if(CollectionUtils.isEmpty(historyDailyByMacAndTimeSlot)){
return list;
}
+ //������������������ ������ p5dnd7a0000001 -������ p5dnd7a0000002 -������ p5dnd7a0000003
+ List<String> hzRoad = Arrays.asList("p5dnd7a0245491","p5dnd7a0392159","p5dnd7a0243605","p5dnd7a0392176");
+ List<String> xtRoad = Arrays.asList("p5dnd7a0243603","p5dnd7a0391986","p5dnd7a0392003","p5dnd7a0392144","p5dnd7a0392167","p5dnd7a0391990");
+ List<String> xhRoad = Arrays.asList("p5dnd7a0392158","p5dnd7a0392173","p5dnd7a0391975","p5dnd7a0392153","p5dnd7a0391961","p5dnd7a0243608","p5dnd7a0243618");
+ List<HistoryDaily> hcHz= new ArrayList<>();
+ List<HistoryDaily> xtHz= new ArrayList<>();
+ List<HistoryDaily> xhHz= new ArrayList<>();
+ for(HistoryDaily h : historyDailyByMacAndTimeSlot) {
+ HistoryDaily historyDaily = new HistoryDaily();
+ historyDaily.setTime( h.getTime());
+ historyDaily.setValue(h.getValue());
+ if(hzRoad.contains(h.getMac())){
+ historyDaily.setMac("p5dnd7a0000001");
+ hcHz.add(historyDaily);
+ }else if(xtRoad.contains(h.getMac())){
+ historyDaily.setMac("p5dnd7a0000002");
+ xtHz.add(historyDaily);
+ }else if(xhRoad.contains(h.getMac())){
+ historyDaily.setMac("p5dnd7a0000003");
+ xhHz.add(historyDaily);
+ }
+ }
+ if(CollectionUtils.isNotEmpty(hcHz)){
+ historyDailyByMacAndTimeSlot.addAll(hcHz);
+ }
+ if(CollectionUtils.isNotEmpty(xtHz)){
+ historyDailyByMacAndTimeSlot.addAll(xtHz);
+ }
+ if(CollectionUtils.isNotEmpty(xhHz)){
+ historyDailyByMacAndTimeSlot.addAll(xhHz);
+ }
Map<String,Map<String,ArrayList<Double>>> resultMap = new HashMap<>();
for(HistoryDaily h : historyDailyByMacAndTimeSlot) {
JSONObject jsonObject = JSONObject.parseObject(h.getValue());
@@ -657,7 +688,9 @@
wrapper.eq(Device::getIsDelete,0);
Map<String,String> deviceMap = new HashMap<>();
wrapper.list().forEach(it->deviceMap.put(it.getMac(),it.getName()));
-
+ deviceMap.put("p5dnd7a0000001","������������������");
+ deviceMap.put("p5dnd7a0000002","������������������");
+ deviceMap.put("p5dnd7a0000003","������������������");
for (MonitoringStationDTO m :compositeListResult ){
MonitoringStationDTO monit = new MonitoringStationDTO();
String mac = m.getMac();
--
Gitblit v1.8.0