From 60b08301cbc6f150e4c0107bd16b53673214d972 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Wed, 03 Nov 2021 15:50:29 +0800
Subject: [PATCH] update
---
screen-api/src/main/java/com/moral/api/service/impl/CityAqiServiceImpl.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/CityAqiServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/CityAqiServiceImpl.java
index 352e2da..466b0c5 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/CityAqiServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/CityAqiServiceImpl.java
@@ -89,7 +89,7 @@
Date date = (Date) forecastDatum.get("time");
String value = forecastDatum.get("value").toString();
Map<String, Object> data = JSONObject.parseObject(value, Map.class);
- Object o3 = data.get("o3");
+ Object o3 = data.get("O3");
if (i == DateUtils.getHour(date) * 2) {
if (!ObjectUtils.isEmpty(o3)) {
map.put("O3", o3);
@@ -104,7 +104,7 @@
Date date = (Date) measuredDatum.get("time");
String value = measuredDatum.get("value").toString();
Map<String, Object> data = JSONObject.parseObject(value, Map.class);
- Object o3 = data.get("o3");
+ Object o3 = data.get("O3");
if (i == (DateUtils.getHour(date) * 2 + 1)) {
if (!ObjectUtils.isEmpty(o3)) {
map.put("O3", o3);
@@ -123,9 +123,9 @@
if (value == null)
value = queryCityAqiByRegionCodeFromDB(regionCode);
//������AQI������������������
- if (value == null || value.get("aqi") == null)
+ if (value == null || value.get("AQI") == null)
return null;
- Integer aqi = Integer.parseInt(value.get("aqi").toString());
+ Integer aqi = Integer.parseInt(value.get("AQI").toString());
String category = AQIUtils.classOfPollutionByAqi(aqi);
value.put("category", category);
return value;
@@ -173,7 +173,7 @@
continue;
}
Map<String, Object> allDataMap = JSON.parseObject(allDataJson, Map.class);
- Object aqiData = allDataMap.get("aqi");
+ Object aqiData = allDataMap.get("AQI");
if (aqiData == null)
result.put(key, "");
else
--
Gitblit v1.8.0