package com.zy.acs.manager.manager.entity;
|
|
import com.baomidou.mybatisplus.annotation.*;
|
import com.zy.acs.manager.manager.service.AgvModelService;
|
import com.zy.acs.manager.manager.service.AgvStsService;
|
import com.zy.acs.framework.common.Cools;
|
import com.zy.acs.framework.common.SpringUtils;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
/**
|
* Created by vincent on 2023/5/22
|
*/
|
@Data
|
@TableName("man_agv")
|
public class Agv implements Serializable {
|
|
private static final long serialVersionUID = 6443628096282680964L;
|
|
@ApiModelProperty(value = "ID")
|
@TableId(type = IdType.AUTO)
|
private Long id;
|
|
@ApiModelProperty(value = "编号")
|
private String uuid;
|
|
@ApiModelProperty(value = "设备名")
|
private String name;
|
|
@ApiModelProperty(value = "ip地址")
|
private String ip;
|
|
@ApiModelProperty(value = "密钥")
|
private String secret;
|
|
@ApiModelProperty(value= "工作状态")
|
private Long agvSts;
|
|
@ApiModelProperty(value= "车型")
|
private Long agvModel;
|
|
@ApiModelProperty(value= "暂存数")
|
private Integer stage;
|
|
@ApiModelProperty(value= "充电阈值")
|
private Integer chargeLine;
|
|
@ApiModelProperty(value = "状态{1:正常,0:冻结}")
|
private Integer status;
|
|
@ApiModelProperty(value = "异常{1:异常,0:正常}")
|
private Integer error;
|
|
@ApiModelProperty(value = "是否删除{1:是,0:否}")
|
@TableLogic
|
private Integer deleted;
|
|
@ApiModelProperty(value = "租户[sys_tenant]")
|
private Long tenantId;
|
|
@ApiModelProperty(value = "添加人员[sys_user]")
|
private Long createBy;
|
|
@ApiModelProperty(value = "创建时间")
|
private Date createTime;
|
|
@ApiModelProperty(value = "修改人员[sys_user]")
|
private Long updateBy;
|
|
@ApiModelProperty(value = "修改时间")
|
private Date updateTime;
|
|
@ApiModelProperty(value = "备注")
|
private String memo;
|
|
@TableField(exist = false)
|
private AgvDetail agvDetail;
|
|
@TableField(exist = false)
|
private AgvModel agvModelData;
|
|
public String getAgvSts$(){
|
AgvStsService service = SpringUtils.getBean(AgvStsService.class);
|
AgvSts agvSts = service.getById(this.agvSts);
|
if (!Cools.isEmpty(agvSts)){
|
return String.valueOf(agvSts.getName());
|
}
|
return null;
|
}
|
|
public String getAgvModel$(){
|
AgvModelService service = SpringUtils.getBean(AgvModelService.class);
|
AgvModel agvModel = service.getById(this.agvModel);
|
if (!Cools.isEmpty(agvModel)){
|
return String.valueOf(agvModel.getName());
|
}
|
return null;
|
}
|
|
public String getStatus$(){
|
if (null == this.status){ return null; }
|
switch (this.status){
|
case 1:
|
return "正常";
|
case 0:
|
return "冻结";
|
default:
|
return String.valueOf(this.status);
|
}
|
}
|
|
public Boolean getStatusBool(){
|
if (null == this.status){ return null; }
|
switch (this.status){
|
case 1:
|
return true;
|
case 0:
|
return false;
|
default:
|
return null;
|
}
|
}
|
|
|
}
|