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); } }