diff --git a/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java b/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java index 1a48d00..e77f3d8 100644 --- a/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java +++ b/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());