From fdbbac3e711e6be54513cca6fa4ec3a17d293f49 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 10 四月 2023 14:13:59 +0800
Subject: [PATCH] 四向穿梭车充电逻辑

---
 src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java |  188 ++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 168 insertions(+), 20 deletions(-)

diff --git a/src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java b/src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java
index 70e3c4a..99302f5 100644
--- a/src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java
+++ b/src/main/java/com/zy/asrs/domain/vo/ShuttleStateTableVo.java
@@ -1,5 +1,10 @@
 package com.zy.asrs.domain.vo;
 
+import com.core.common.SpringUtils;
+import com.zy.asrs.entity.BasShuttleErr;
+import com.zy.asrs.service.BasShuttleErrService;
+import com.zy.core.enums.ShuttleErrorCodeType;
+import com.zy.core.enums.ShuttleStatusType;
 import lombok.Data;
 
 @Data
@@ -11,34 +16,44 @@
     // 鐘舵��
     private String status = "-";
 
-    // 鏈夌墿
-    private String loading = "-";
+    //鍥涘悜绌挎杞﹀繖瑁呭~
+    private String busyStatus = "-";
+
+    /**
+     * 灏忚溅蹇欑姸鎬佷綅鏋氫妇
+     */
+    private ShuttleStatusType busyStatusType;
 
     /**
      * 浠诲姟鍙�
      */
     public Integer taskNo;
 
-    // 姝e湪鎵ц浠诲姟
-    private String execute;
+    /**
+     * 褰撳墠浜岀淮鐮�
+     * 0涓虹┖
+     */
+    private Short currentCode;
 
-    // 浠诲姟瀹屾垚锛岀瓑寰匴CS纭
-    private String waiting;
+    /**
+     * 褰撳墠搴撲綅鍙�
+     */
+    private String locNo;
 
-    // 鎺�
-    private Short row;
+    /**
+     * 搴撲綅鍙�-X
+     */
+    private int locNoX;
 
-    // 鍒�
-    private Short bay;
+    /**
+     * 搴撲綅鍙�-Y
+     */
+    private int locNoY;
 
-    // 灞�
-    private Short lev;
-
-    // 寮傚父鐮�1
-    private String alarm1 = "-";
-
-    // 寮傚父鐮�2
-    private String alarm2 = "-";
+    /**
+     * 褰撳墠搴撲綅灞傞珮
+     */
+    private int locNoLev;
 
     /**
      * 鐢垫睜鐢甸噺
@@ -46,9 +61,99 @@
     public String batteryPower = "-";
 
     /**
-     * 褰撳墠閫熷害
+     * 鐢垫睜娓╁害
      */
-    public Double speed;
+    public String batteryTemp = "-";
+
+    /**
+     * 閿欒缂栧彿
+     */
+    private String errorCode;
+
+    /**
+     * Plc杈撳嚭鐘舵�両O
+     */
+    private Short plcOutputStatusIO;
+
+    /**
+     * Plc杈撳嚭鐘舵�両O-椤跺崌浣�
+     */
+    private Boolean plcOutputLift;
+
+    /**
+     * Plc杈撳嚭鐘舵�両O-鎹㈠悜浣�
+     */
+    private Boolean plcOutputTransfer;
+
+    /**
+     * Plc杈撳嚭鐘舵�両O-鎶遍椄浣�
+     */
+    private Boolean plcOutputBrake;
+
+    /**
+     * Plc杈撳嚭鐘舵�両O-鍏呯數浣�
+     */
+    private Boolean plcOutputCharge;
+
+    /**
+     * 閿欒淇℃伅鐮�
+     */
+    private String statusErrorCode;
+
+    /**
+     * 閿欒淇℃伅鐮佹灇涓�
+     */
+    private ShuttleErrorCodeType errorCodeType;
+
+    /**
+     * PLC杈撳叆鐘舵��
+     */
+    private Short plcInputStatus;
+
+    /**
+     * 褰撳墠鎴栬�呬箣鍓嶈鍒扮殑浜岀淮鐮佸��
+     */
+    private Short currentOrBeforeCode;
+
+    /**
+     * 璇诲埌鐨勪簩缁寸爜X鏂瑰悜鍋忕Щ閲�
+     */
+    private Short codeOffsetX;
+
+    /**
+     * 璇诲埌鐨勪簩缁寸爜Y鏂瑰悜鍋忕Щ閲�
+     */
+    private Short codeOffsetY;
+
+    /**
+     * 褰撳墠鐨勭數鍘嬪��
+     */
+    private Double currentVoltage;
+
+    /**
+     * 褰撳墠鐨勬ā鎷熼噺鍊�
+     */
+    private Short currentAnalogValue;
+
+    /**
+     * 褰撳墠鐨勫崌闄嶄己鏈嶉�熷害
+     */
+    private Short currentLiftServoSpeed;
+
+    /**
+     * 褰撳墠鐨勮璧颁己鏈嶉�熷害
+     */
+    private Short currentMoveServoSpeed;
+
+    /**
+     * 褰撳墠鐨勫崌闄嶄己鏈嶈礋杞界巼
+     */
+    private Short currentLiftServoLoad;
+
+    /**
+     * 褰撳墠鐨勮璧颁己鏈嶈礋杞界巼
+     */
+    private Short currentMoveServoLoad;
 
     /**
      * 鍏呯數鐘舵��
@@ -60,4 +165,47 @@
      */
     public String loca = "-";
 
+    public String getErrorCode$() {
+        if(this.errorCodeType == null) return null;
+        return this.errorCodeType.desc;
+    }
+
+    public void setErrorCode(Short errorCode) {
+        this.errorCode = ShuttleErrorCodeType.get(errorCode.intValue()).desc;
+        this.errorCodeType = ShuttleErrorCodeType.get(errorCode.intValue());
+    }
+
+    public void setErrorCode(ShuttleErrorCodeType type) {
+        this.errorCode = type.desc;
+        this.errorCodeType = type;
+    }
+
+    public String getPlcOutputLift$() {
+        if (this.plcOutputLift == null) {
+            return null;
+        }
+        return this.plcOutputLift ? "Y" : "N";
+    }
+
+    public String getPlcOutputTransfer$() {
+        if (this.plcOutputTransfer == null) {
+            return null;
+        }
+        return this.plcOutputTransfer ? "Y" : "N";
+    }
+
+    public String getPlcOutputBrake$() {
+        if (this.plcOutputBrake == null) {
+            return null;
+        }
+        return this.plcOutputBrake ? "Y" : "N";
+    }
+
+    public String getPlcOutputCharge$() {
+        if (this.plcOutputCharge == null) {
+            return null;
+        }
+        return this.plcOutputCharge ? "Y" : "N";
+    }
+
 }

--
Gitblit v1.9.1