package cn.iocoder.yudao.module.flow.api.outbound;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.flow.api.outbound.dto.OutboundRespDTO;
import cn.iocoder.yudao.module.flow.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Api(tags = "RPC 服务 - 出库单")
public interface OutboundApi {

    String PREFIX = ApiConstants.PREFIX + "/flow";

    @GetMapping(PREFIX + "/getOutboundByOutBoundId")
    @ApiOperation("获取出库单")
    @ApiImplicitParam(name = "outBoundId", value = "出库单号", required = true, example = "OUPJOE20230420153938958B81W0", dataTypeClass = List.class)
    CommonResult<OutboundRespDTO> getOutboundByOutBoundId(@RequestParam("outBoundId") String outBoundId);

    @GetMapping(PREFIX + "/getOutboundListByVendorId")
    @ApiOperation("根据经销商编码获取出库单列表")
    @ApiImplicitParam(name = "vendorId", value = "经销商编码", required = true, example = "DACD202304181514F2ER", dataTypeClass = String.class)
    CommonResult<List<OutboundRespDTO>> getOutboundListByVendorId(@RequestParam("vendorId") String vendorId);
}
