package com.vincent.rsf.server.api.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; /** * @author Ryan * @version 1.0 * @title RemotesInfoProperties * @description * @create 2025/3/7 09:48 */ @Data @Configuration @ConfigurationProperties(prefix = "platform.erp") public class RemotesInfoProperties { /** * 接口host */ private String host; /** * 端口号 */ private String port; /** * 接口链接前缀 */ private String prePath; /** * 云仓地址 */ private String baseUrl; /** * 鼎捷 ilcwmsplus 完成反馈等公共字段(orgNo、单据类别、单位) */ private Dap dap = new Dap(); /** * 对应 yml {@code platform.erp.api};与独立 Bean 不同,挂在 {@link RemotesInfoProperties} 上便于一处查看入/出库 path */ private ApiInfo api = new ApiInfo(); @Data public static class Dap { private String orgNo = ""; private String docTypeIn = ""; private String docTypeOut = ""; /** 库存调整(9.2)单据类别;移库等 */ private String docTypeAdj = ""; private String unitNo = "PCS"; } @Data public static class ApiInfo { /** 一键上报质检接口 */ private String notifyInspect; /** 与 CloudWmsErpFeignClient 路径一致;Feign 实际 URL = platform.erp.base-url + 本 path */ private String stockInCompletedPath = "/dapilc/restful/service/ilcwmsplus/ICusStockService/stockInCompleted"; private String stockOutCompletedPath = "/dapilc/restful/service/ilcwmsplus/ICusStockService/stockOutCompleted"; /** 9.2 库存调整 */ private String inventoryAdjustPath = "/api/report/inventoryAdjust"; /** 物料基础信息同步 */ private String matSyncPath = "/api/mat/sync"; } @Data @Configuration @ConfigurationProperties(prefix = "platform.rcs") public class RcsApi { /** * rcs调用路径 */ private String host; /**rcs调用端口**/ private String port; } public String getBaseUrl() { return this.host + ":" + this.port + "/" + this.prePath; } }