From ce641926a957d238b202aa0d9dac3b8f15aff153 Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期三, 14 五月 2025 14:43:00 +0800
Subject: [PATCH] 123

---
 src/main/java/com/zy/core/model/protocol/CrnProtocol.java |  333 +++++++++++++++++++------------------------------------
 1 files changed, 115 insertions(+), 218 deletions(-)

diff --git a/src/main/java/com/zy/core/model/protocol/CrnProtocol.java b/src/main/java/com/zy/core/model/protocol/CrnProtocol.java
index 761a91a..ec27ebb 100644
--- a/src/main/java/com/zy/core/model/protocol/CrnProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/CrnProtocol.java
@@ -1,7 +1,10 @@
 package com.zy.core.model.protocol;
 
 import com.zy.asrs.entity.BasCrnp;
-import com.zy.core.enums.*;
+import com.zy.core.enums.CrnForkPosType;
+import com.zy.core.enums.CrnLiftPosType;
+import com.zy.core.enums.CrnModeType;
+import com.zy.core.enums.CrnStatusType;
 import lombok.Data;
 
 /**
@@ -9,6 +12,8 @@
  */
 @Data
 public class CrnProtocol {
+
+    private Integer crnNo;
 
     /**
      * 1 = 鎵嬪姩妯″紡
@@ -20,24 +25,24 @@
     public CrnModeType modeType;
 
     /**
-     * 鍫嗗灈鏈轰换鍔″畬鎴�
-     */
-    public Short taskFinish;
-
-    /**
-     * 鏍¢獙缁撴灉 1琛ㄧず妫�楠屾垚鍔�
-     */
-    public Short valid;
-
-    /**
      * 1 = 鎬ュ仠
      */
     public Short eStop;
 
     /**
+     * 寮傚父鐮�
+     */
+    public Short alarm;
+
+    /**
      * 浠诲姟鍙�
      */
     public Short taskNo = 0;
+
+    /**
+     * 浠诲姟鍙�
+     */
+    public Short taskNoTwo = 0;
 
     /**
      * 鍫嗗灈鏈哄綋鍓嶇姸鎬�
@@ -53,11 +58,16 @@
      * 99锛氭姤璀�
      */
     public Short status;
-
+    public Short statusTwo;
     /**
      * 鐘舵�佹灇涓�
      */
     public CrnStatusType statusType;
+
+    /**
+     * 鐘舵�佹灇涓�
+     */
+    public CrnStatusType statusTypeTwo;
 
     /**
      * 鍫嗗灈鏈哄綋鍓嶅垪鍙�
@@ -65,119 +75,18 @@
     public Short bay;
 
     /**
+     * 鍫嗗灈鏈哄綋鍓嶅垪鍙�
+     */
+    public Short bayTwo;
+
+    /**
      * 鍫嗗灈鏈哄綋鍓嶅眰鍙�
      */
     public Short level;
-
     /**
-     * 鍫嗗灈鏈哄綋鍓嶆帓
+     * 鍫嗗灈鏈哄綋鍓嶅眰鍙�
      */
-    public Short row;
-
-    /**
-     * 鍫嗗灈鏈哄綋鍓嶅贩閬撳彿
-     */
-    public Short lane;
-
-    /**
-     * 鍫嗗灈鏈洪�氳鐘舵��
-     */
-    public Boolean connStatus;
-
-    /**
-     * 鐢宠鍏ュ簱淇
-     */
-    public Boolean correction;
-
-    /**
-     * 鎵樼洏鍙烽敊
-     */
-    public Boolean tuError;
-
-    /**
-     * 鍙栬揣鏃犵
-     */
-    public Boolean noneError;
-
-    /**
-     * 鍙岄噸鍏ュ簱
-     */
-    public Boolean stockError;
-
-    /**
-     * 浣滀笟鏁版嵁鏃犳晥
-     */
-    public Boolean jobInvalid;
-
-    /**
-     * 绌洪棽鐘舵��
-     */
-    public Boolean idle;
-
-    /**
-     * 鎺у埗鏌滀娇鑳�
-     */
-    public Boolean control;
-
-    /**
-     * 鍋滃噯
-     */
-    public Boolean stopQuasi;
-
-    /**
-     * 杩愯
-     */
-    public Boolean running;
-
-    /**
-     * 鏁呴殰
-     */
-    public Boolean fault;
-
-    /**
-     * 璐у弶涓綅
-     */
-    public Boolean forkHome;
-    /**
-     * 鍗曚几浣嶈揣鍙夊乏浣�
-     */
-    public Boolean forkSingleLeft;
-    /**
-     * 鍗曚几浣嶈揣鍙夊彸浣�
-     */
-    public Boolean forkSingleRight;
-    /**
-     * 鍙屼几浣嶈揣鍙夊乏浣�
-     */
-    public Boolean forkDoubleLeft;
-    /**
-     * 鍙屼几浣嶈揣鍙夊彸浣�
-     */
-    public Boolean forkDoubleRight;
-    /**
-     * 鍗曚几浣嶉珮浣�
-     */
-    public Boolean singleHigh;
-    /**
-     * 鍗曚几浣嶄綆浣�
-     */
-    public Boolean singleLow;
-    /**
-     * 鍙屼几浣嶉珮浣�
-     */
-    public Boolean doubleHigh;
-    /**
-     * 鍙屼几浣嶄綆浣�
-     */
-    public Boolean doubleLow;
-    /**
-     * 绔欏彴楂樹綅
-     */
-    public Boolean platformHigh;
-    /**
-     * 绔欏彴浣庝綅
-     */
-    public Boolean platformLow;
+    public Short levelTwo;
 
     /**
      * 褰撳墠璐у弶浣嶇疆
@@ -186,6 +95,8 @@
      * 2 = 璐у弶鍦ㄥ彸渚�
      */
     public Short forkPos;
+
+    public Short forkPosTwo;
 
     public CrnForkPosType forkPosType;
 
@@ -196,6 +107,8 @@
      */
     public Short liftPos;
 
+    public Short liftPosTwo;
+
     public CrnLiftPosType liftPosType;
 
     /**
@@ -204,41 +117,31 @@
      * 1 = 涓嶅湪瀹氫綅
      */
     public Short walkPos;
-
     /**
-     * 鎷ㄦ寚浣嶇疆
-     * 0 = 涓嶅湪瀹氫綅
-     * 1 = 涓婂畾浣�
-     * 2 = 涓嬪畾浣�
+     * 璧拌鍦ㄥ畾浣�
+     * 0 = 鍦ㄥ畾浣�
+     * 1 = 涓嶅湪瀹氫綅
      */
-    public Short fingerPos;
-
-    public CrnFingerPosType fingerPosType;
+    public Short walkPosTwo;
 
     /**
      * 杞借揣鍙版湁鐗�
      */
     public Short loaded;
-
     /**
-     * 鍫嗗灈鏈哄瀭鐩存晠闅滀唬鐮侊紙鏁板�兼樉绀猴級
+     * 杞借揣鍙版湁鐗�
      */
-    private Integer alarm1;
+    public Short loadedTwo;
 
-    /**
-     * 鍫嗗灈鏈烘按骞虫晠闅滀唬鐮侊紙鏁板�兼樉绀猴級
-     */
-    private Integer alarm2;
+    private Short temp1;
 
-    /**
-     * 鍫嗗灈鏈鸿揣鍙夋晠闅滀唬鐮侊紙鏁板�兼樉绀猴級
-     */
-    private Integer alarm3;
+    private CrnTemp1 crnTemp1;
 
-    /**
-     * 鍫嗗灈鏈虹姸鎬佹晠闅滀唬鐮侊紙鏁板�兼樉绀猴級
-     */
-    private Integer alarm4;
+    private Short temp2;
+
+    private Short temp3;
+
+    private Short temp4;
 
     /**
      * 寮傚父1
@@ -269,6 +172,20 @@
     private CrnError4 crnError4;
 
     /**
+     * 寮傚父5
+     */
+    private boolean[] error5;
+
+    private CrnError5 crnError5;
+
+    /**
+     * 寮傚父6
+     */
+    private boolean[] error6;
+
+    private CrnError6 crnError6;
+
+    /**
      * X琛岃蛋绾块�熷害m/min
      */
     private Float xSpeed;
@@ -282,6 +199,10 @@
      * Z琛岃蛋绾块�熷害m/min
      */
     private Float zSpeed;
+    /**
+     * Z琛岃蛋绾块�熷害m/min
+     */
+    private Float zSpeedTwo;
 
     /**
      * 鍫嗗灈鏈虹疮璁¤蛋琛岃窛绂籯m
@@ -333,104 +254,80 @@
         this.liftPos = CrnLiftPosType.get(type).id.shortValue();
     }
 
-    public void setStatus(Short status){
+    public void setStatus(Short status) {
         this.status = status;
         this.statusType = CrnStatusType.get(status);
     }
 
-    public void setStatus(CrnStatusType type){
+    public void setStatus(CrnStatusType type) {
         this.statusType = type;
         this.status = CrnStatusType.get(type).id.shortValue();
     }
 
-    public void setFingerPos(Short type) {
-        this.fingerPos = type;
-        this.fingerPosType = CrnFingerPosType.get(type);
+    public void setStatusTwo(Short status) {
+        this.statusTwo = status;
+        this.statusTypeTwo = CrnStatusType.get(status);
     }
 
-    public void setError1(boolean[] error1){
-        this.error1 = error1;
-        this.crnError1 = new CrnError1();
-        this.crnError1.remoteStop = error1[0];
-        this.crnError1.mainStop = error1[1];
-        this.crnError1.controlStop = error1[2];
-        this.crnError1.xCoverErr = error1[3];
-        this.crnError1.yCoverErr = error1[4];
-        this.crnError1.zCoverErr = error1[5];
-        this.crnError1.laserErr = error1[6];
-        this.crnError1.barcodeErr = error1[7];
-        this.crnError1.xFrontLimitErr = error1[8];
-        this.crnError1.xBackLimitErr = error1[9];
-        this.crnError1.yUpLimitErr = error1[10];
-        this.crnError1.yDownLimitErr = error1[11];
-        this.crnError1.zLeftLimitErr = error1[12];
-        this.crnError1.zRightLimitErr = error1[13];
-        this.crnError1.leftOverWidthErr1 = error1[14];
-        this.crnError1.leftOverWidthErr2 = error1[15];
+    public void setStatusTwo(CrnStatusType type) {
+        this.statusTypeTwo = type;
+        this.statusTwo = CrnStatusType.get(type).id.shortValue();
     }
 
-    public void setError2(boolean[] error2){
-        this.error2 = error2;
-        this.crnError2 = new CrnError2();
-        this.crnError2.leftOverLenErr1 = error2[0];
-        this.crnError2.leftOverLenErr2 = error2[1];
-        this.crnError2.leftOverHighErr = error2[2];
-        this.crnError2.rightOverWidthErr1 = error2[3];
-        this.crnError2.rightOverWidthErr2 = error2[4];
-        this.crnError2.rightOverLenErr1 = error2[5];
-        this.crnError2.rightOverLenErr2 = error2[6];
-        this.crnError2.rightOverHighErr = error2[7];
-        this.crnError2.leftLooseRopeErr = error2[8];
-        this.crnError2.rightLooseRopeErr = error2[9];
-        this.crnError2.frontDoorErr = error2[10];
-        this.crnError2.backDoorErr = error2[11];
-        this.crnError2.startupErr = error2[12];
-        this.crnError2.xFrontLocaUpErr = error2[13];
-        this.crnError2.xFrontLocaDownErr = error2[14];
-        this.crnError2.xBackLocaUpErr = error2[15];
+    public Short getTemp1() {
+        return temp1;
     }
 
-    public void setError3(boolean[] error3) {
-        this.error3 = error3;
-        this.crnError3 = new CrnError3();
-        this.crnError3.xBackLocaDownErr = error3[0];
-        this.crnError3.yUpLocaUpErr = error3[1];
-        this.crnError3.yUpLocaDownErr = error3[2];
-        this.crnError3.yDownLocaUpErr = error3[3];
-        this.crnError3.yDownLocaDownErr = error3[4];
-        this.crnError3.zLeftLocaUpErr = error3[5];
-        this.crnError3.zLeftLocaDownErr = error3[6];
-        this.crnError3.zRightLocaUpErr = error3[7];
-        this.crnError3.zRightLocaDownErr = error3[8];
-        this.crnError3.leftTakeNoneErr = error3[9];
-        this.crnError3.rightTakeNoneErr = error3[10];
-        this.crnError3.leftTakeThenLoadErr = error3[11];
-        this.crnError3.rightTakeThenLoadErr = error3[12];
-        this.crnError3.leftPutAndLoadErr = error3[13];
-        this.crnError3.rightPutAndLoadErr = error3[14];
-        this.crnError3.leftPutThenNoneErr = error3[15];
-    }
-
-    public void setError4(boolean[] error4) {
-        this.error4 = error4;
-        this.crnError4 = new CrnError4();
-        this.crnError4.rightPutThenNoneErr = error4[0];
-        this.crnError4.xLooseBrakeTimeout = error4[1];
-        this.crnError4.yLooseBrakeTimeout = error4[2];
-        this.crnError4.zLooseBrakeTimeout = error4[3];
+    public void setTemp1(Short temp1) {
+        this.temp1 = temp1;
     }
 
     /**
      * 鏈�杩戜竴娆″叆鍑哄簱绫诲瀷
-     *       I:鍏ュ簱
-     *       O:鍑哄簱
+     * I:鍏ュ簱
+     * O:鍑哄簱
      */
     private String lastIo = "I";
 
 
-    public BasCrnp toSqlModel(BasCrnp basCrnp){
-        basCrnp.setCrnErr(alarm1.longValue());
+    public BasCrnp toSqlModel(BasCrnp basCrnp) {
+        if (alarm != null) {
+            basCrnp.setCrnErr(alarm.longValue());
+        }
         basCrnp.setWrkNo(taskNo.intValue());
         return basCrnp;
     }
+
+    public void setxSpeed(Short xSpeed) {
+        this.xSpeed = Float.valueOf(xSpeed);
+    }
+
+    public void setySpeed(Short ySpeed) {
+        this.ySpeed = Float.valueOf(ySpeed);
+    }
+
+    public void setzSpeed(Short zSpeed) {
+        this.zSpeed = Float.valueOf(zSpeed);
+    }
+
+    public void setzSpeedTwo(Short zSpeedTwo) {
+        this.zSpeedTwo = Float.valueOf(zSpeedTwo);
+    }
+
+    public void setxDistance(Short xDistance) {
+        this.xDistance = Float.valueOf(xDistance);
+    }
+
+    public void setyDistance(Short yDistance) {
+        this.yDistance = Float.valueOf(yDistance);
+    }
+
+    public void setxDuration(Short xDuration) {
+        this.xDuration = Float.valueOf(xDuration);
+    }
+
+    public void setyDuration(Short yDuration) {
+        this.yDuration = Float.valueOf(yDuration);
+    }
+
 }

--
Gitblit v1.9.1