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/java/com/zy/core/thread/NyShuttleThread.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 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());//鍒囨崲搴撲綅 + } + } + } } } -- Gitblit v1.9.1