using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Application { /// /// 监测记录 /// public class MonitorRecordDto { /// /// /// public MonitorRecordDto() { } /// /// /// public MonitorRecordDto(Model.MonitorBasicRecord rhs) { this.CorpID = rhs.CorpID; this.MonitorPointID = rhs.MonitorPointID; this.SignalID = rhs.SignalID; this.RecordType = rhs.RecordType; this.SrcTime = rhs.SrcTime; this.SrcValue= rhs.SrcValue; this.DataTime = rhs.DataTime; this.DataValue = rhs.DataValue; this.DataStatus = rhs.DataStatus; } /// /// /// public MonitorRecordDto(Model.MonitorBasicRecord 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? SrcTime { get; set; } /// /// 原始值 /// public string SrcValue { get; set; } /// /// 数据时间 /// public DateTime DataTime { get; set; } /// /// 数据值 /// public string DataValue { get; set; } /// /// 数据状态 /// public List DataStatus { get; set; } } }