jinpengyong
2020-09-08 adde1ed1a99622c80a95dea83e294711d295c55c
src/main/java/com/moral/service/impl/HistoryServiceImpl.java
@@ -383,7 +383,8 @@
            }
            returnMap = AQICalculation.hourlyAQI(AQIMap);
        }
        long aqi = Math.round(Double.valueOf(returnMap.get("AQI").toString()));
        returnMap.put("AQI",aqi);
        return returnMap;
    }
@@ -520,7 +521,9 @@
                for (Map.Entry<String, Object> entry : map.entrySet()) {
                    for (Sensor sensor : sensors) {
                        if (sensor.getSensorKey().equals(entry.getKey())) {
                            mapAvg.put(entry.getKey(), new BigDecimal(entry.getValue().toString().replace("\"", "")).stripTrailingZeros().toPlainString() + sensor.getUnit());
                            if (entry.getValue() != null) {
                                mapAvg.put(entry.getKey(), new BigDecimal(entry.getValue().toString().replace("\"", "")).stripTrailingZeros().toPlainString() + sensor.getUnit());
                            }
                        } else if (("min" + sensor.getSensorKey()).equals(entry.getKey())) {
                            mapMin.put(entry.getKey().substring(3), new BigDecimal(entry.getValue().toString().replace("\"", "")).stripTrailingZeros().toPlainString());
                        } else if (("max" + sensor.getSensorKey()).equals(entry.getKey())) {