Browse Source

1、修改获取应急任务代码;

tags/v1.2.0^2
wanjing 1 year ago
parent
commit
06ef9f304c
1 changed files with 0 additions and 8 deletions
  1. +0
    -8
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/mission/query/QueryEmergencyListService.java

+ 0
- 8
tuoheng-admin/src/main/java/com/tuoheng/admin/service/mission/query/QueryEmergencyListService.java View File

@@ -92,26 +92,18 @@ public class QueryEmergencyListService {
airportIds += mission.getAirportId() + ",";
}
airportIds = airportIds.substring(0, airportIds.length() - 1);

String url = CommonConfig.airportURL + SystemConstant.API_AIRPORT_STATUS_BY_AIRPORT_ID;
String param = "airportIds=" + airportIds;

log.info("调用机场平台,查询飞行状态: url:{}", url);
log.info("调用机场平台,查询飞行状态: param:{}", param);

String airPortStatusStr = HttpUtils.sendGet(url, param);
if (StringUtils.isEmpty(airPortStatusStr)) {
log.info("调用机场平台,查询飞行状态:机场接口返回数据为空,查询飞行状态失败");
throw new ServiceException("机场接口返回数据为空,查询飞行状态失败");
}
log.info("调用机场平台,查询飞行状态:机场接口返回数据为空,查询飞行状态失败,airPortStatusStr:{}", airPortStatusStr);

JsonResult jsonResult = JacksonUtil.json2pojo(airPortStatusStr, JsonResult.class);

List<AirPortStatusVO> airPortStatusVOList = JSONObject.parseArray(JSONObject.toJSONString(jsonResult.getData()), AirPortStatusVO.class);
Map<Integer, AirPortStatusVO> map = new HashMap<>();
for (AirPortStatusVO airPortStatusVO : airPortStatusVOList) {
log.info("调用机场平台,查询飞行状态, airPortStatusVO={}", airPortStatusVO);
map.put(airPortStatusVO.getAirportId(), airPortStatusVO);
}
return map;

Loading…
Cancel
Save