package com.tuoheng.admin.service.third.airport;

import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.request.airport.DroneHoverRequest;
import com.tuoheng.admin.entity.request.airport.ReversalFlightRequest;
import com.tuoheng.admin.service.third.airport.drone.DroneService;
import com.tuoheng.admin.service.third.airport.reversal.ReversalFlightService;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AirportServiceImpl implements AirportService {

    @Autowired
    private GetAirportListService getAirportListService;

    @Autowired
    private GetAirLineListService getAirLineListService;

    @Autowired
    private ExecuteTaskService executeTaskService;

    @Autowired
    private GetAirportDetailService getAirportDetailService;

    @Autowired
    private GetAirportVideoService getAirportVideoService;

    @Autowired
    private DroneService droneService;

    @Autowired
    private ReversalFlightService reversalFlightService;

    @Override
    public JsonResult getAirportList() {
        return getAirportListService.getAirportList();
    }

    @Override
    public JsonResult getAirLineList(Integer droneId) {
        return getAirLineListService.getAirLineList(droneId);
    }

    @Override
    public JsonResult executeTask(String userId, Inspection inspection) {
        return executeTaskService.executeTask(userId, inspection);
    }

    @Override
    public JsonResult getAirportDetail(Integer airportId) {
        return getAirportDetailService.getAirportDetail(airportId);
    }

    @Override
    public JsonResult getAirportVideo(Integer droneId) {
        return getAirportVideoService.getAirportVideo(droneId);
    }

    @Override
    public JsonResult hover(DroneHoverRequest request) {
        return droneService.hover(request.getInspectiontId());
    }

    @Override
    public JsonResult reversalFlight(ReversalFlightRequest request) {
        return reversalFlightService.reversal(request);
    }

}
