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
package com.ld.igds.io.request;
 
import java.io.Serializable;
 
import com.ld.igds.models.Device;
import lombok.Data;
 
import com.bstek.dorado.annotation.PropertyDef;
 
/**
 * 通风等操作执行的设备信息封装,基本字段参考 @See Device
 */
@Data
public class ExeDevice implements Serializable {
 
    /**
     *
     */
    private static final long serialVersionUID = 1L;
 
    @PropertyDef(label = "模式ID", description = "在自动模式中使用的字段")
    private String autoId;
 
    @PropertyDef(label = "设备唯一ID")
    private String id;
 
    private String companyId;
 
    @PropertyDef(label = "所属仓库")
    private String depotId;
 
    @PropertyDef(label = "通道/地址", description = "风机类设备需要根据目标状态考虑是否选择的是link字段")
    private int passCode = 0;
 
    @PropertyDef(label = "名称")
    private String name;
 
    @PropertyDef(label = "所属分机")
    private String serId;
 
    @PropertyDef(label = "设备类型")
    private String type;
 
    @PropertyDef(label = "设备位置")
    private String location;
 
    @PropertyDef(label = "关联通道", description = "主要指混流风口和轴流窗口的风机通道")
    private String link;
 
    @PropertyDef(label = "目标状态", description = "查看枚举")
    private String targetStatus;
 
    public ExeDevice() {
    }
 
    public ExeDevice(Device device, String targetStatus) {
        this.id = device.getId();
        this.companyId = device.getCompanyId();
        this.depotId = device.getDepotId();
        this.passCode = device.getPassCode();
        this.name = device.getName();
        this.serId = device.getSerId();
        this.type = device.getType();
        this.location = device.getLocation();
        this.link = device.getLink();
        this.targetStatus = targetStatus;
    }
 
    public ExeDevice(ExeDevice device, String passCode) {
        this.id = device.getId();
        this.companyId = device.getCompanyId();
        this.depotId = device.getDepotId();
        this.passCode = device.getPassCode();
        this.name = device.getName();
        this.serId = device.getSerId();
        this.type = device.getType();
        this.location = device.getLocation();
        this.targetStatus = device.getTargetStatus();
        this.passCode = Integer.valueOf(passCode);
    }
}