From bf616f97b4d1a96e0ee89c52178a88e044e52a1d Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 21 九月 2024 10:40:24 +0800 Subject: [PATCH] # --- zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java | 29 ++++++++--------------------- 1 files changed, 8 insertions(+), 21 deletions(-) diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java index 67d9969..c7d4d49 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java @@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.zy.acs.common.enums.AgvStatusType; import com.zy.acs.framework.common.Cools; import com.zy.acs.framework.common.SpringUtils; -import com.zy.acs.common.enums.AgvStatusType; import com.zy.acs.manager.manager.service.AgvService; import com.zy.acs.manager.manager.service.CodeService; import io.swagger.annotations.ApiModelProperty; @@ -14,6 +14,7 @@ import java.io.Serializable; import java.util.Date; +import java.util.Optional; @Data @TableName("man_agv_detail") @@ -328,15 +329,15 @@ return null; } - public String getPos$(){ + public Boolean getPosBool(){ if (null == this.pos){ return null; } switch (this.pos){ case 1: - return "鏄�"; + return true; case 0: - return "鍚�"; + return false; default: - return String.valueOf(this.status); + return null; } } @@ -345,22 +346,8 @@ this.agvStatus = AgvStatusType.get(status); } - public String getStatus$(){ - if (null == this.status){ return null; } - if (null == this.agvStatus){ return null; } - return this.agvStatus.desc; - } - - public String getDeleted$(){ - if (null == this.deleted){ return null; } - switch (this.deleted){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.deleted); - } + public String getStatusDesc(){ + return Optional.ofNullable(this.agvStatus).map(status -> status.desc).orElse(""); } public Long getRecentCode() { -- Gitblit v1.9.1