|
|
@@ -98,7 +98,7 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
JSONObject dataObject = (JSONObject) JSONObject.toJSON(jsonResult.getData()); |
|
|
|
JSONObject wthJson = dataObject.getJSONObject("WTH"); |
|
|
|
if(Objects.nonNull(wthJson)){ |
|
|
|
JSONObject parmJson = wthJson.getJSONObject("parm"); |
|
|
|
JSONObject parmJson = wthJson.getJSONObject("parmNew"); |
|
|
|
|
|
|
|
BigDecimal hum = parmJson.getBigDecimal("Hum").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP); |
|
|
|
airportDetailDto.setHum(hum + "rh"); |
|
|
@@ -106,7 +106,9 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
airportDetailDto.setTmp(tmp + "℃"); |
|
|
|
|
|
|
|
airportDetailDto.setWspd(parmJson.getString("WSPD") + "m/s") |
|
|
|
.setWdir(parmJson.getString("WDIR") + "度"); |
|
|
|
.setWdir(parmJson.getString("WDIR") + "度") |
|
|
|
.setRainfull(parmJson.getString("Rainfull") + "mm") |
|
|
|
.setWdirName(parmJson.getString("WDIRNAME")); |
|
|
|
//用角度表示风向,是把圆周分成360度,北风(N)是0度(即360度),东风(E)是90度,南风(S)是180度,西风(W)是270度 |
|
|
|
BigDecimal hpa = parmJson.getBigDecimal("Hpa"); |
|
|
|
if(hpa != null){ |
|
|
@@ -116,7 +118,7 @@ public class IndexServiceImpl implements IndexService { |
|
|
|
} |
|
|
|
JSONObject tahJson = dataObject.getJSONObject("TAH"); |
|
|
|
if(Objects.nonNull(tahJson)){ |
|
|
|
JSONObject parmJson = tahJson.getJSONObject("parm"); |
|
|
|
JSONObject parmJson = tahJson.getJSONObject("parmNew"); |
|
|
|
BigDecimal hum = parmJson.getBigDecimal("Hum").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP); |
|
|
|
airportDetailDto.setHum(hum + "rh"); |
|
|
|
BigDecimal tmp = parmJson.getBigDecimal("Tmp").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP); |