From f09b972bb7adf8d4fd75fcb87c85973e493432a8 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期二, 30 四月 2024 11:14:20 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java index 096c96d..1233ccd 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java @@ -406,8 +406,8 @@ @Override public boolean reset(ShuttleCommand command) { - this.shuttleProtocol.setTaskNo(0); - this.shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE); + setSyncTaskNo(0); + setProtocolStatus(ShuttleProtocolStatusType.IDLE); return true; } @@ -419,10 +419,12 @@ @Override public boolean isIdle(ExecuteSupport support) { if (null != support) { - if (!support.judgement()) { - return false; + Boolean judgement = support.judgement(); + if (judgement != null && !judgement) { + return true; } } + if (this.shuttleProtocol.getDeviceStatus() == null || this.shuttleProtocol.getPakMk() == null || this.shuttleProtocol.getErrorCode() == null @@ -439,14 +441,27 @@ && this.shuttleProtocol.getMode() == 1 && this.shuttleProtocol.getPakMk() && this.shuttleProtocol.getErrorCode().equals("0") - && (this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.IDLE.id || this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.WAITING.id) - && extend.getSuspendState() == 0 - ; + && (this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.IDLE.id + || this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.WAITING.id + || this.shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.CHARGING_WAITING.id) + && extend.getSuspendState() == 0; return res; } @Override public boolean isDeviceIdle() { + return isDeviceIdle(null); + } + + @Override + public boolean isDeviceIdle(ExecuteSupport support) { + if (null != support) { + Boolean judgement = support.judgement(); + if (judgement != null && !judgement) { + return true; + } + } + if (this.shuttleProtocol.getDeviceStatus() == null || this.shuttleProtocol.getPakMk() == null || this.shuttleProtocol.getErrorCode() == null -- Gitblit v1.9.1