From 77ba9a8e95927efc361268c005ae907e709da2c4 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 12 六月 2024 16:55:35 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java
index 60395ed..388135e 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java
@@ -7,9 +7,11 @@
import com.zy.asrs.wcs.core.service.LocService;
import com.zy.asrs.wcs.core.utils.RedisUtil;
import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant;
+import com.zy.asrs.wcs.rcs.entity.BasShuttleErr;
import com.zy.asrs.wcs.rcs.model.enums.ShuttleProtocolStatusType;
import com.zy.asrs.wcs.rcs.entity.Device;
import com.zy.asrs.wcs.rcs.entity.ShuttleDeviceStatus;
+import com.zy.asrs.wcs.rcs.service.BasShuttleErrService;
import com.zy.asrs.wcs.rcs.service.ShuttleDeviceStatusService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -56,6 +58,11 @@
* 灏忚溅璁惧鐘舵��
*/
private Integer deviceStatus;
+
+ /**
+ * 灏忚溅妯″紡锛�0锛氭墜鍔� 1锛氳嚜鍔�
+ */
+ private Integer mode;
/**
* 褰撳墠浜岀淮鐮�
@@ -159,6 +166,16 @@
private Long deviceDataLog = System.currentTimeMillis();
/**
+ * 鎸囦护涓嬪彂鏃堕棿
+ */
+ private Long sendTime = 0L;
+
+ /**
+ * 鏈�杩戜竴娆″湪绾挎椂闂�
+ */
+ private Long lastOnlineTime = System.currentTimeMillis();
+
+ /**
* 璁惧淇℃伅
*/
private Device device;
@@ -203,6 +220,21 @@
return "";
}
+ public String getErrorCode$() {
+ if (this.errorCode == null) {
+ return "";
+ }
+ BasShuttleErrService basShuttleErrService = SpringUtils.getBean(BasShuttleErrService.class);
+ BasShuttleErr shuttleErr = basShuttleErrService.getOne(new LambdaQueryWrapper<BasShuttleErr>()
+ .eq(BasShuttleErr::getErrorCode, this.errorCode)
+ .eq(BasShuttleErr::getHostId, this.device.getHostId())
+ .eq(BasShuttleErr::getDevicePlc, this.device.getDevicePlc()));
+ if (shuttleErr != null) {
+ return this.errorCode + "-" + shuttleErr.getErrName();
+ }
+ return errorCode;
+ }
+
public Integer getTaskNo() {
RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
if (null != redisUtil) {
--
Gitblit v1.9.1