jiazx0107@163.com
2023-05-17 620eab6cca2bc9ef9ea6d3067a0a5ba1deadbd1c
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
package com.ld.igds.models;
 
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ld.igds.constant.*;
 
import lombok.Data;
 
import javax.persistence.*;
 
import java.io.Serializable;
import java.util.Date;
import java.util.List;
 
/**
 * 仓房敖间-与仓房建筑不一样,只作为具体仓库使用,系统中仓库的最小单位定义
 *
 * @author Andy
 * <p>
 * 版本升级记录: 1,调整字段结构,删除配置类型字段
 */
@Data
@Entity
@Table(name = "D_DEPOT")
public class Depot implements Serializable {
 
    /**
     *
     */
    private static final long serialVersionUID = 1L;
 
    @Id
    @Column(name = "ID_", length = 50)
    @PropertyDef(label = "仓库编号")
    private String id;
 
    @Id
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
 
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "所属分库")
    private String deptId;
 
    @Column(name = "NAME_", length = 50)
    @PropertyDef(label = "仓库名称")
    private String name;
 
    @Column(name = "BUILDING_ID_", length = 50)
    @PropertyDef(label = "所属仓房建筑")
    private String buildingId;
 
    @Column(name = "DEPOT_TYPE_", length = 10)
    @PropertyDef(label = "仓库类型", description = "普通平房仓")
    private String depotType;
 
    @Column(name = "DEPOT_STATUS_", length = 10)
    @PropertyDef(label = "仓库状态", description = "")
    private String depotStatus;
 
    @Column(name = "STORE_TYPE_", length = 6)
    @PropertyDef(label = "储粮方式", description = "1:散装储粮 2:包装储粮 3:围包散存 9:其他")
    private String storeType;
 
    @Column(name = "STORAGE_MAX_")
    @PropertyDef(label = "设计储量", description = "单位:KG")
    private Double storageMax;
 
    /**
     * 实际储量需要独立去修改
     */
    @Column(name = "STORAGE_REAL_", insertable = true)
    @PropertyDef(label = "实际储量", description = "单位:KG")
    private Double storageReal;
 
    @Column(name = "ORIENTATION_", length = 10)
    @PropertyDef(label = "朝向", description = "东、南、西、北")
    private String orientation;
 
    @Column(name = "FOOD_TYPE_", length = 10)
    @PropertyDef(label = "粮食性质")
    private String foodType;
 
    @Column(name = "FOOD_VARIETY_", length = 10)
    @PropertyDef(label = "粮食品种")
    private String foodVariety;
 
    @Column(name = "FOOD_LEVEL_", length = 10)
    @PropertyDef(label = "粮食等级")
    private String foodLevel;
 
    @Column(name = "FOOD_LOCATION_", length = 200)
    @PropertyDef(label = "粮食产地")
    private String foodLocation;
 
    // -----以下为粮食质量信息 ------//
 
    @Column(name = "PER_WET_")
    @PropertyDef(label = "水分", description = "百分比")
    private Double perWet;
 
    @Column(name = "PER_IMPURITY_")
    @PropertyDef(label = "杂质", description = "百分比")
    private Double perImpurity;
 
    @Column(name = "BULK_WEIGHT_")
    @PropertyDef(label = "容重 g/L", description = "容重 g/L")
    private Double bulkWeight;
 
    @Column(name = "STORE_KEEPER_", length = 30)
    @PropertyDef(label = "保管员账号")
    private String storeKeeper;
 
    @Column(name = "STORE_KEEPER_NAME_", length = 50)
    @PropertyDef(label = "保管员", description = "中文名称")
    private String storeKeeperName;
 
    @Column(name = "CHECK_DATE_")
    @PropertyDef(label = "检测时间", description = "最后质检时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkDate;
 
    @Column(name = "STORE_DATE_")
    @PropertyDef(label = "入库时间", description = "入库时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date storeDate;
 
    @Column(name = "FOOD_YEAR_", length = 10)
    @PropertyDef(label = "粮食年份")
    private String foodYear;
 
    @Column(name = "REMARK_", length = 250)
    @PropertyDef(label = "备注", description = "备注信息")
    private String remark;
 
    // ------------其他属性信息------------//
    @Transient
    @PropertyDef(label = "当前参考下设备信息")
    private List<Device> devices;
 
    @Transient
    @PropertyDef(label = "粮食品种")
    private String foodVarietyName;
 
    @Transient
    @PropertyDef(label = "粮食性质")
    private String foodTypeName;
 
    @Transient
    @PropertyDef(label = "仓库类型")
    private String depotTypeName;
 
    @Transient
    @PropertyDef(label = "仓库类型")
    private String depotStatusName;
 
    @Transient
    @PropertyDef(label = "粮食等级")
    private String foodLevelName;
 
    @Transient
    @PropertyDef(label = "X坐标", description = "三维模型中坐标,页面无需维护")
    private Double posX;
 
    @Transient
    @PropertyDef(label = "Y坐标", description = "三维模型中坐标,页面无需维护")
    private Double posY;
 
    @Transient
    @PropertyDef(label = "修改标签")
    private String editTag;
 
 
    public String getFoodLevelName() {
        if (null != this.foodLevel) {
            return FoodLevel.getMsg(this.foodLevel);
        }
        return null;
    }
 
    public String getFoodVarietyName() {
        if (null != this.foodVariety) {
            return FoodVariety.getMsg(this.foodVariety);
        }
        return null;
    }
 
    public String getFoodTypeName() {
        if (null != this.foodType) {
            return FoodType.getMsg(this.foodType);
        }
        return null;
    }
 
    public String getDepotTypeName() {
        if (null != this.depotType) {
            return DepotType.getMsg(this.depotType);
        }
        return null;
    }
 
    public String getDepotStatusName() {
        if (null != this.depotStatus) {
            return DepotStatus.getMsg(this.depotStatus);
        }
        return null;
    }
}