Browse Source

날씨API - 비행계획서 조건문 추가

Test
이학준 2 years ago
parent
commit
d8d56668d0
  1. 33
      src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java

33
src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java

@ -291,23 +291,22 @@ public class BasFlightController {
sb.append(line);
}
CtrTrnsLctnModel weatherResult = ctrTrnsLctnService.convertLatlonToAddress(rs.getNx2(),rs.getNy2());
log.info("weatherResult >>>> : {}", weatherResult);
String str = sb.toString();
JSONParser parser = new JSONParser();
JSONObject jsonObject = (JSONObject) parser.parse(str);
jsonObject.put("area1",weatherResult.getArea1());
jsonObject.put("area2",weatherResult.getArea2());
jsonObject.put("area3",weatherResult.getArea3());
jsonObject.put("landNm",weatherResult.getLandNm());
jsonObject.put("landNum",weatherResult.getLandNum());
// CtrCntrlWeatherModel areaResult = new CtrCntrlWeatherModel();
// areaResult.setArea1(weatherResult.getArea1());
// areaResult.setArea2(weatherResult.getArea2());
// areaResult.setArea3(weatherResult.getArea3());
CtrTrnsLctnModel weatherResult = ctrTrnsLctnService.convertLatlonToAddress(rs.getNx2(),rs.getNy2());
log.info("weatherResult >>>> : {}", weatherResult);
String str = sb.toString();
JSONParser parser = new JSONParser();
JSONObject jsonObject = (JSONObject) parser.parse(str);
if(weatherResult != null) {
jsonObject.put("area1",weatherResult.getArea1());
jsonObject.put("area2",weatherResult.getArea2());
jsonObject.put("area3",weatherResult.getArea3());
jsonObject.put("landNm",weatherResult.getLandNm());
jsonObject.put("landNum",weatherResult.getLandNum());
}
rd.close();
conn.disconnect();
log.info(sb.toString());

Loading…
Cancel
Save