chen.lin
2 天以前 9140aee230de0ef41de9682a9353fbd372e2bcaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
}