|
|
@@ -8,12 +8,12 @@ import java.math.BigDecimal; |
|
|
|
public class AirWeatherUtil { |
|
|
|
|
|
|
|
public static String getWeather(AirWeatherVO airWeather) { |
|
|
|
if(ObjectUtil.isEmpty(airWeather) ||ObjectUtil.isEmpty(airWeather.getWth())){ |
|
|
|
if (ObjectUtil.isEmpty(airWeather) || ObjectUtil.isEmpty(airWeather.getWth())) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
return "气温:" + new BigDecimal(airWeather.getWth().getParm().getTmp()).divide(new BigDecimal(10))+"℃" |
|
|
|
+ ";湿度:" + new BigDecimal(airWeather.getWth().getParm().getHum()).divide(new BigDecimal(10))+"RH" |
|
|
|
+ ";风速:" + new BigDecimal(airWeather.getWth().getParm().getWspd()).divide(new BigDecimal(10))+"M/S" |
|
|
|
+ ";风向:" + airWeather.getWth().getParm().getWdir() + "°"; |
|
|
|
return "气温:" + airWeather.getWth().getParmNew().getTmp() + "℃" |
|
|
|
+ ";湿度:" + airWeather.getWth().getParmNew().getHum() + "RH" |
|
|
|
+ ";风速:" + airWeather.getWth().getParmNew().getWspd() + "M/S" |
|
|
|
+ ";风向:" + airWeather.getWth().getParmNew().getWdirname(); |
|
|
|
} |
|
|
|
} |