jinpengyong
2021-11-03 2e5ad6b6a97104693564ebc9108f58642386a362
screen-common/src/main/java/com/moral/util/AmendUtils.java
@@ -108,7 +108,7 @@
        if (!ObjectUtils.isEmpty(o3_8H)) {
            double o3 = 0d;
            for (Map<String, Object> o : o3_8H) {
                double temp = (double) o.get("o3");
                double temp = (double) o.get("O3");
                if (temp > o3) {
                    o3 = temp;
                }
@@ -145,7 +145,7 @@
            List<Double> value = new ArrayList<>();
            for (Map<String, Object> dataMap : data) {
                Map<String, Object> sensorValue = JSONObject.parseObject((String) dataMap.get("value"), Map.class);
                Double o3 = Double.parseDouble(sensorValue.get("o3").toString());
                Double o3 = Double.parseDouble(sensorValue.get("O3").toString());
                Date time = (Date) dataMap.get("time");
                int hour = DateUtils.getHour(time);
                if (hour == 0) {
@@ -159,7 +159,7 @@
                continue;
            }
            double average = value.stream().mapToDouble(aDouble -> aDouble).summaryStatistics().getAverage();
            map.put("o3", average);
            map.put("O3", sciCal(average, 0));
            result.add(map);
        }
        return result;