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
package com.ld.igds.gas.dto;
 
import com.bstek.dorado.annotation.PropertyDef;
import com.bstek.dorado.util.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ld.igds.models.Depot;
 
import lombok.Data;
 
import java.io.Serializable;
import java.util.Date;
import java.util.List;
 
import javax.persistence.Column;
import javax.persistence.Transient;
 
/**
 * 用于封装的粮情信息,每次获取粮情数据,封装为当前对象
 *
 * @author jiazx
 */
@Data
public class GasData implements Serializable {
 
    /**
     *
     */
    private static final long serialVersionUID = 1L;
 
    @PropertyDef(label = "批次ID")
    private String batchId;
 
    @PropertyDef(label = "组织编码", description = "")
    private String companyId;
 
    @PropertyDef(label = "仓库ID", description = "仓库编号")
    private String depotId;
 
    @PropertyDef(label = "二氧化碳浓度", description = "平均二氧化碳浓度(PPM)")
    private Double perCo2 = 0.0;
 
    @PropertyDef(label = "氧气浓度", description = "平均氧气浓度(%)")
    private Double perO2 = 0.0;
 
    @PropertyDef(label = "磷化氢浓度", description = "平均磷化氢浓度(PPM)")
    private Double perPh3 = 0.0;
 
    @PropertyDef(label = "氮气浓度", description = "氮气浓度(%)")
    private Double perN2 = 0.0;
 
    @PropertyDef(label = "二氧化碳浓度-最大", description = "二氧化碳浓度(PPM)")
    private Double perCo2Max = 0.0;
 
    @PropertyDef(label = "氧气浓度-最大", description = "氧气浓度(%)")
    private Double perO2Max = 0.0;
 
    @PropertyDef(label = "磷化氢浓度-最大", description = "磷化氢浓度(PPM)")
    private Double perPh3Max = 0.0;
 
    @PropertyDef(label = "氮气浓度-最大")
    private Double perN2Max = 0.0;
 
    @PropertyDef(label = "二氧化碳浓度-最小", description = "二氧化碳浓度(PPM)")
    private Double perCo2Min = 0.0;
 
    @PropertyDef(label = "氧气浓度-最小", description = "氧气浓度(%)")
    private Double perO2Min = 0.0;
 
    @PropertyDef(label = "磷化氢浓度-最小", description = "磷化氢浓度(PPM)")
    private Double perPh3Min = 0.0;
 
    @PropertyDef(label = "氮气浓度-最小")
    private Double perN2Min = 0.0;
 
    @PropertyDef(label = "检测时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date receiveDate;
 
    @PropertyDef(label = "采集通道个数")
    private int checkNum = 0;
 
    @PropertyDef(label = "采集点信息", description = "固定为:passCode,co2,o2,ph3,n2;passCode,co2,o2,ph3,n2;")
    private String points;
 
    @Column(name = "CHECK_USER_", length = 30)
    @PropertyDef(label = "检测人")
    private String checkUser;
 
    @PropertyDef(label = "备注信息")
    private String remark;
 
    @PropertyDef(label = "系统时间", description = "关系字段")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date sysDate = new Date();
 
    @PropertyDef(label = "仓库信息", description = "关系字段")
    private Depot depotData;
 
    @PropertyDef(label = "详细信息", description = "十路其他信息详细")
    private List<GasPoint> listPoint;
 
    @PropertyDef(label = "检测批次", description = "关系字段")
    private String strReceiveDate;
 
    @PropertyDef(label = "压力信息", description = "关系字段")
    private Double pressure;
 
    @PropertyDef(label = "压力检测时间", description = "关系字段")
    private Date pressureDate;
 
 
    public GasData() {
        super();
    }
 
    public GasData(String batchId, String companyId, String depotId,
                   Date receiveDate) {
        super();
        this.batchId = batchId;
        this.companyId = companyId;
        this.depotId = depotId;
        this.perCo2Max = 0.0;
        this.perO2Max = 0.0;
        this.perPh3Max = 0.0;
        this.perCo2Min = 0.0;
        this.perO2Min = 0.0;
        this.perPh3Min = 0.0;
        this.perCo2 = 0.0;
        this.perO2 = 0.0;
        this.perPh3 = 0.0;
        this.receiveDate = receiveDate;
    }
 
    public String getStrReceiveDate() {
        if (this.receiveDate != null)
            return DateUtils.format("yyyy-MM-dd HH:mm", receiveDate);
        return null;
    }
}