package com.ld.igds.screen.data; import com.bstek.dorado.annotation.PropertyDef; import com.fasterxml.jackson.annotation.JsonFormat; import com.ld.igds.models.Depot; import lombok.Data; import org.apache.commons.lang3.time.DateFormatUtils; import java.io.Serializable; import java.util.Date; /** * 仓库列表及最新的粮情信息,用于大屏封装 * @author chen */ @Data public class DepotGrainData extends Depot implements Serializable { private static final long serialVersionUID = 1L; @PropertyDef(label = "最低温粮温", description = "单位℃,粮情最低温") private Double tempMin; @PropertyDef(label = "最高粮温", description = "单位℃,粮情最高温") private Double tempMax; @PropertyDef(label = "平均粮温", description = "单位℃,粮情平均温度") private Double tempAve; @PropertyDef(label = "仓内湿度") private Double humidityIn; @PropertyDef(label = "仓内温度") private Double tempIn; @PropertyDef(label = "仓外湿度") private Double humidityOut; @PropertyDef(label = "仓外温度") private Double tempOut; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @PropertyDef(label = "检测时间") private Date receiveDate; @PropertyDef(label = "更新时间", description = "更新时间:yyyy-MM-dd HH:mm") private String receiveTime; public String getReceiveTime() { return DateFormatUtils.format(this.receiveDate, "yyyy-MM-dd HH:mm"); } }