| | |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | Double AQIMAX = Collections.max(AQIList); |
| | | Map<String, Object> returnMap = new HashMap<>(); |
| | | Optional<Map.Entry<String, Integer>> max0 = maxMap.entrySet() |
| | | .stream() |
| | | .max(Map.Entry.comparingByValue()); |
| | | |
| | | returnMap.put("maxSensor",max0.get().getKey()); |
| | | returnMap.put("AQI", AQIMAX); |
| | | if (AQIList.size()>0){ |
| | | Double AQIMAX = Collections.max(AQIList); |
| | | Optional<Map.Entry<String, Integer>> max0 = maxMap.entrySet() |
| | | .stream() |
| | | .max(Map.Entry.comparingByValue()); |
| | | returnMap.put("maxSensor",max0.get().getKey()); |
| | | returnMap.put("AQI", AQIMAX); |
| | | }else { |
| | | returnMap.put("maxSensor",""); |
| | | returnMap.put("AQI", ""); |
| | | } |
| | | return returnMap; |
| | | } |
| | | static double PM2_5AQI(Double value) { |