From aac4bc5bdfd808fa7d33ee04924741a4c03944fc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 19 九月 2023 11:18:53 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java |   37 +++++++++++++++++++++++++++++++------
 1 files changed, 31 insertions(+), 6 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 c6d3533..b0661ba 100644
--- a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
@@ -3,18 +3,17 @@
 import com.alibaba.fastjson.JSON;
 import com.core.common.SpringUtils;
 import com.zy.asrs.entity.BasShuttle;
+import com.zy.asrs.entity.BasShuttleErr;
+import com.zy.asrs.service.BasShuttleErrService;
 import com.zy.asrs.service.BasShuttleService;
 import com.zy.asrs.utils.Utils;
 import com.zy.common.utils.NavigatePositionConvert;
 import com.zy.core.News;
-import com.zy.core.enums.ShuttleErrorCodeType;
 import com.zy.core.enums.ShuttleProtocolStatusType;
 import com.zy.core.enums.ShuttleStatusType;
 import com.zy.core.model.command.ShuttleAssignCommand;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-
-import java.util.List;
 
 /**
  * 鐗涚溂鍥涘悜绌挎杞�
@@ -186,7 +185,7 @@
     /**
      * 鏁呴殰鐮�
      */
-    private List<Integer> errCode;
+    private Integer errCode;
 
     /**
      * mileage鎬婚噷绋嬫暟(绫�)锛宭iftNumber椤跺崌鎬绘暟dropNumber涓嬮檷鎬绘暟reversingX鎹鎬绘暟reversingY鎹鎬绘暟
@@ -235,7 +234,14 @@
         if (this.getFree() == null) {
             return "";
         }
-        return this.getFree() == 1 ? "绌洪棽" : "杩愯涓�";
+        return this.getFree() == 0 ? "杩愯涓�" : "绌洪棽";
+    }
+
+    public String getWorkingMode$() {
+        if (this.getWorkingMode() == null) {
+            return "";
+        }
+        return this.getWorkingMode() == 0 ? "鎵嬪姩" : "鑷姩";
     }
 
     public String getLoadState$() {
@@ -264,7 +270,7 @@
             return "";
         }
 
-        switch (this.getRunDir()) {
+        switch (this.getLiftPosition()) {
             case 0:
                 return "鏈煡";
             case 1:
@@ -393,6 +399,13 @@
         return NavigatePositionConvert.nyXyzToLocNo(this.getPoint().getX(), this.getPoint().getY(), this.getPoint().getZ());
     }
 
+    public String getPoint$$() {
+        if (this.getPoint() == null) {
+            return "";
+        }
+        return JSON.toJSONString(this.getPoint());
+    }
+
     public String getCoord$() {
         if (this.getCoord() == null) {
             return "";
@@ -400,6 +413,18 @@
         return JSON.toJSONString(this.getCoord());
     }
 
+    public String getErrCode$() {
+        if (this.getErrCode() == null) {
+            return "";
+        }
+        BasShuttleErrService basShuttleErrService = SpringUtils.getBean(BasShuttleErrService.class);
+        BasShuttleErr basShuttleErr = basShuttleErrService.selectById(this.getErrCode());
+        if (basShuttleErr == null) {
+            return this.getErrCode().toString();
+        }
+        return basShuttleErr.getErrName();
+    }
+
     public void setPoint(NyShuttlePointClass point) {
         String locNo = NavigatePositionConvert.nyXyzToLocNo(point.getX(), point.getY(), point.getZ());
         this.point = point;

--
Gitblit v1.9.1