using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Application { /// /// /// public class MonitorHourRecordDto { /// /// /// public MonitorHourRecordDto() { } /// /// /// public MonitorHourRecordDto(Model.MonitorHourRecordPure rhs) { this.CorpID = rhs.CorpID; this.MonitorPointID = rhs.MonitorPointID; this.SignalID = rhs.SignalID; this.RecordType = rhs.RecordType; this.DataDay = rhs.DataDay; this.DataHour = rhs.DataHour; this.SrcTime = rhs.SrcTime; this.SrcValue= rhs.SrcValue; this.DataTime = rhs.DataTime; this.DataValue = rhs.DataValue; this.DataStatus = rhs.DataStatus; } /// /// /// public MonitorHourRecordDto(Model.MonitorHourRecordPure rhs, Model.Signal_SignalType signal) : this(rhs) { if (signal != null) { if (signal.TryConvert(rhs.DataValue, out double dataValue)) { this.DataValue = dataValue.ToString(); } } } /// /// 客户标识 /// public long CorpID { get; set; } /// /// 测点标识 /// public long MonitorPointID { get; set; } /// /// 信号标识 /// public long SignalID { get; set; } /// /// 记录类型 /// public Model.eMonitorType RecordType { get; set; } /// /// 数据日期 /// public DateTime DataDay { get; set; } /// /// 数据小时 /// public int DataHour { get; set; } /// /// 原始时间 /// public DateTime? SrcTime { get; set; } /// /// 原始值 /// public string SrcValue { get; set; } /// /// 数据时间 /// public DateTime DataTime { get; set; } /// /// 数据值 /// public string DataValue { get; set; } /// /// 数据状态 /// public List DataStatus { get; set; } } }