From a42ae1ffc20459dc46a88590bc4a94f9280f2d3d Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期五, 10 五月 2024 15:31:28 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 46 insertions(+), 2 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java index 920f2ff..24c4169 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java @@ -11,7 +11,7 @@ @Slf4j @Data -public class LiftProtocol { +public class LiftProtocol implements Cloneable { //**********************蹇呴』瀛樺湪灞炴��********************** /** @@ -125,6 +125,11 @@ private Boolean pakMk = false; /** + * 鎸囦护涓嬪彂鏃堕棿 + */ + private Long sendTime = 0L; + + /** * 鏃ュ織閲囬泦鏃堕棿 */ private Long deviceDataLog = System.currentTimeMillis(); @@ -133,6 +138,35 @@ * 璁惧淇℃伅 */ private Device device; + + /** + * 鎵╁睍瀛楁 + */ + private Object extend; + + public String getRun$() { + if (this.run == null) { + return "鏈煡"; + } + + return this.run ? "杩愯涓�" : "绌洪棽"; + } + + public String getReady$() { + if (this.ready == null) { + return "鏈煡"; + } + + return this.ready ? "灏辩华" : "鏈氨缁�"; + } + + public String getModel$() { + if (this.model == null) { + return "鏈煡"; + } + + return this.model ? "鑷姩" : "鎵嬪姩"; + } /** * 璁剧疆鎻愬崌鏈虹姸鎬� @@ -150,7 +184,7 @@ this.protocolStatusType = status; } - public void setTaskNo(Integer taskNo) { + public synchronized void setTaskNo(Integer taskNo) { RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); if (null != redisUtil) { redisUtil.set(DeviceRedisConstant.LIFT_FLAG + this.liftNo, taskNo); @@ -169,4 +203,14 @@ return this.taskNo == null ? 0 : this.taskNo; } + @Override + public LiftProtocol clone() { + try { + return (LiftProtocol) super.clone(); + } catch (CloneNotSupportedException e) { + e.printStackTrace(); + } + return null; + } + } -- Gitblit v1.9.1