package com.zt.plat.module.erp.api;

import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.erp.api.dto.internalWarehouse.InternalWarehouseDTO;
import com.zt.plat.module.erp.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
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)
@Tag(name = "RPC 服务 - ERP")
public interface InternalWarehouseApi {
    String PREFIX = ApiConstants.PREFIX + "/internal-warehouse";
    /**
     * 根据工厂代码和仓库代码获取仓库列表
     *
     * @param factoryCode 工厂代码
     * @param warehouseCode 仓库代码
     * @return 仓库列表
     */
    @GetMapping(PREFIX + "/list-by-factory-code-and-warehouse-code")
    @Operation(summary = "根据工厂代码和仓库代码获取仓库列表", description = "根据工厂代码和仓库代码获取仓库列表;factoryCode是工厂编码,warehouseCode是仓库编码,mmsiType是业务类型(字典：SPLY_BSN_TP),operationType是操作类型(字典：WAREHOUSE_OPERATION)")
    CommonResult<List<InternalWarehouseDTO>> getInternalWarehouseListByFactoryCodeAndWarehouseCode(@RequestParam(value = "factoryCode") String factoryCode, @RequestParam(value = "warehouseCode") String warehouseCode, @RequestParam(value = "mmsiType", required = false) String mmsiType, @RequestParam(value = "operationType", required = false) String operationType);

}
