package com.djhk.uav.uav.service.impl;

import com.djhk.common.core.domain.R;
import com.djhk.uav.uav.model.SyunDronePayloadParam;
import com.djhk.uav.uav.model.SyunFlyToPointParam;
import com.djhk.uav.uav.model.SyunPayloadCommandsParam;
import com.djhk.uav.uav.model.SyunTakeoffToPointParam;
import com.djhk.uav.uav.service.IControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @description
 * @author szh
 * @date 2023/4/18
 * @version 1.0
 */
@Service
public class ControlServiceImpl implements IControlService
{
//    @Autowired
//    private AirdromeDeviceClient airdromeDeviceClient;
//    @Autowired
//    private DockClient dockClient;

//    @Override
//    public R controlDock(String sn, String serviceIdentifier, String action) {
//        Map<String, Object> map = new HashMap<>();
//        map.put("sn",sn);
//        map.put("service_identifier",serviceIdentifier);
//        map.put("action",action);
//        return airdromeDeviceClient.createControlJob(map);
//    }
//
//    @Override
//    public R takeoffToPoint(SyunTakeoffToPointParam syunTakeoffToPointParam) {
//        return dockClient.takeoffToPoint(syunTakeoffToPointParam);
//    }
//
//    @Override
//    public R flyToPoint(SyunFlyToPointParam syunFlyToPointParam) {
//        return dockClient.flyToPoint(syunFlyToPointParam);
//    }
//
//    @Override
//    public R deviceFlyToPoint(SyunFlyToPointParam syunFlyToPointParam) {
//        return dockClient.deviceFlyToPoint(syunFlyToPointParam);
//    }
//
//    @Override
//    public R flyToPointStop(String dockSn) {
//        return dockClient.flyToPointStop(dockSn);
//    }
//
//    @Override
//    public R payloadCommands(SyunPayloadCommandsParam syunPayloadCommandsParam) {
//        return dockClient.payloadCommands(syunPayloadCommandsParam);
//    }
//
//    @Override
//    public R seizeAuthority(String authority, SyunDronePayloadParam syunDronePayloadParam) {
//        if("1".equals(authority)){
//            return dockClient.seizeFlightAuthority(syunDronePayloadParam);
//        }else if("2".equals(authority)){
//            return dockClient.seizePayloadAuthority(syunDronePayloadParam);
//        }
//        return R.fail();
//    }

    @Override
    public R controlDock(String sn, String serviceIdentifier, String action) {
        return null;
    }

    @Override
    public R takeoffToPoint(SyunTakeoffToPointParam syunTakeoffToPointParam) {
        return null;
    }

    @Override
    public R flyToPoint(SyunFlyToPointParam syunFlyToPointParam) {
        return null;
    }

    @Override
    public R deviceFlyToPoint(SyunFlyToPointParam syunFlyToPointParam) {
        return null;
    }

    @Override
    public R flyToPointStop(String dockSn) {
        return null;
    }

    @Override
    public R payloadCommands(SyunPayloadCommandsParam syunPayloadCommandsParam) {
        return null;
    }

    @Override
    public R seizeAuthority(String authority, SyunDronePayloadParam syunDronePayloadParam) {
        return null;
    }

    @Override
    public void takeoffToPointReply(String eventsReceiver) {
//        dockClient.takeoffToPointReply(eventsReceiver);
    }

    @Override
    public void flyToPointReply(String eventsReceiver) {
//        dockClient.flyToPointReply(eventsReceiver);
    }

    @Override
    public void handleReturnHome(String gatewaySn) {

    }
}
