添加日志

This commit is contained in:
孙小云 2026-03-23 15:53:51 +08:00
parent 127d01cae7
commit b5b3d3cc9d
1 changed files with 9 additions and 1 deletions

View File

@ -124,9 +124,17 @@ public class FlightEventCallback implements IAirportFlyControlCallback, IAirport
// 检查是否任务完成
String dataContent = data.getString("data");
if ("操作成功".equals(msg) && "[地面站]任务飞行完成".equals(dataContent)) {
log.info("【FlightEventCallback】检测到任务完成更新状态为HOME: deviceSn={}, flightId={}", deviceSn, taskId);
log.info("【FlightEventCallback】检测到 [地面站]任务飞行完成 更新状态为HOME: deviceSn={}, flightId={}", deviceSn, taskId);
flightService.updateFlightStatus(taskId, StatusEnum.COMPLETED);
}
if ("[机巢]无人机关机成功".equals(dataContent)) {
log.info("【FlightEventCallback】检测到 [机巢]无人机关机成功 更新状态为HOME: deviceSn={}, flightId={}", deviceSn, taskId);
flightService.updateFlightStatus(taskId, StatusEnum.COMPLETED);
}
} else {
// 未起飞所有消息存到 device_pre_check_log
log.info("【FlightEventCallback】未起飞存入自检日志: deviceSn={}, flightId={}, msg={}, code={}", deviceSn, taskId, msg, code);