rsf-open-api/src/main/java/com/vincent/rsf/openApi/config/PlatformProperties.java
@@ -34,4 +34,21 @@ public String getBaseUrl() { return this.host + ":" + this.port + "/" + this.prePath; } @Data @Configuration @ConfigurationProperties(prefix = "platform.wms") public class WmsApi { /** * rcs调用路径 */ private String host; /**rcs调用端口**/ private String port; } } rsf-open-api/src/main/java/com/vincent/rsf/openApi/service/impl/WmsRcsServiceImpl.java
@@ -41,6 +41,9 @@ private PlatformProperties rcsApi; @Autowired private PlatformProperties.WmsApi wmsApi; @Autowired private RestTemplate restTemplate; @@ -100,6 +103,8 @@ */ @Override public R callBackEvent(Map<String, Object> params) { String rcsUrl = wmsApi.getHost() + ":" + wmsApi.getPort() + RcsConstant.pubTask; return R.ok(); } rsf-open-api/src/main/resources/application-dev.yml
@@ -59,3 +59,8 @@ host: http://192.168.4.84 #端口 port: 8088 wms: #链接 host: http://127.0.0.1 #端口 port: 8080 rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java
@@ -4,7 +4,6 @@ import com.vincent.rsf.framework.common.R; import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto; import com.vincent.rsf.server.api.controller.erp.params.TaskInParam; import com.vincent.rsf.server.common.annotation.OperationLog; import com.vincent.rsf.server.manager.enums.TaskType; import com.vincent.rsf.server.api.service.WcsService; @@ -25,8 +24,6 @@ @Autowired private WcsService wcsService; // @Autowired // private WmsRcsService wmsRcsService; @ApiOperation(value = "wcs生成入库任务接口") @PostMapping("/create/in/task") @@ -45,8 +42,6 @@ } InTaskMsgDto msgDto = wcsService.createInTask(param); return R.ok(msgDto); } @ApiOperation(value = "agv取货完成接口") @@ -72,8 +67,7 @@ /** * 接收WCS调度,回传执行状态 * //TODO 1. 拣料出库,再入库执行,修改状态为199.任务完成 并记录入库站点(源站点),添加任务号参数 * * TODO 1. 拣料出库,再入库执行,修改状态为199.任务完成 并记录入库站点(源站点),添加任务号参数 * @param param * @return */ @@ -83,10 +77,8 @@ if (Cools.isEmpty(param)) { return R.error("参数不能为空!!"); } return R.ok(); } /** * @author Ryan @@ -100,4 +92,19 @@ public R syncLocsToWms() { return wcsService.syncLocsToWms(); } /** * @author Ryan * @date 2025/8/28 * @description: RCS上报异常信息 * @version 1.0 */ @ApiOperation("RCS上报异常执行信息") @OperationLog("RCS上报异常执行信息") @PostMapping("/receive/ex/msg") public R receiveExMsg() { return wcsService.receiveExMsg(); } } rsf-server/src/main/java/com/vincent/rsf/server/api/entity/params/ExMsgParams.java
New file @@ -0,0 +1,23 @@ package com.vincent.rsf.server.api.entity.params; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.experimental.Accessors; @Data @Accessors(chain = true) @ApiModel(value = "ExMsgParams", description = "异常上报参数") public class ExMsgParams { private String seqNum; @ApiModelProperty("事件类型: {START: 下发成功, OTBIN: 取货成功, END: 放货成功}") private String eventType; @ApiModelProperty("小车编号 ") private String robotCode; @ApiModelProperty("容器码") private String zpallet; }