From 5c698a110c552d5ef7af812f89d2950b82724c02 Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期三, 12 六月 2024 15:10:43 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/ShuttleProtocol.java | 17 +++++++++++++++++ 1 files changed, 17 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 619c409..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; @@ -218,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