自动化立体仓库 - WMS系统
lty
3 天以前 d907a822a940c7ec0fb7de0ca845472bda52229b
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
package com.zy.asrs.entity;
 
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField;
 
import com.core.common.SpringUtils;
import com.zy.asrs.service.AreaService;
import com.zy.asrs.service.TagService;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
 
@Data
@TableName("man_area")
public class Area implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    @ApiModelProperty(value= "")
    @TableField("tag_id")
    private Long tagId;
 
    /**
     * 库区id
     */
    @ApiModelProperty(value= "库区id")
    @TableField("area_id")
    private String areaId;
 
    /**
     * 库区名称
     */
    @ApiModelProperty(value= "库区名称")
    @TableField("area_name")
    private String areaName;
 
    /**
     * 库区备注
     */
    @ApiModelProperty(value= "库区备注")
    private String memo;
 
    /**
     * 备用字段
     */
    @ApiModelProperty(value= "备用字段")
    private String backup1;
 
    /**
     * 备用字段2
     */
    @ApiModelProperty(value= "备用字段2")
    private String backup2;
 
    /**
     * 备用字段3
     */
    @ApiModelProperty(value= "备用字段3")
    private String backup3;
 
    public Area() {}
 
    public Area(Long id,Long tagId,String areaId,String areaName,String memo,String backup1,String backup2,String backup3) {
        this.id = id;
        this.tagId = tagId;
        this.areaId = areaId;
        this.areaName = areaName;
        this.memo = memo;
        this.backup1 = backup1;
        this.backup2 = backup2;
        this.backup3 = backup3;
    }
    public String getAreaId$(){
        AreaService service = SpringUtils.getBean(AreaService.class);
        Area area = service.selectOne(new EntityWrapper<Area>().eq("area_id",areaId));
        if (!Cools.isEmpty(area)){
            return String.valueOf(area.getAreaName());
        }
        return null;
    }
//    Area area = new Area(
//            null,    // ID[非空]
//            null,    // [非空]
//            null,    // 库区id[非空]
//            null,    // 库区名称
//            null,    // 库区备注
//            null,    // 备用字段
//            null,    // 备用字段2
//            null    // 备用字段3
//    );
 
 
}