package com.vincent.rsf.server.api.feign;
|
|
import com.vincent.rsf.server.api.controller.erp.params.InOutResultReportParam;
|
import com.vincent.rsf.server.api.controller.erp.params.InventoryAdjustReportParam;
|
import com.vincent.rsf.server.api.feign.fallback.CloudWmsErpFeignClientFallbackFactory;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.http.MediaType;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import java.util.Map;
|
|
/**
|
* 立库侧通过 OpenFeign 调用云仓WMS:入/出库结果上报(9.1)、库存调整上报(9.2)、物料同步。
|
* 使用 platform.erp.base-url 作为根地址;失败时走 Fallback,统一返回错误响应(不抛异常)。
|
*/
|
@FeignClient(
|
name = "cloudWmsErp",
|
url = "${platform.erp.base-url:http://127.0.0.1:8080}",
|
fallbackFactory = CloudWmsErpFeignClientFallbackFactory.class
|
)
|
public interface CloudWmsErpFeignClient {
|
|
/** 9.1 入/出库结果上报 */
|
@PostMapping(value = "/api/report/inOutResult", consumes = MediaType.APPLICATION_JSON_VALUE)
|
Map<String, Object> reportInOutResult(@RequestBody InOutResultReportParam body);
|
|
/** 9.2 库存调整主动上报 */
|
@PostMapping(value = "/api/report/inventoryAdjust", consumes = MediaType.APPLICATION_JSON_VALUE)
|
Map<String, Object> reportInventoryAdjust(@RequestBody InventoryAdjustReportParam body);
|
|
/** 物料基础信息同步 */
|
@PostMapping(value = "/api/mat/sync", consumes = MediaType.APPLICATION_JSON_VALUE)
|
Map<String, Object> syncMatnrs(@RequestBody Object body);
|
}
|