From 1678987834d2e37c2bb6b1c2577c35977dbb2195 Mon Sep 17 00:00:00 2001
From: lbq <1065079612@qq.com>
Date: 星期四, 08 一月 2026 16:25:22 +0800
Subject: [PATCH] ERP和MES对接接口模拟实现(待内部对接),接口映射初步工具实现(待应用)

---
 rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/WmsRcsController.java |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/WmsRcsController.java b/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/WmsRcsController.java
index db251dd..0a7d0b8 100644
--- a/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/WmsRcsController.java
+++ b/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/WmsRcsController.java
@@ -2,7 +2,11 @@
 
 import com.vincent.rsf.framework.common.R;
 import com.vincent.rsf.framework.exception.CoolException;
+import com.vincent.rsf.openApi.entity.dto.CommonResponse;
+import com.vincent.rsf.openApi.entity.dto.SyncLocsDto;
+import com.vincent.rsf.openApi.entity.params.ExMsgCallbackParams;
 import com.vincent.rsf.openApi.entity.params.RcsPubTaskParams;
+import com.vincent.rsf.openApi.entity.params.SyncRcsLocsParam;
 import com.vincent.rsf.openApi.service.WmsRcsService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -12,6 +16,7 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 
@@ -31,7 +36,7 @@
      */
     @ApiOperation("璋冨害浠诲姟涓嬪彂")
     @PostMapping("/pub/task")
-    public R pubTasks(@RequestBody RcsPubTaskParams params) {
+    public CommonResponse pubTasks(@RequestBody RcsPubTaskParams params) {
         if (Objects.isNull(params)) {
             throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
         }
@@ -46,7 +51,7 @@
      */
     @ApiOperation("鍙栨秷璋冨害浠诲姟")
     @PostMapping("/cancel/task")
-    public R cancelTasks(@RequestBody Map<String, Object> params) {
+    public CommonResponse cancelTasks(@RequestBody Map<String, Object> params) {
         return wmsRcsService.cancelTasks(params);
     }
 
@@ -56,9 +61,9 @@
      * @description: 浠诲姟鍥炶皟锛岀姸鎬佸洖鍐�
      * @version 1.0
      */
-    @ApiOperation("寮傚父浠诲姟鍥炶皟")
+    @ApiOperation("鐘舵�佷笂鎶ュ洖璋�")
     @PostMapping("/callback/event")
-    public R callBackEvent(@RequestBody Map<String, Object> params) {
+    public CommonResponse callBackEvent(@RequestBody ExMsgCallbackParams params) {
         return wmsRcsService.callBackEvent(params);
     }
 
@@ -71,9 +76,12 @@
      */
     @ApiOperation("RCS搴撲綅淇℃伅鍚屾")
     @PostMapping("/sync/locs")
-    public R syncLocsToWms() {
-         wmsRcsService.syncLocs();
-         return R.ok();
+    public CommonResponse syncLocsToWms(@RequestBody SyncRcsLocsParam params) {
+         if (Objects.isNull(params)) {
+             throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+         }
+         List<SyncLocsDto> result = wmsRcsService.syncLocs(params);
+         return CommonResponse.ok(result);
     }
 
 

--
Gitblit v1.9.1