package com.dji.sample.map.service;

import com.dji.sample.map.model.dto.FlightTaskDTO;
import com.dji.sample.map.model.dto.FlightTrackDTO;
import com.dji.sample.map.model.entity.FlightTaskEntity;
import com.dji.sample.map.model.entity.FlightTrackEntity;
import com.dji.sample.map.model.param.FlightTaskQueryParam;
import com.dji.sdk.common.PaginationData;

import java.util.List;

/**
 * @author hqjiang
 * @version 1.0
 * @date 2024/7/23
 */
public interface IFlightTrackTaskService {

    PaginationData<FlightTaskDTO> getFlightTasksPaginationByWorkspaceId(String workspaceId, FlightTaskQueryParam param, long page, long pageSize);

    FlightTaskDTO getCurrentFlightTask(String workspaceId, String droneSn);

    /**
     * 通过目录名称查找目录
     * @param flightPoint
     * @return
     */
    Integer addFlightPoint(FlightTrackDTO flightPoint);

    Integer addFlightPoint(FlightTrackEntity flightPoint);

    Integer addHomePoint(FlightTrackEntity flightPoint);

    /**
     * 通过任务ID获取飞行轨迹
     * @param taskId
     * @return
     */
    List<FlightTrackDTO> getFlightTrackByTaskId(String taskId);

    List<FlightTrackDTO> getRTFlightTrackByTaskId(Integer taskId);

    /**
     * 创建飞行任务
     * @param flightTaskDTO
     * @return
     */
    Integer createFlightTask(FlightTaskDTO flightTaskDTO);

    Integer updateFlightTask(FlightTaskEntity flightTaskEntity);

    /**
     * 创建飞行任务
     * @param flightTaskEntity
     * @return
     */
    FlightTaskDTO createFlightTask(FlightTaskEntity flightTaskEntity);

    FlightTaskEntity dtoToEntity(FlightTaskDTO flightTask);

    FlightTrackDTO flightTrackEntityToDto(FlightTrackEntity flightTrackEntity);

    List<FlightTaskEntity> getFlightTrack(String deviceNo,String worksapceId);

    double getFlightKilometersByTaskId(Integer taskId);
}
