|
|
@@ -205,11 +205,22 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi |
|
|
|
log.info("修改飞行状态:{}",JSONObject.toJSONString(thMissionUpdate)); |
|
|
|
return thMissionMapper.updateById(thMissionUpdate) > 0; |
|
|
|
}else if(AirPortTaskStatusEnum.WAIT.getCode()==missionStatusRequest.getStatus()){ |
|
|
|
// 机场飞行完成,立即修改任务状态为已完成 |
|
|
|
// 机场飞行完成,立即修改任务状态为已完成,设置天气 |
|
|
|
ThMission thMission = thMissionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getId, missionStatusRequest.getRequestId()) |
|
|
|
.eq(ThMission::getMark, MarkEnum.VALID.getCode())); |
|
|
|
ThMission thMissionUpdate = new ThMission(UpdateOrCreateEnum.UPDATE.getCode()); |
|
|
|
thMissionUpdate.setId(Integer.parseInt(missionStatusRequest.getRequestId())); |
|
|
|
thMissionUpdate.setStatus(TaskStatusEnum.COMPLETE.getCode()); |
|
|
|
thMissionUpdate.setExecutionEndTime(new Date()); |
|
|
|
try { |
|
|
|
AirWeatherVO weather = inspectionService.getWeather(thMission.getAirportId()); |
|
|
|
String weatherStr = WeatherUtil.getWeather(weather); |
|
|
|
thMissionUpdate.setWeather(weatherStr); |
|
|
|
} catch (Exception e){ |
|
|
|
thMissionUpdate.setWeather(""); |
|
|
|
log.info("获取天气信息失败,请重试"); |
|
|
|
} |
|
|
|
thMissionMapper.updateById(thMissionUpdate); |
|
|
|
|
|
|
|
//硬件停止后,停止AI分析 |
|
|
@@ -263,19 +274,9 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi |
|
|
|
ThMission thMission = getRecentlyRecord(missionStatusRequest,TaskStatusEnum.FLIGHT.getCode()); |
|
|
|
Assert.notNull(thMission, "飞行任务不能为空!"); |
|
|
|
ThMission thMissionUpdate = new ThMission(UpdateOrCreateEnum.UPDATE.getCode()); |
|
|
|
|
|
|
|
thMissionUpdate.setId(thMission.getId()); |
|
|
|
thMissionUpdate.setMileage(missionStatusRequest.getMileage()); |
|
|
|
boolean result=false; |
|
|
|
try { |
|
|
|
AirWeatherVO weather = inspectionService.getWeather(thMission.getAirportId()); |
|
|
|
String weatherStr = WeatherUtil.getWeather(weather); |
|
|
|
thMissionUpdate.setWeather(weatherStr); |
|
|
|
}catch (Exception e){ |
|
|
|
thMissionUpdate.setWeather(""); |
|
|
|
log.info("获取天气信息失败,请重试"); |
|
|
|
} |
|
|
|
|
|
|
|
//任务调用完成之后,调用发送通道,请求DSP关闭请求 |
|
|
|
//调用DSP接口 |
|
|
|
JSONObject jsonObject = new JSONObject(); |