From f305e5244e059c5e43566412f69b180e2e790026 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 05 三月 2026 19:11:43 +0800
Subject: [PATCH] #双工位堆垛机任务下发控制优化

---
 src/main/java/com/zy/core/model/protocol/DualCrnProtocol.java |   68 +++++++++++++++++++++++++++------
 1 files changed, 55 insertions(+), 13 deletions(-)

diff --git a/src/main/java/com/zy/core/model/protocol/DualCrnProtocol.java b/src/main/java/com/zy/core/model/protocol/DualCrnProtocol.java
index e8b5eb6..11e4e41 100644
--- a/src/main/java/com/zy/core/model/protocol/DualCrnProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/DualCrnProtocol.java
@@ -1,9 +1,9 @@
 package com.zy.core.model.protocol;
 
-import com.zy.core.enums.DualCrnForkPosType;
-import com.zy.core.enums.DualCrnLiftPosType;
-import com.zy.core.enums.DualCrnModeType;
-import com.zy.core.enums.DualCrnStatusType;
+import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.zy.common.utils.RedisUtil;
+import com.zy.core.enums.*;
 
 import lombok.Data;
 
@@ -29,14 +29,24 @@
     public Integer alarm;
 
     /**
-     * 宸ヤ綅1浠诲姟鍙�
+     * WCS宸ヤ綅1浠诲姟鍙�
      */
     public Integer taskNo = 0;
 
     /**
-     * 宸ヤ綅2浠诲姟鍙�
+     * WCS宸ヤ綅2浠诲姟鍙�
      */
     public Integer taskNoTwo = 0;
+
+    /**
+     * 璁惧宸ヤ綅1浠诲姟鍙�
+     */
+    public Integer deviceTaskNo = 0;
+
+    /**
+     * 璁惧宸ヤ綅2浠诲姟鍙�
+     */
+    public Integer deviceTaskNoTwo = 0;
 
     /**
      * 宸ヤ綅1褰撳墠鐘舵��
@@ -146,6 +156,10 @@
 
     public Integer taskReceiveTwo;
 
+    public Integer taskSend;
+
+    public Integer taskSendTwo;
+
     private Integer temp1;
 
     private Integer temp2;
@@ -157,37 +171,37 @@
     /**
      * X琛岃蛋绾块�熷害m/min
      */
-    private Integer xSpeed;
+    private Double xSpeed;
 
     /**
      * Y琛岃蛋绾块�熷害m/min
      */
-    private Integer ySpeed;
+    private Double ySpeed;
 
     /**
      * Z琛岃蛋绾块�熷害m/min
      */
-    private Integer zSpeed;
+    private Double zSpeed;
 
     /**
      * 鍫嗗灈鏈虹疮璁¤蛋琛岃窛绂籯m
      */
-    public Integer xDistance;
+    public Double xDistance;
 
     /**
      * 鍫嗗灈鏈虹疮璁″崌闄嶈窛绂籯m
      */
-    public Integer yDistance;
+    public Double yDistance;
 
     /**
      * 鍫嗗灈鏈虹疮璁¤蛋琛屾椂闀縣
      */
-    public Integer xDuration;
+    public Double xDuration;
 
     /**
      * 鍫嗗灈鏈虹疮璁″崌闄嶆椂闀縣
      */
-    public Integer yDuration;
+    public Double yDuration;
 
     //璐х墿绫诲瀷
     private Integer goodsType;
@@ -292,4 +306,32 @@
         this.statusTwo = DualCrnStatusType.get(type).id;
     }
 
+    public Integer getTaskNo() {
+        RedisUtil redisUtil = null;
+        try {
+            redisUtil = SpringUtils.getBean(RedisUtil.class);
+        }catch (Exception e) {}
+        if (null != redisUtil) {
+            Object o = redisUtil.get(RedisKeyType.DUAL_CRN_STATION1_FLAG.key + this.crnNo);
+            if (!Cools.isEmpty(o)) {
+                this.taskNo = Integer.parseInt(String.valueOf(o));
+            }
+        }
+        return this.taskNo == null ? 0 : this.taskNo;
+    }
+
+    public Integer getTaskNoTwo() {
+        RedisUtil redisUtil = null;
+        try {
+            redisUtil = SpringUtils.getBean(RedisUtil.class);
+        }catch (Exception e) {}
+        if (null != redisUtil) {
+            Object o = redisUtil.get(RedisKeyType.DUAL_CRN_STATION2_FLAG.key + this.crnNo);
+            if (!Cools.isEmpty(o)) {
+                this.taskNoTwo = Integer.parseInt(String.valueOf(o));
+            }
+        }
+        return this.taskNoTwo == null ? 0 : this.taskNoTwo;
+    }
+
 }

--
Gitblit v1.9.1