From 8f8b6a47ce277cad0b640c328ab3962419e1c024 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期五, 06 二月 2026 13:00:47 +0800
Subject: [PATCH] RCS完整流程
---
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java | 52 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java
index f1309c5..13a9301 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/WcsController.java
@@ -4,6 +4,8 @@
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.api.entity.params.ExMsgParams;
+import com.vincent.rsf.server.api.entity.params.WcsTaskParams;
import com.vincent.rsf.server.common.annotation.OperationLog;
import com.vincent.rsf.server.manager.enums.TaskType;
import com.vincent.rsf.server.api.service.WcsService;
@@ -15,6 +17,8 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
@RestController
@RequestMapping("/wcs")
@@ -90,7 +94,20 @@
@OperationLog("RCS搴撲綅淇℃伅鍚屾")
@PostMapping("/sync/locs")
public R syncLocsToWms() {
- return wcsService.syncLocsToWms();
+ wcsService.syncLocsToWms();
+ return R.ok();
+ }
+
+ /**
+ * 涓嬪彂浠诲姟鑷砏CS锛孉PI涓浆
+ * @param
+ * @return
+ */
+ @ApiOperation("涓嬪彂浠诲姟鑷砏CS")
+ @OperationLog("涓嬪彂浠诲姟鑷砏CS")
+ @PostMapping("/pub/task/wcs")
+ public R pubTaskToWcs(@RequestBody WcsTaskParams params) {
+ return wcsService.pubWcsTask(params);
}
/**
@@ -102,8 +119,37 @@
@ApiOperation("RCS涓婃姤寮傚父鎵ц淇℃伅")
@OperationLog("RCS涓婃姤寮傚父鎵ц淇℃伅")
@PostMapping("/receive/ex/msg")
- public R receiveExMsg() {
- return wcsService.receiveExMsg();
+ public R receiveExMsg(@RequestBody ExMsgParams params) {
+ return wcsService.receiveExMsg(params);
+ }
+
+ /**
+ * @author Ryan
+ * @date 2026/2/6
+ * @description: 鐢宠鍏ュ簱浠诲姟锛屽垎閰嶅簱浣嶏紙鍐呴儴鎺ュ彛锛�
+ * @version 1.0
+ */
+ @ApiOperation("鐢宠鍏ュ簱浠诲姟锛屽垎閰嶅簱浣�")
+ @PostMapping("/allocate/location")
+ public R allocateLocation(@RequestBody Map<String, Object> params) {
+ if (Cools.isEmpty(params)) {
+ return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+ }
+ String barcode = (String) params.get("barcode");
+ String staNo = (String) params.get("staNo");
+ Integer type = params.get("type") != null ? Integer.valueOf(params.get("type").toString()) : null;
+
+ if (Cools.isEmpty(barcode)) {
+ return R.error("鏂欑鐮佷笉鑳戒负绌猴紒锛�");
+ }
+ if (Cools.isEmpty(staNo)) {
+ return R.error("鍏ュ簱绔欑偣涓嶈兘涓虹┖锛侊紒");
+ }
+ if (type == null) {
+ return R.error("鍏ュ簱绫诲瀷涓嶈兘涓虹┖锛侊紒");
+ }
+
+ return wcsService.allocateLocation(barcode, staNo, type);
}
--
Gitblit v1.9.1