namespace Yw.Application.Health
{
///
///
///
public class SignalOnlineLogicDto
{
///
///
///
public SignalOnlineLogicDto() { }
///
///
///
public SignalOnlineLogicDto
(
Model.Signal_SignalType rhs,
Model.MonitorRecord monitorRecord,
Model.HealthQuotaEvaluationModel model,
Model.HealthQuotaEvaluationRecord evaluateRecord
)
{
this.ID = rhs.ID;
this.Name = rhs.Name;
this.FormatType = rhs.SignalType.FormatType;
this.DataTime = monitorRecord.DataTime;
this.DataValue = rhs.GetDisplayValue(monitorRecord.DataValue);
this.UnitName = rhs.GetDisplayUnitNames();
this.EvaluationList = model.GetEvaluationList();
this.SortCode = rhs.SortCode;
this.Description = rhs.Description;
if (evaluateRecord != null)
{
this.LastEvaluateTime = evaluateRecord.EvaluateTime;
this.LastEvaluateValue = Math.Round(evaluateRecord.EvaluateValue, 2);
}
}
///
/// id
///
public long ID { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// 来源类型
///
public Monitor.eSourceType SourceType { get; set; }
///
/// 数据格式
///
public Monitor.eFormatType FormatType { get; set; }
///
/// 数据时间
///
public DateTime DataTime { get; set; }
///
/// 数据值
///
public string DataValue { get; set; }
///
/// 单位
///
public string UnitName { get; set; }
///
/// 评价标准
///
public List EvaluationList { get; set; }
///
/// 上次评价时间
///
public DateTime? LastEvaluateTime { get; set; }
///
/// 上次评价值
///
public double? LastEvaluateValue { get; set; }
///
/// 排序码
///
public int SortCode { get; set; }
///
/// 说明
///
public string Description { get; set; }
}
}