From 645da5e4e48dd94b760ea4dcbf80e22bf2a3f33c Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 11 一月 2025 17:20:08 +0800
Subject: [PATCH] #添加播种站点功能

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
index 00bfa11..2e8116c 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
@@ -9,6 +9,8 @@
 import com.zy.asrs.framework.annotations.ManagerAuth;
 import com.zy.asrs.framework.common.Cools;
 import com.zy.asrs.framework.common.R;
+import com.zy.asrs.framework.exception.CoolException;
+import com.zy.asrs.wms.asrs.entity.CacheSite;
 import com.zy.asrs.wms.asrs.entity.Loc;
 import com.zy.asrs.wms.asrs.entity.Order;
 import com.zy.asrs.wms.asrs.entity.WaitPakin;
@@ -215,6 +217,44 @@
     }
 
 
+    /**
+     * 鑾峰彇鎾浣�
+     * @return
+     */
+    @GetMapping("/pick/seed/locs")
+    public R seedLocs() {
+        List<CacheSite> sites = mobileService.getSeedLocs();
+        return R.ok(sites);
+    }
 
+    /**
+     * 璁㈠崟缁戝畾绔欑偣
+     * @param param
+     * @return
+     */
+    @PostMapping("/pick/seed/bind")
+    public R bindLoc(@RequestBody Map<String, Object> param) {
+        if (Objects.isNull(param)) {
+            throw new CoolException("璇锋眰鍙傛暟涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("barcode"))) {
+            throw new CoolException("瀹瑰櫒缂栫爜涓嶈兘涓虹┖");
+        }
+        if (Objects.isNull(param.get("orderNo"))) {
+            throw new CoolException("璁㈠崟缂栧彿涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("siteNo"))) {
+            throw new CoolException("鎾绔欑偣涓嶈兘涓虹┖锛侊紒");
+        }
+        if (Objects.isNull(param.get("type"))) {
+            throw new CoolException("鍙傛暟绫诲瀷涓嶈兘涓虹┖锛侊紒");
+        }
+       boolean result =  mobileService.bindOrderBySite(param);
+        if (result) {
+            return R.ok("缁戝畾鎴愬姛锛侊紒");
+        } else {
+            return R.error("缁戝畾澶辫触锛侊紒");
+        }
+    }
 
 }

--
Gitblit v1.9.1