From ff1be9fa2dba6eaffc449d09e62998348ea3b830 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 19 九月 2023 08:00:36 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java | 48 ++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 40 insertions(+), 8 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 cabfb2d..8d62e39 100644
--- a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
@@ -4,6 +4,7 @@
import com.core.common.SpringUtils;
import com.zy.asrs.entity.BasShuttle;
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;
@@ -65,7 +66,7 @@
/**
* 浣滀笟鏍囪
*/
- private Boolean pakMk = true;
+ private Boolean pakMk = false;
/**
* 鎵嬪姩鐘舵��/鑷姩鐘舵��
@@ -163,6 +164,11 @@
private NyShuttlePointClass coord;
/**
+ * WCS搴撲綅xyz
+ */
+ private NyShuttlePointClass wcsPoint;
+
+ /**
* 浠诲姟鐩殑搴撲綅xyztaskId(姝e湪鍔ㄤ綔鐨勪换鍔D)lastTaskId(鏈�鍚庝竴涓畬鎴愮殑浠诲姟ID)recentTaskId(鏀跺埌鐨勬渶鍚庝竴涓换鍔D)
*/
private TaskClass task;
@@ -180,7 +186,7 @@
/**
* 鏁呴殰鐮�
*/
- private List<Integer> errCode;
+ private Integer errCode;
/**
* mileage鎬婚噷绋嬫暟(绫�)锛宭iftNumber椤跺崌鎬绘暟dropNumber涓嬮檷鎬绘暟reversingX鎹鎬绘暟reversingY鎹鎬绘暟
@@ -191,6 +197,13 @@
* 闈炶嚜鍔ㄧ姸鎬佹椂闂磋鏃�(S)
*/
private Integer errTime;
+
+ /**
+ * 鐙崰浠ょ墝
+ * 鏈浠诲姟鍗犳嵁锛屼护鐗屼负0
+ * 琚换鍔″崰鎹紝灏嗕换鍔″彿璧嬪�肩粰浠ょ墝
+ */
+ private Integer token = 0;
//鎬婚噷绋嬫暟
@Data
@@ -222,7 +235,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$() {
@@ -251,7 +271,7 @@
return "";
}
- switch (this.getRunDir()) {
+ switch (this.getLiftPosition()) {
case 0:
return "鏈煡";
case 1:
@@ -380,6 +400,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 "";
@@ -391,12 +418,17 @@
String locNo = NavigatePositionConvert.nyXyzToLocNo(point.getX(), point.getY(), point.getZ());
this.point = point;
this.currentLocNo = locNo;
+ NyShuttlePointClass wcsPoint = new NyShuttlePointClass();
+ wcsPoint.setX(Utils.getRow(locNo));
+ wcsPoint.setY(Utils.getBay(locNo));
+ wcsPoint.setZ(Utils.getLev(locNo));
+ this.wcsPoint = wcsPoint;
}
// 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
public Boolean isIdle() {
boolean res = this.free == ShuttleStatusType.IDLE.id
- && this.pakMk.equals(true)
+ && !this.pakMk
&& this.errState == 0
&& this.taskNo == 0
&& this.protocolStatus == ShuttleProtocolStatusType.IDLE.id
@@ -421,7 +453,7 @@
// 鏄惁澶勪簬绌洪棽寰呭懡鐘舵�侊紝浼犲叆鐨則askNo鍜屽綋鍓峵askNo鐩稿悓鏃跺厑璁告斁琛�
public Boolean isIdle(int taskNo) {
boolean res = this.free == ShuttleStatusType.IDLE.id
- && this.pakMk.equals(true)
+ && !this.pakMk
&& this.errState == 0
&& (this.taskNo == 0 || this.taskNo == taskNo)
&& this.protocolStatus.intValue() == ShuttleProtocolStatusType.IDLE.id
@@ -443,7 +475,7 @@
// 鏄惁澶勪簬绌洪棽寰呭懡鐘舵��
public Boolean isIdleNoCharge() {
boolean res = this.free == ShuttleStatusType.IDLE.id
- && this.pakMk.equals(true)
+ && !this.pakMk
&& this.errState == 0
&& this.taskNo == 0
&& this.protocolStatus == ShuttleProtocolStatusType.IDLE.id
@@ -458,7 +490,7 @@
}
boolean res = this.free == ShuttleStatusType.IDLE.id
- && this.pakMk
+ && !this.pakMk
&& this.errState == 0
&& this.taskNo == 0
&& this.protocolStatusType.id == ShuttleProtocolStatusType.IDLE.id
--
Gitblit v1.9.1