From 63818e4689955ecd117cedba7c59d7147fcf88c8 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期五, 17 五月 2024 09:57:57 +0800
Subject: [PATCH] 检测当前站点入库任务是否已经走出储位204L

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

diff --git a/src/main/java/com/zy/asrs/controller/AgvMapController.java b/src/main/java/com/zy/asrs/controller/AgvMapController.java
index e7d8bb7..d5f4367 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMapController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMapController.java
@@ -68,6 +68,10 @@
             int x = bay;
             int y = row;
             //2妤�
+            if(floor == 1){
+                x = generateMap1Bay(bay);
+            }
+            //2妤�
             if(floor == 2){
                 y = generateMap2Row(row);
                 //y = generateMap2Bay(bay);
@@ -93,6 +97,18 @@
 
         return JSONObject.toJSONString(arrayLists);
     }
+    private Integer generateMap1Bay(int bay){
+        int y = bay;
+        Integer[] bayAdd = {1,3,5,7,9,11,13,15,17,19};
+        for(int i=0; i<bayAdd.length; i++){
+            if(bay > bayAdd[i]){
+                y ++;
+            }
+        }
+
+        return y;
+
+    }
 
     private Integer generateMap2Row(int row){
         int x = row;

--
Gitblit v1.9.1