From 81ce1c7b4ef8e552527579501dccb0f3f256b1d8 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 09 四月 2024 22:41:34 +0800
Subject: [PATCH] # 新增 一键组托 + 启动入库 接口

---
 src/main/java/com/zy/asrs/controller/AgvMobileController.java |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index 23dd1e1..ed483cf 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -2,6 +2,7 @@
 
 import com.core.common.R;
 import com.zy.asrs.entity.AgvBasDevp;
+import com.zy.asrs.entity.param.AgvMobileStartPakin;
 import com.zy.asrs.entity.param.AgvMobileStartParam;
 import com.zy.asrs.entity.param.CombParam;
 import com.zy.asrs.service.*;
@@ -42,9 +43,12 @@
     locno锛熺粍鎵�+缁戝畾鏆傚瓨浣� 锛� 缁勬墭
      */
     @PostMapping("/comb/auth")
-    public R comb(@RequestBody CombParam combParam){
-        String message = agvMobileService.comb(combParam, 1l);
-        return R.ok(message);
+    public R comb(@RequestBody List<CombParam> combParams){
+        combParams.forEach(combParam -> {
+            agvMobileService.comb(combParam, getUserId());
+        });
+
+        return R.ok();
     }
 
     /*
@@ -54,7 +58,7 @@
     public R combBinding(@RequestBody Map<String,Object> map){
         String barcode = map.get("barcode").toString();
         String stationCode = map.get("stationCode").toString();
-        Short containerType = Short.valueOf(map.get("containerType").toString());
+        Short containerType = Short.valueOf(barcode.substring(0,2));
         agvMobileService.combBinding(barcode,stationCode,containerType);
         return R.ok("鎵樼洏缁戝畾绔欑偣鎴愬姛");
     }
@@ -97,6 +101,20 @@
     }
 
     /*
+    鍚姩鍏ュ簱锛岀粍鎵� + 鐢熶骇宸ヤ綔妗�
+    */
+    @PostMapping("/start/pakin/auth")
+    @Synchronized
+    public R startPakin(@RequestBody AgvMobileStartPakin params){
+        // 缁勬墭
+        params.getCombParams().forEach(combParam -> {
+            agvMobileService.comb(combParam,getUserId());
+        });
+
+        return R.ok("鐢熸垚宸ヤ綔妗f垚鍔�");
+    }
+
+    /*
     鍏ュ簱
      */
     @PostMapping("/pakin/empty/auth")

--
Gitblit v1.9.1