From c0d2dc7614b173e0ea4c78c6f899ab732542127a Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 13 七月 2025 19:54:28 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java | 141 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 136 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
index 003af3f..a4bf8e0 100644
--- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -12,6 +12,8 @@
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
+import java.util.HashMap;
+
/**
* 鍥涘悜绌挎杞�
*/
@@ -51,7 +53,7 @@
private String locNo;
/**
- * 灏忚溅璁惧鐘舵��
+ * 灏忚溅璁惧鐘舵��0:蹇欑 1:绌洪棽
*/
private Integer deviceStatus;
@@ -109,6 +111,11 @@
*/
private Integer batteryVoltage;
+ /**
+ * 杩愯閫熷害
+ */
+ private Integer speed;
+
//**********************绯荤粺鑷韩鎵�闇�灞炴��**********************
/**
@@ -157,6 +164,11 @@
private Integer yCurrent = 0;
/**
+ * 婕旂ず妯″紡
+ */
+ private Boolean demo = false;
+
+ /**
* 鏃ュ織閲囬泦鏃堕棿
*/
private Long deviceDataLog = System.currentTimeMillis();
@@ -177,6 +189,18 @@
private Object extend;
/**
+ * 绯荤粺娑堟伅
+ */
+ private String systemMsg;
+
+ public String getProtocolStatus$() {
+ if (this.protocolStatusType == null) {
+ return "";
+ }
+ return this.protocolStatusType.desc;
+ }
+
+ /**
* 璁剧疆灏忚溅鐘舵��
*/
public void setProtocolStatus(Integer status) {
@@ -193,7 +217,10 @@
}
public Integer getTaskNo() {
- RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
+ RedisUtil redisUtil = null;
+ try {
+ redisUtil = SpringUtils.getBean(RedisUtil.class);
+ }catch (Exception e) {}
if (null != redisUtil) {
Object o = redisUtil.get(RedisKeyType.SHUTTLE_FLAG.key + this.shuttleNo);
if (!Cools.isEmpty(o)) {
@@ -204,7 +231,10 @@
}
public synchronized void setSyncTaskNo(Integer taskNo) {
- RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
+ RedisUtil redisUtil = null;
+ try {
+ redisUtil = SpringUtils.getBean(RedisUtil.class);
+ }catch (Exception e) {}
if (null != redisUtil) {
redisUtil.set(RedisKeyType.SHUTTLE_FLAG.key + this.shuttleNo, taskNo);
this.taskNo = taskNo;
@@ -223,7 +253,10 @@
//閫氳繃褰撳墠浜岀淮鐮佽幏鍙栧綋鍓嶅簱浣嶅彿
public String getCurrentLocNo() {
- LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
+ LocMastService locMastService = null;
+ try {
+ locMastService = SpringUtils.getBean(LocMastService.class);
+ }catch (Exception e) {}
if (locMastService == null) {
return null;
}
@@ -236,7 +269,13 @@
}
public String getStatusErrorCode$() {
- BasShuttleErrService basShuttleErrService = SpringUtils.getBean(BasShuttleErrService.class);
+ BasShuttleErrService basShuttleErrService = null;
+ try {
+ basShuttleErrService = SpringUtils.getBean(BasShuttleErrService.class);
+ }catch (Exception e) {}
+ if (basShuttleErrService == null) {
+ return "";
+ }
if (this.errorCode == null) {
return "";
}
@@ -247,4 +286,96 @@
return basShuttleErr.getErrName();
}
+ public String getMode$() {
+ if (this.mode == null) {
+ return "";
+ }
+ if (this.mode == 0) {
+ return "鎵嬪姩";
+ } else if (this.mode == 1) {
+ return "鑷姩";
+ }
+
+ return "";
+ }
+
+ public String getDeviceStatus$() {
+ if (this.deviceStatus == null) {
+ return "";
+ }
+ if (this.deviceStatus == 0) {
+ return "蹇欑";
+ } else if (this.deviceStatus == 1) {
+ return "绌洪棽";
+ }
+
+ return "";
+ }
+
+ public String getHasLift$() {
+ if (this.hasLift == null) {
+ return "";
+ }
+
+ return this.hasLift ? "Y" : "N";
+ }
+
+ public String getHasCharge$() {
+ if (this.hasCharge == null) {
+ return "";
+ }
+
+ return this.hasCharge ? "Y" : "N";
+ }
+
+ public String getHasPallet$() {
+ if (this.hasPallet == null) {
+ return "";
+ }
+
+ return this.hasPallet ? "Y" : "N";
+ }
+
+ public String getPakMk$() {
+ if (this.pakMk == null) {
+ return "";
+ }
+
+ return this.pakMk ? "Y" : "N";
+ }
+
+ public String getDemo$() {
+ if (this.demo == null) {
+ return "";
+ }
+
+ return this.demo ? "Y" : "N";
+ }
+
+ public HashMap<String, Object> getPoint() {
+ HashMap<String, Object> map = new HashMap<>();
+ LocMastService locMastService = null;
+ try {
+ locMastService = SpringUtils.getBean(LocMastService.class);
+ }catch (Exception e) {}
+ if (locMastService == null) {
+ return map;
+ }
+
+ if (this.currentCode == null) {
+ return map;
+ }
+
+ //婧愬簱浣�(灏忚溅褰撳墠浣嶇疆)
+ LocMast currentLocMast = locMastService.queryByQrCode(this.currentCode);
+ if (currentLocMast == null) {
+ return map;
+ }
+
+ map.put("x", currentLocMast.getRow1());
+ map.put("y", currentLocMast.getBay1());
+ map.put("z", currentLocMast.getLev1());
+ return map;
+ }
+
}
--
Gitblit v1.9.1