|
|
|
|
|
|
|
|
Map<Integer, AirPortStatusVO> airPortStatusVOMap = getAirPortStatusVOMap(missionList); |
|
|
Map<Integer, AirPortStatusVO> airPortStatusVOMap = getAirPortStatusVOMap(missionList); |
|
|
AirPortStatusVO airPortStatusVO; |
|
|
AirPortStatusVO airPortStatusVO; |
|
|
for (EmergencyMissionVO emergencyMissionVO : emergencyMissionVOList) { |
|
|
for (EmergencyMissionVO emergencyMissionVO : emergencyMissionVOList) { |
|
|
airPortStatusVO = airPortStatusVOMap.get(emergencyMissionVO.getAirportId()); |
|
|
|
|
|
if (ObjectUtil.isNotNull(airPortStatusVO)) { |
|
|
|
|
|
emergencyMissionVO.setAirportStatus(airPortStatusVO.getMsg()); |
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(airPortStatusVOMap)) { |
|
|
|
|
|
airPortStatusVO = airPortStatusVOMap.get(emergencyMissionVO.getAirportId()); |
|
|
|
|
|
if (ObjectUtil.isNotNull(airPortStatusVO)) { |
|
|
|
|
|
emergencyMissionVO.setAirportStatus(airPortStatusVO.getMsg()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return JsonResult.success(missionList); |
|
|
|
|
|
|
|
|
return JsonResult.success(emergencyMissionVOList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
|
|
|
String airPortStatusStr = HttpUtils.sendGet(url, param); |
|
|
String airPortStatusStr = HttpUtils.sendGet(url, param); |
|
|
if (StringUtils.isEmpty(airPortStatusStr)) { |
|
|
if (StringUtils.isEmpty(airPortStatusStr)) { |
|
|
log.info("调用机场平台,查询飞行状态:机场接口返回数据为空,查询飞行状态失败"); |
|
|
log.info("调用机场平台,查询飞行状态:机场接口返回数据为空,查询飞行状态失败"); |
|
|
throw new ServiceException("机场接口返回数据为空,查询飞行状态失败"); |
|
|
|
|
|
|
|
|
return null; |
|
|
} |
|
|
} |
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStatusStr, JsonResult.class); |
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStatusStr, JsonResult.class); |
|
|
|
|
|
|