luxiaotao1123
2024-09-09 ea7e27ff897da58be02c14a6f18adbf387a56ee1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package com.zy.acs.manager.manager.entity;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
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 Integer tenantId;
 
    @ApiModelProperty(value = "添加人员[sys_user]")
    private Integer createBy;
 
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
 
    @ApiModelProperty(value = "修改人员[sys_user]")
    private Integer updateBy;
 
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
 
    @ApiModelProperty(value = "备注")
    private String memo;
 
    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);
        }
    }
 
}