From 9c9294d671e9dd65e848f583e519645ec9ce3e1d Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 23 十二月 2024 16:55:30 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java | 77 +++++++++++++++++++++++++-------------
1 files changed, 50 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 ac78e39..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;
+// }
+// }
}
// 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
@@ -582,4 +599,10 @@
}
}
}
+
+ public void setShuttleNo(Short shuttleNo) {
+ if (shuttleNo != 0) {
+ this.shuttleNo = shuttleNo;
+ }
+ }
}
--
Gitblit v1.9.1