From a8bb23b90b99f1898c2a0d0335115c69a6db761d Mon Sep 17 00:00:00 2001
From: zyh <zyh@123>
Date: 星期六, 24 一月 2026 08:33:19 +0800
Subject: [PATCH] 添加了联结器库特殊站点时调用AGV特殊模板,添加人员入侵系统检测到有人时急停AGV的接口,修复AGV工作档没有任务号的漏洞

---
 src/main/java/com/zy/asrs/controller/MesController.java |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/MesController.java b/src/main/java/com/zy/asrs/controller/MesController.java
index 92c13b4..a690371 100644
--- a/src/main/java/com/zy/asrs/controller/MesController.java
+++ b/src/main/java/com/zy/asrs/controller/MesController.java
@@ -13,6 +13,7 @@
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
 
 @RestController
 @Slf4j
@@ -50,7 +51,7 @@
         return mesReturn;
     }
 
-    // 鍑哄簱鐢宠锛堝彨鏂欙級锛岃閰嶅簱銆佹粦鍧楀簱
+//    // 鍑哄簱鍏ュ簱璁㈠崟鐢宠
     @PostMapping("/api/mes/callOutBoundOrder")
     public MesReturn callOutBoundOrder(@RequestBody MesCallOutApply param){
 
@@ -71,14 +72,12 @@
     // 鍏ョ珯鍏佽
     @PostMapping("/api/mes/allowInStation")
     public MesReturn allowInStation(@RequestBody TransInOutStationAllow param){
-
         return mesService.allowInStation(param);
     }
 
     // 绂荤珯鍏佽锛岃閰嶅簱銆佹粦鍧楀簱
     @PostMapping("/api/mes/allowOutStation")
     public MesReturn allowOutStation(@RequestBody TransInOutStationAllow param){
-
         return mesService.allowOutStation(param);
     }
 
@@ -120,4 +119,26 @@
         return mesService.queryInventory(itemno,orderNo);
     }
 
+    @PostMapping("/api/mes/pauseAGV")
+    public MesReturn AGVPause(@RequestBody JSONObject param) throws IOException {
+        MesReturn mesReturn = new MesReturn();
+        int AGVType;
+        if (param.containsKey("zoneCode")){
+            param.put("mapCode", "BB");
+            param.put("invoke", "FREEZE");
+            AGVType = 1;
+        }else {
+            AGVType = 2;
+        }
+        if (mesService.AGVPause(param, AGVType) == 1){
+            mesReturn.setSuccess("1");
+            mesReturn.setMessage("鎴愬姛");
+            return mesReturn;
+        }else {
+            mesReturn.setSuccess("2");
+            mesReturn.setMessage("澶辫触");
+            return mesReturn;
+        }
+    }
+
 }

--
Gitblit v1.9.1