From efc2dfd36276053966c582691d2cdd19aeae24a6 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 26 一月 2024 19:58:11 +0800
Subject: [PATCH] #跑库程序

---
 src/main/webapp/views/shuttle2.html                   |    3 ++-
 src/main/java/com/zy/core/thread/NyShuttleThread.java |   24 +++++++++++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/NyShuttleThread.java b/src/main/java/com/zy/core/thread/NyShuttleThread.java
index 74450cf..d5f4ae2 100644
--- a/src/main/java/com/zy/core/thread/NyShuttleThread.java
+++ b/src/main/java/com/zy/core/thread/NyShuttleThread.java
@@ -830,7 +830,7 @@
                     shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
                 }
             }
-        } else if (shuttleProtocol.getMoveType() == 2) {//寰幆璺�
+        } else if (shuttleProtocol.getMoveType() == 2) {//姣嶈建閬撳惊鐜窇
             Integer xCurrent = shuttleProtocol.getXCurrent();
             Integer yCurrent = shuttleProtocol.getYCurrent();
 
@@ -852,6 +852,28 @@
                     }
                 }
             }
+        } else if (shuttleProtocol.getMoveType() == 3) {//瀛愯建閬撳惊鐜窇
+            Integer xCurrent = shuttleProtocol.getXCurrent();
+            Integer yCurrent = shuttleProtocol.getYCurrent();
+
+            String locNo = Utils.getLocNo(xCurrent, yCurrent, lev);
+            //璋冨害鍘荤洰鏍囦綅缃�
+            if (shuttleProtocol.getCurrentLocNo().equals(locNo)) {
+                if (xCurrent.equals(shuttleProtocol.getXStart())) {
+                    shuttleProtocol.setXCurrent(shuttleProtocol.getXTarget());//灏忚溅鍜岀洰鏍囦綅缃竴鑷达紝鍒囨崲搴撲綅
+                }else {
+                    shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());//灏忚溅鍜岀洰鏍囦綅缃竴鑷达紝鍒囨崲搴撲綅
+                }
+            } else {
+                boolean result = shuttleDispatchUtils.dispatchShuttle(commonService.getWorkNo(3), locNo);
+                if (result) {//璋冨害鎴愬姛
+                    if (xCurrent.equals(shuttleProtocol.getXStart())) {
+                        shuttleProtocol.setXCurrent(shuttleProtocol.getXTarget());//鍒囨崲搴撲綅
+                    }else {
+                        shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());//鍒囨崲搴撲綅
+                    }
+                }
+            }
         }
     }
 
diff --git a/src/main/webapp/views/shuttle2.html b/src/main/webapp/views/shuttle2.html
index 5cc923f..40adc13 100644
--- a/src/main/webapp/views/shuttle2.html
+++ b/src/main/webapp/views/shuttle2.html
@@ -167,7 +167,8 @@
                                         <div>
                                             <label><input type="radio" name="moveType" value="0">&nbsp;璺戣建閬�</label>
                                             <label><input type="radio" name="moveType" value="1">&nbsp;璺戝簱浣�</label>
-                                            <label><input type="radio" name="moveType" value="2">&nbsp;寰幆璺�</label>
+                                            <label><input type="radio" name="moveType" value="2">&nbsp;姣嶈建閬撳惊鐜窇</label>
+                                            <label><input type="radio" name="moveType" value="3">&nbsp;瀛愯建閬撳惊鐜窇</label>
                                         </div>
                                         <div style="margin-top: 10px;">
                                             <button class="item" onclick="moveLoc()">璺戝簱</button>

--
Gitblit v1.9.1