| | |
| | | |
| | | import com.ard.common.core.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class ArdFlightTask extends BaseEntity { |
| | | |
| | | private Integer taskId; // 任务ID |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; // 任务结束时间 |
| | | private Long duration; // 持续时长(单位:秒) |
| | | private Integer flightDuration; // 飞行时长(单位:秒) |
| | | private Integer flightMileage; // 飞行里程 |
| | | private Float aveSpeed; // 平均速度 |
| | | private Float maxSpeed; // 最大速度 |
| | | private String serverId; // 服务器ID |
| | | private Integer flightMode; // 飞行模式(来自飞控遥测) |
| | | private String routeId; // 关联航线ID(ard_route_info.id),非空即为航线飞行 |
| | | |
| | | /** |
| | | * 判断是否为航线飞行 |
| | | */ |
| | | public boolean isRouteFlight() { |
| | | return routeId != null && !routeId.isEmpty(); |
| | | } |
| | | |
| | | // 计算持续时长,单位:秒 |
| | | public Long getDuration() { |