处理机场飞行控制数据
This commit is contained in:
parent
a4950f3d0e
commit
67f465b364
|
|
@ -22,7 +22,7 @@ public class FlightEntity extends BaseEntity
|
|||
/** 外部飞行ID (来自MQTT的taskId) */
|
||||
private String flightIdExternal;
|
||||
|
||||
/** 状态:自检中、飞行中、已返航 */
|
||||
/** 状态:HOME ERROR CHECKING FLYING */
|
||||
private String status;
|
||||
|
||||
/** 返航时间 */
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -95,6 +96,10 @@ public class FlightLogCallback implements IDroneRealTimeCallback {
|
|||
String statusText = result != null && result ? "自检成功" : "自检失败";
|
||||
String logContent = check + " " + value + " " + statusText;
|
||||
|
||||
if(Boolean.FALSE.equals(result)){
|
||||
flightService.updateFlightStatus(flight.getFlightId(), "ERROR");
|
||||
}
|
||||
|
||||
logEntity.setLogContent(logContent);
|
||||
logEntity.setSuccess(result != null ? result : false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue