From 6c8bbda65905a9dd299062d725682a8bc896cd72 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 21 六月 2024 19:14:33 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/JarProtocol.java | 56 ++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 44 insertions(+), 12 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 0488b50..29966ae 100644
--- a/src/main/java/com/zy/core/model/protocol/JarProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/JarProtocol.java
@@ -1,12 +1,14 @@
package com.zy.core.model.protocol;
import com.zy.asrs.entity.BasJar;
+import com.zy.core.enums.CrnModeType;
+import com.zy.core.enums.JarModeType;
import com.zy.core.enums.JarStatusType;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
/**
- * Created by vincent on 2020/8/7
+ * Created by vincent on 2024/6/21
*/
@Slf4j
@Data
@@ -22,6 +24,9 @@
* 0 = 鑴辨満妯″紡
*/
public Integer mode;
+
+ public JarModeType modeType;
+
/**
IDLE(0, "绌洪棽"),
@@ -68,6 +73,26 @@
* */
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;
+
/**
* 寮傚父鐮�
@@ -84,23 +109,30 @@
this.status = JarStatusType.get(type).id.shortValue();
}
+ public void setMode(Integer mode) {
+ this.mode = mode;
+ this.modeType = JarModeType.get(mode);
+ }
+
+ public void setMode(JarModeType type) {
+ this.modeType = type;
+ this.mode = JarModeType.get(type).id;
+ }
public BasJar toSqlModel(BasJar basJar){
if (jarErr!=null) {
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");
+
return basJar;
}
--
Gitblit v1.9.1