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