From a647b566ec67a55a50b1a8a8e95abc2cd64aeea6 Mon Sep 17 00:00:00 2001
From: yxFwq <1>
Date: 星期五, 29 十一月 2024 16:27:45 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/JarProtocol.java | 92 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 77 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/zy/core/model/protocol/JarProtocol.java b/src/main/java/com/zy/core/model/protocol/JarProtocol.java
index 4bc415b..cfa29a4 100644
--- a/src/main/java/com/zy/core/model/protocol/JarProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/JarProtocol.java
@@ -7,8 +7,10 @@
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
+import java.util.Date;
+
/**
- * Created by vincent on 2020/8/7
+ * Created by vincent on 2024/6/21
*/
@Slf4j
@Data
@@ -30,9 +32,15 @@
/**
IDLE(0, "绌洪棽"),
- MOVING(1, "浣滀笟涓�"),
- SOS(2, "鎶ヨ"),
- WAITING(3, "浠诲姟瀹屾垚绛夊緟WCS纭"),
+ MOVING(1, "鍏ユ枡涓�"),
+ SOS(2, "纭寲涓�"),
+ WAITING1(3, "鍑烘枡涓�"),
+ WAITING2(4, "鍋滄"),
+ WAITING3(5, "杩涙枡闂ㄦ墦寮�涓�"),
+ WAITING4(6, "鍑烘枡闂ㄦ墦寮�涓�"),
+ WAITING5(7, "杩涙枡闂ㄥ叧闂腑"),
+ OFF_LINE(8, "鍑烘枡闂ㄥ叧闂腑"),
+ OTHER(100, "鍏跺畠"),
*/
public Short status;
@@ -40,31 +48,37 @@
/*
* 宸﹂棬鐘舵��
+ * 杩涙枡闂�
* */
private boolean leftDoor;
/*
* 鍙抽棬鐘舵��
+ * 鍑烘枡闂�
* */
private boolean rightDoor;
/*
* 宸﹂棬鍙紑
+ * 杩涙枡闂�
* */
private boolean leftInEnable;
/*
* 宸﹂棬鍙叧
+ * 杩涙枡闂�
* */
private boolean leftOutEnable;
/*
* 鍙抽棬鍙紑
+ * 鍑烘枡闂�
* */
private boolean rightInEnable;
/*
* 鍙抽棬鍙叧
+ * 鍑烘枡闂�
* */
private boolean rightOutEnable;
@@ -72,6 +86,38 @@
* 鑷姩
* */
private boolean autoing;
+
+ /*
+ * open the left door
+ * 杩涙枡闂�
+ * */
+ public Integer leftDoorOpen;
+
+ /*
+ * close the left door
+ * 杩涙枡闂�
+ * */
+ public Integer leftDoorClose;
+
+ /*
+ * open the right door
+ * 鍑烘枡闂�
+ * */
+ public Integer rightDoorOpen;
+
+ /*
+ * close the right door
+ * 鍑烘枡闂�
+ * */
+ public Integer rightDoorClose;
+
+ public Float jarTemperature;
+ public Float jarPressure;
+ public boolean holdingSign = false;
+ public boolean openDoorSign = false;
+ public boolean closeDoorSign = false;
+ public Short upStatus = 0;
+
/**
@@ -104,17 +150,33 @@
basJar.setJarErr(jarErr);
}
basJar.setJarMode(mode);
-// if (basSte.getPakMk().equals("N")) {
-// if (!Cools.isEmpty(row)) {
-// basSte.setRow(row.intValue());
-// }
-// if (!Cools.isEmpty(bay)) {
-// basSte.setBay(bay.intValue());
-// }
-// if (!Cools.isEmpty(lev)) {
-// basSte.setLev(lev.intValue());
-// }
-// }
+ basJar.setJarStatus(status.intValue());
+ basJar.setLeftDoor(leftDoor?"Y":"N");
+ basJar.setRightDoor(rightDoor?"Y":"N");
+ basJar.setLeftInEnable(leftInEnable?"Y":"N");
+ basJar.setLeftOutEnable(leftOutEnable?"Y":"N");
+ basJar.setRightInEnable(rightInEnable?"Y":"N");
+ basJar.setRightOutEnable(rightOutEnable?"Y":"N");
+ basJar.setAutoing(autoing?"Y":"N");
+ basJar.setJarTemperature(jarTemperature);
+ basJar.setJarPressure(jarPressure);
+ basJar.setLeftDoorOpen(leftDoorOpen);
+ basJar.setLeftDoorClose(leftDoorClose);
+ basJar.setRightDoorOpen(rightDoorOpen);
+ basJar.setRightDoorClose(rightDoorClose);
+ if (holdingSign){
+ basJar.setHoldingTime(new Date());
+ holdingSign = false;
+ }
+ if (openDoorSign){
+ basJar.setOpenTime(new Date());
+ openDoorSign = false;
+ }
+ if (closeDoorSign){
+ basJar.setCloseTime(new Date());
+ closeDoorSign = false;
+ }
+
return basJar;
}
--
Gitblit v1.9.1