|
|
@@ -116,8 +116,7 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi |
|
|
|
return thMissionMapper.updateById(thMissionUpdate) > 0; |
|
|
|
}else if(AirPortTaskStatusEnum.WAIT.getCode()==missionStatusRequest.getStatus()){ |
|
|
|
//硬件停止后,停止AI分析 |
|
|
|
stopAI(missionStatusRequest); |
|
|
|
return true; |
|
|
|
return stopAI(missionStatusRequest); |
|
|
|
}else{ |
|
|
|
throw new ServiceException(ServiceExceptionEnum.TASK_NOT_STATUS); |
|
|
|
} |
|
|
@@ -163,10 +162,11 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi |
|
|
|
return responseJson; |
|
|
|
} |
|
|
|
|
|
|
|
private void stopAI(MissionStatusRequest missionStatusRequest) { |
|
|
|
private Boolean stopAI(MissionStatusRequest missionStatusRequest) { |
|
|
|
ThMission thMission = getRecentlyRecord(missionStatusRequest,TaskStatusEnum.FLIGHT.getCode()); |
|
|
|
Assert.notNull(thMission, "飞行任务不能为空!"); |
|
|
|
ThMission thMissionUpdate = setStatus(missionStatusRequest, thMission,AirPortTaskStatusEnum.WAIT); |
|
|
|
boolean result=false; |
|
|
|
if(thMissionMapper.updateById(thMissionUpdate) > 0){ |
|
|
|
//任务调用完成之后,调用发送通道,请求DSP关闭请求 |
|
|
|
//调用DSP接口 |
|
|
@@ -180,10 +180,12 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi |
|
|
|
}else{ |
|
|
|
log.info("dsp实时调用响应:{}",responseJson); |
|
|
|
} |
|
|
|
result=true; |
|
|
|
}else { |
|
|
|
log.error("dsp实时调用失败:{}", responseJson); |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
private ThMission setStatus(MissionStatusRequest missionStatusRequest, ThMission thMission,AirPortTaskStatusEnum airPortTaskStatusEnum) { |