From a1d108d95ac087c16557a11c58098cf76d967cb2 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期六, 13 四月 2024 10:36:10 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java | 61 +++++++++--------------------- 1 files changed, 19 insertions(+), 42 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java index ad5496b..c3d506c 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java @@ -29,7 +29,7 @@ /** * 鍥涘悜绌挎杞﹀彿 */ - private String shuttleNo; + private Integer shuttleNo; /** * 浠诲姟鍙� @@ -89,6 +89,11 @@ * 鏄惁椤跺崌 */ private Boolean hasLift; + + /** + * 鏄惁鏈夋墭鐩� + */ + private Boolean hasPallet; /** * 琛岄┒鏂瑰悜 @@ -163,6 +168,11 @@ private Device device; /** + * 鎵╁睍瀛楁 + */ + private Object extend; + + /** * 璁剧疆灏忚溅鐘舵�� */ public void setProtocolStatus(Integer status) { @@ -197,28 +207,6 @@ return ""; } - /** - * 鑾峰彇灏忚溅绌洪棽鐘舵�� - */ - public Boolean getIdle() { - if (this.deviceStatus == null) { - return false; - } - - ShuttleDeviceStatusService shuttleDeviceStatusService = SpringUtils.getBean(ShuttleDeviceStatusService.class); - ShuttleDeviceStatus status = shuttleDeviceStatusService.getOne(new LambdaQueryWrapper<ShuttleDeviceStatus>() - .eq(ShuttleDeviceStatus::getHostId, this.device.getHostId()) - .eq(ShuttleDeviceStatus::getDevicePlc, this.device.getDevicePlc()) - .eq(ShuttleDeviceStatus::getStatus, 1) - .eq(ShuttleDeviceStatus::getDeviceStatus, this.deviceStatus)); - if (status != null) { - if (status.getFlag() != null && status.getFlag().equals(String.valueOf(ShuttleDeviceStatusType.IDLE))) { - return true;//绌洪棽涓� - } - } - return false;//榛樿涓嶇┖闂� - } - public Integer getTaskNo() { RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); if (null != redisUtil) { @@ -228,6 +216,14 @@ } } return this.taskNo == null ? 0 : this.taskNo; + } + + public void setTaskNo(Integer taskNo) { + RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); + if (null != redisUtil) { + redisUtil.set(DeviceRedisConstant.SHUTTLE_FLAG + this.shuttleNo, taskNo); + this.taskNo = taskNo; + } } //閫氳繃褰撳墠浜岀淮鐮佽幏鍙栧綋鍓嶅簱浣嶅彿 @@ -250,25 +246,6 @@ } return currentLoc.getLocNo(); - } - - // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�� - public Boolean isIdle() { - if (this.deviceStatus == null - || this.pakMk == null - || this.errorCode == null - || this.protocolStatus == null - ) { - return false; - } - - boolean res = this.deviceStatus.equals(ShuttleDeviceStatusType.IDLE) - && this.pakMk - && !this.errorCode.equals("0") - && this.getTaskNo() == 0 - && this.protocolStatus.intValue() == ShuttleProtocolStatusType.IDLE.id - ; - return res; } } -- Gitblit v1.9.1