From 7180e7e7c548c78f327a9f66c2bc89af64039e7e Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期三, 12 六月 2024 13:10:38 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java index d47627f..7989217 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/model/protocol/LiftProtocol.java @@ -1,11 +1,14 @@ package com.zy.asrs.wcs.rcs.model.protocol; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.SpringUtils; import com.zy.asrs.wcs.core.utils.RedisUtil; import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant; +import com.zy.asrs.wcs.rcs.entity.BasLiftErr; import com.zy.asrs.wcs.rcs.entity.Device; import com.zy.asrs.wcs.rcs.model.enums.LiftProtocolStatusType; +import com.zy.asrs.wcs.rcs.service.BasLiftErrService; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -144,6 +147,30 @@ */ private Object extend; + public String getRun$() { + if (this.run == null) { + return "鏈煡"; + } + + return this.run ? "杩愯涓�" : "绌洪棽"; + } + + public String getReady$() { + if (this.ready == null) { + return "鏈煡"; + } + + return this.ready ? "灏辩华" : "鏈氨缁�"; + } + + public String getModel$() { + if (this.model == null) { + return "鏈煡"; + } + + return this.model ? "鑷姩" : "鎵嬪姩"; + } + /** * 璁剧疆鎻愬崌鏈虹姸鎬� */ @@ -179,6 +206,21 @@ return this.taskNo == null ? 0 : this.taskNo; } + public String getErrorCode$() { + if (this.errorCode == null) { + return ""; + } + BasLiftErrService basLiftErrService = SpringUtils.getBean(BasLiftErrService.class); + BasLiftErr liftErr = basLiftErrService.getOne(new LambdaQueryWrapper<BasLiftErr>() + .eq(BasLiftErr::getErrorCode, this.errorCode) + .eq(BasLiftErr::getHostId, this.device.getHostId()) + .eq(BasLiftErr::getDevicePlc, this.device.getDevicePlc())); + if (liftErr != null) { + return this.errorCode + "-" + liftErr.getErrName(); + } + return errorCode; + } + @Override public LiftProtocol clone() { try { -- Gitblit v1.9.1