From 00d2d5a6fbe30f011b34199606cfc7fa0465039e Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 12 一月 2025 16:17:42 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java |   97 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
index 003af3f..9f7b0bd 100644
--- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -12,6 +12,8 @@
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 
+import java.util.HashMap;
+
 /**
  * 鍥涘悜绌挎杞�
  */
@@ -51,7 +53,7 @@
     private String locNo;
 
     /**
-     * 灏忚溅璁惧鐘舵��
+     * 灏忚溅璁惧鐘舵��0:蹇欑 1:绌洪棽
      */
     private Integer deviceStatus;
 
@@ -108,6 +110,11 @@
      * 鐢垫睜鐢靛帇
      */
     private Integer batteryVoltage;
+
+    /**
+     * 杩愯閫熷害
+     */
+    private Integer speed;
 
 
     //**********************绯荤粺鑷韩鎵�闇�灞炴��**********************
@@ -175,6 +182,13 @@
      * 鎵╁睍瀛楁
      */
     private Object extend;
+
+    public String getProtocolStatus$() {
+        if (this.protocolStatusType == null) {
+            return "";
+        }
+        return this.protocolStatusType.desc;
+    }
 
     /**
      * 璁剧疆灏忚溅鐘舵��
@@ -247,4 +261,85 @@
         return basShuttleErr.getErrName();
     }
 
+    public String getMode$() {
+        if (this.mode == null) {
+            return "";
+        }
+        if (this.mode == 0) {
+            return "鎵嬪姩";
+        } else if (this.mode == 1) {
+            return "鑷姩";
+        }
+
+        return "";
+    }
+
+    public String getDeviceStatus$() {
+        if (this.deviceStatus == null) {
+            return "";
+        }
+        if (this.deviceStatus == 0) {
+            return "蹇欑";
+        } else if (this.deviceStatus == 1) {
+            return "绌洪棽";
+        }
+
+        return "";
+    }
+
+    public String getHasLift$() {
+        if (this.hasLift == null) {
+            return "";
+        }
+
+        return this.hasLift ? "Y" : "N";
+    }
+
+    public String getHasCharge$() {
+        if (this.hasCharge == null) {
+            return "";
+        }
+
+        return this.hasCharge ? "Y" : "N";
+    }
+
+    public String getHasPallet$() {
+        if (this.hasPallet == null) {
+            return "";
+        }
+
+        return this.hasPallet ? "Y" : "N";
+    }
+
+    public String getPakMk$() {
+        if (this.pakMk == null) {
+            return "";
+        }
+
+        return this.pakMk ? "Y" : "N";
+    }
+
+    public HashMap<String, Object> getPoint() {
+        HashMap<String, Object> map = new HashMap<>();
+        if (this.currentCode == null) {
+            return map;
+        }
+
+        LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
+        if (locMastService == null) {
+            return map;
+        }
+
+        //婧愬簱浣�(灏忚溅褰撳墠浣嶇疆)
+        LocMast currentLocMast = locMastService.queryByQrCode(this.currentCode);
+        if (currentLocMast == null) {
+            return map;
+        }
+
+        map.put("x", currentLocMast.getRow1());
+        map.put("y", currentLocMast.getBay1());
+        map.put("z", currentLocMast.getLev1());
+        return map;
+    }
+
 }

--
Gitblit v1.9.1