| | |
| | | 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()); |
| | |
| | | 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(); |