add
gdg
2020-10-30 9222b2db700cd25e46b67c2a3c05fffd3817cc64
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
package com.nanometer.smartlab.entity;
 
import java.util.Date;
 
public class TempSensors {
    public final static int TYPE_LABORATORY_CONTAINER = 1;
    public final static int TYPE_WAREHOUSE_CONTAINER = 2;
 
    //Bit0:温度低报警; Bit1:温度高报警; Bit2:湿度低报警; Bit3:湿度高报警; Bit4:VOC1
    public final static int FLAG_LOW_TEMP_INDEX = 0;
    public final static int FLAG_HIGH_TEMP_INDEX = 1;
    public final static int FLAG_LOW_HUMIDITY_INDEX = 2;
    public final static int FLAG_HIGH_HUMIDITY_INDEX = 3;
    public final static int FLAG_VOC1_INDEX = 4;
 
 
    private String id;
 
    private String containerId;
 
    private String warehouseContainerName;
    private String laboratoryContainerName;
 
    private Float temp;
 
    private Float humidity;
 
    private Float voc1;
 
    private String flag;
 
    private Integer type;
 
    private Date updateTime;
 
    private String laboratoryName;
    private String warehouseName;
 
    private String laboratoryId;
    private String warehouseId;
 
 
    private static final long serialVersionUID = 1L;
 
 
    public boolean isLowTempAlert(){
        if(flag.length()>FLAG_LOW_TEMP_INDEX){
            return flag.charAt(FLAG_LOW_TEMP_INDEX)=='1';
        }
        return false;
    }
 
    public boolean isHighTempAlert(){
        if(flag.length()>FLAG_HIGH_TEMP_INDEX){
            return flag.charAt(FLAG_HIGH_TEMP_INDEX)=='1';
        }
        return false;
    }
 
    public boolean isLowHumidityAlert(){
        if(flag.length()>FLAG_LOW_HUMIDITY_INDEX){
            return flag.charAt(FLAG_LOW_HUMIDITY_INDEX)=='1';
        }
        return false;
    }
 
    public boolean isHighHumidityAlert(){
        if(flag.length()>FLAG_HIGH_HUMIDITY_INDEX){
            return flag.charAt(FLAG_HIGH_HUMIDITY_INDEX)=='1';
        }
        return false;
    }
 
    public boolean isVoc1Alert(){
        if(flag.length()>FLAG_VOC1_INDEX){
            return flag.charAt(FLAG_VOC1_INDEX)=='1';
        }
        return false;
    }
 
    public String getId() {
        return id;
    }
 
    public void setId(String id) {
        this.id = id;
    }
 
    public String getContainerId() {
        return containerId;
    }
 
    public void setContainerId(String containerId) {
        this.containerId = containerId;
    }
 
    public Float getTemp() {
        return temp;
    }
 
    public void setTemp(Float temp) {
        this.temp = temp;
    }
 
    public Float getHumidity() {
        return humidity;
    }
 
    public void setHumidity(Float humidity) {
        this.humidity = humidity;
    }
 
    public Float getVoc1() {
        return voc1;
    }
 
    public void setVoc1(Float voc1) {
        this.voc1 = voc1;
    }
 
    public String getFlag() {
        return flag;
    }
 
    public void setFlag(String flag) {
        this.flag = flag;
    }
 
    public Integer getType() {
        return type;
    }
 
    public void setType(Integer type) {
        this.type = type;
    }
 
    public Date getUpdateTime() {
        return updateTime;
    }
 
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
 
    public String getLaboratoryName() {
        return laboratoryName;
    }
 
    public void setLaboratoryName(String laboratoryName) {
        this.laboratoryName = laboratoryName;
    }
 
    public String getWarehouseName() {
        return warehouseName;
    }
 
    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }
 
    public String getLaboratoryId() {
        return laboratoryId;
    }
 
    public void setLaboratoryId(String laboratoryId) {
        this.laboratoryId = laboratoryId;
    }
 
    public String getWarehouseId() {
        return warehouseId;
    }
 
    public void setWarehouseId(String warehouseId) {
        this.warehouseId = warehouseId;
    }
 
    public String getWarehouseContainerName() {
        return warehouseContainerName;
    }
 
    public void setWarehouseContainerName(String warehouseContainerName) {
        this.warehouseContainerName = warehouseContainerName;
    }
 
    public String getLaboratoryContainerName() {
        return laboratoryContainerName;
    }
 
    public void setLaboratoryContainerName(String laboratoryContainerName) {
        this.laboratoryContainerName = laboratoryContainerName;
    }
}