package com.vincent.rsf.server.api.feign; import com.vincent.rsf.server.api.controller.erp.params.DapIlcwmsCompletionRequest; 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 调用云仓:ICusStockService 入库/出库/调拨完成反馈;9.2 非移库调整仍为 /api/report/inventoryAdjust,请求体同为 {data:[]}。 * 使用 platform.erp.base-url 作为根地址;失败时走 Fallback,统一返回错误响应(不抛异常)。 */ @FeignClient( name = "cloudWmsErp", url = "${platform.erp.base-url:http://127.0.0.1:8080}", fallbackFactory = CloudWmsErpFeignClientFallbackFactory.class, configuration = FeignHttpAuditConfiguration.class ) public interface CloudWmsErpFeignClient { /** 9.1.1 立库入库任务完成反馈 */ @PostMapping(value = "/dapilc/restful/service/ilcwmsplus/ICusStockService/stockInCompleted", consumes = MediaType.APPLICATION_JSON_VALUE) Map cusInventoryCompletionReport(@RequestBody DapIlcwmsCompletionRequest body); /** 9.1.2 立库出库任务完成反馈 */ @PostMapping(value = "/dapilc/restful/service/ilcwmsplus/ICusStockService/stockOutCompleted", consumes = MediaType.APPLICATION_JSON_VALUE) Map cusOutboundCompletionReport(@RequestBody DapIlcwmsCompletionRequest body); /** 调拨(changeType=3)完成反馈,报文体与 9.1 一致 {data:[]} */ @PostMapping(value = "/dapilc/restful/service/ilcwmsplus/ICusStockService/stockTransferCompleted", consumes = MediaType.APPLICATION_JSON_VALUE) Map stockTransferCompleted(@RequestBody DapIlcwmsCompletionRequest body); /** 9.2 库存调整主动上报(changeType 1/2;移库改走 stockTransferCompleted) */ @PostMapping(value = "/api/report/inventoryAdjust", consumes = MediaType.APPLICATION_JSON_VALUE) Map reportInventoryAdjust(@RequestBody DapIlcwmsCompletionRequest body); /** 物料基础信息同步 */ @PostMapping(value = "/api/mat/sync", consumes = MediaType.APPLICATION_JSON_VALUE) Map syncMatnrs(@RequestBody Object body); }