From 0df6e7bb33c9f6a18f026a500776b00cbf2ae62c Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期二, 24 十二月 2024 09:48:06 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java | 71 ++++++++++++++++++++++------------- 1 files changed, 44 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java index 9278e36..4e60dab 100644 --- a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java +++ b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java @@ -244,6 +244,21 @@ */ private Integer yCurrent = 0; + /** + * 鎸囦护涓嬪彂鏃堕棿 + */ + private Long sendTime = 0L; + + /** + * 鏃ュ織閲囬泦鏃堕棿 + */ + private Long deviceDataLog = System.currentTimeMillis(); + + /** + * 鏈�杩戜竴娆″湪绾挎椂闂� + */ + private Long lastOnlineTime = System.currentTimeMillis(); + //鎬婚噷绋嬫暟 @Data public static class StatusSumClass { @@ -484,21 +499,22 @@ && this.taskNo == 0 && this.protocolStatus == ShuttleProtocolStatusType.IDLE.id ; - if (!res) { - return res; - } else { - // 鐢甸噺 - try { - Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); - if (chargeLine == null) { - return false; - } - return this.getPowerPercent() >= chargeLine; - } catch (Exception e) { - News.error("fail", e); - return false; - } - } + return res; +// if (!res) { +// return res; +// } else { +// // 鐢甸噺 +// try { +// Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); +// if (chargeLine == null) { +// return false; +// } +// return this.getPowerPercent() >= chargeLine; +// } catch (Exception e) { +// News.error("fail", e); +// return false; +// } +// } } // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�侊紝浼犲叆鐨則askNo鍜屽綋鍓峵askNo鐩稿悓鏃跺厑璁告斁琛� @@ -509,18 +525,19 @@ && (this.taskNo == 0 || this.taskNo == taskNo) && this.protocolStatus.intValue() == ShuttleProtocolStatusType.IDLE.id ; - if (!res) { - return res; - } else { - // 鐢甸噺 - try { - Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); - return this.getPowerPercent() > chargeLine; - } catch (Exception e) { - News.error("fail", e); - return false; - } - } + return res; +// if (!res) { +// return res; +// } else { +// // 鐢甸噺 +// try { +// Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); +// return this.getPowerPercent() > chargeLine; +// } catch (Exception e) { +// News.error("fail", e); +// return false; +// } +// } } // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�� -- Gitblit v1.9.1