From bd0d3a69bc5a38c11af4aa7222806bacdea97318 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 13 十二月 2023 09:05:11 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java |  107 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 80 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 3744f61..ae9bea8 100644
--- a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
@@ -204,6 +204,51 @@
      */
     private Integer token = 0;
 
+    /**
+     * 璺戝簱鐘舵��
+     */
+    private Boolean moveLoc = false;
+
+    /**
+     * 璺戝簱绫诲瀷锛�0:璺戣建閬擄紝1锛氳窇搴撲綅
+     */
+    private Integer moveType = 0;
+
+    /**
+     * 璺戝簱X璧风偣
+     */
+    private Integer xStart = 0;
+
+    /**
+     * 璺戝簱X缁堢偣
+     */
+    private Integer xTarget = 0;
+
+    /**
+     * 璺戝簱X褰撳墠鐐逛綅
+     */
+    private Integer xCurrent = 0;
+
+    /**
+     * 璺戝簱Y璧风偣
+     */
+    private Integer yStart = 0;
+
+    /**
+     * 璺戝簱Y缁堢偣
+     */
+    private Integer yTarget = 0;
+
+    /**
+     * 璺戝簱Y褰撳墠鐐逛綅
+     */
+    private Integer yCurrent = 0;
+
+    /**
+     * 鎸囦护涓嬪彂鏃堕棿
+     */
+    private Long sendTime = 0L;
+
     //鎬婚噷绋嬫暟
     @Data
     public static class StatusSumClass {
@@ -444,21 +489,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鐩稿悓鏃跺厑璁告斁琛�
@@ -469,18 +515,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;
+//            }
+//        }
     }
 
     // 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
@@ -542,4 +589,10 @@
             }
         }
     }
+
+    public void setShuttleNo(Short shuttleNo) {
+        if (shuttleNo != 0) {
+            this.shuttleNo = shuttleNo;
+        }
+    }
 }

--
Gitblit v1.9.1