Bläddra i källkod

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_lc into develop

tags/v1.2.0^2
wanjing 1 år sedan
förälder
incheckning
aa2bedef43
3 ändrade filer med 17 tillägg och 5 borttagningar
  1. +10
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/index/AirportDetailDto.java
  2. +2
    -2
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/WarningVO.java
  3. +5
    -3
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/IndexServiceImpl.java

+ 10
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/index/AirportDetailDto.java Visa fil

@@ -26,6 +26,11 @@ public class AirportDetailDto {
*/
private String wdir;

/**
* 风向名称
*/
private String wdirName;

/**
* 大气压力
*/
@@ -51,4 +56,9 @@ public class AirportDetailDto {
*/
private String mountName;

/**
* 降雨量
*/
private String rainfull;

}

+ 2
- 2
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/WarningVO.java Visa fil

@@ -21,8 +21,8 @@ public class WarningVO {
/**
* 预警时间
*/
@DateTimeFormat(pattern = "yyyy.MM.dd hh:mm:ss")
@JsonFormat(pattern = "yyyy.MM.dd hh:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy.MM.dd HH:mm:ss")
@JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss", timezone = "GMT+8")
private Date waringTime;

/**

+ 5
- 3
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/IndexServiceImpl.java Visa fil

@@ -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);

Laddar…
Avbryt
Spara