kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
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
package com.nanometer.smartlab.entity;
 
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.nanometer.smartlab.entity.enumtype.ValidFlag;
import lombok.Getter;
import lombok.Setter;
 
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.*;
 
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
 
/**
 * Created by johnny on 17/11/23.
 */
@Getter
@Setter
@SuppressWarnings("serial")
@JsonInclude(NON_NULL)
@JsonIgnoreProperties(value = {"handler"})
public class SysLaboratoryContainer implements Serializable {
 
    private Long id;
    private Long laboratoryId;
    private Long type;
    private String containerCode;
    private String infoCode;
    private String name;
    private Long structure;
    private Timestamp createTime;
    private Timestamp updateTime;
    private ValidFlag validFlag;
    private Long characterLeft;
    private Long characterRight;
    private String controllerCode;
    private Double temp;
    private Integer humidity;
    private Double voc1;
    private String flag;
    private String project;
 
 
 
 
 
 
    //非数据库字段
    private String laboratoryName;
    private String laboratoryType;
    private String controllerName;
    private List<String> projects;
 
    public List<String> getProjects() {
        if (projects == null && project != null){
            this.projects = Arrays.asList(this.project.split(","));
        }
        return projects;
    }
 
 
    public String getProject() {
        if (this.project == null){
            this.project = "";
            if (projects != null && projects.size() > 0) {
                projects.forEach(pro->{
                    this.project += ",";
                    this.project += pro;
                });
                this.project = this.project.substring(1);
            }
        }
        return project;
    }
 
}