package com.prolog.eis.feign;

import com.prolog.eis.component.core.dto.mcs.McsAcrossRequestDto;
import com.prolog.eis.component.core.dto.mcs.McsCarryRequestDto;
import com.prolog.eis.component.core.dto.mcs.McsExitRequestDto;
import com.prolog.eis.inter.dto.mcs.ZxMcsExitResponseDto;
import com.prolog.framework.common.message.RestMessage;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author: wuxl
 * @create: 2021-09-01 14:34
 * @Version: V1.0
 */
@Component
@FeignClient(value = "${prolog.service.wcs:service-ai-eis-wcs-center}")
public interface McsInterfaceFeignClient {

    /**
     * MCS搬运任务推送
     *
     * @param reqDto
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/api/v1/inter/mcs/carryTask")
    RestMessage<Object> sendCarryTask(@RequestBody McsCarryRequestDto reqDto) throws Exception;


    @ApiOperation(value = "MCS查询点位信息", notes = "MCS查询点位信息")
    @PostMapping("/api/v1/inter/mcs/getExitStatus")
    RestMessage<List<ZxMcsExitResponseDto>> getExitStatus(@RequestBody McsExitRequestDto reqDto) throws Exception;


    /**
     * MCS跨层任务推送
     *
     * @param reqDto
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/api/v1/inter/mcs/acrossTask")
    RestMessage<Object> sendAcrossTask(@RequestBody McsAcrossRequestDto reqDto) throws Exception;

    /**
     * MCS搬运任务异步推送
     *
     * @param reqDto
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/api/v1/inter/mcs/sendCarryTaskAsync")
    void sendCarryTaskAsync(@RequestBody McsCarryRequestDto reqDto) throws Exception;


}
