using Yw.Model;
|
|
namespace Yw.WinFrmUI
|
{
|
/// <summary>
|
/// 工况监测点评价视图
|
/// </summary>
|
public class HydroWorkingMonitorEvaluationViewModel
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public HydroWorkingMonitorEvaluationViewModel() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public HydroWorkingMonitorEvaluationViewModel
|
(
|
HydroVisualInfo visual,
|
HydroMonitorVmo monitor,
|
HydroWorkingMonitorViewModel workingMonitor,
|
HydroCalcuVisualResult calcuResult
|
)
|
{
|
this.EvaluateName = visual.Name;
|
this.EvaluateItem = HydroMonitorPropHelper.GetName(monitor.PropName);
|
this.PropName = monitor.PropName;
|
this.UnitName = HydroMonitorPropHelper.GetUnit(monitor.PropName);
|
this.MonitorValue = workingMonitor.PropValue;
|
if (this.MonitorValue.HasValue)
|
{
|
this.MonitorValue = Math.Abs(Math.Round(this.MonitorValue.Value, 2));
|
}
|
this.CalcuValue = calcuResult?.GetCalcuValue(monitor.PropName);
|
if (this.CalcuValue.HasValue)
|
{
|
this.CalcuValue = Math.Abs(Math.Round(this.CalcuValue.Value, 2));
|
}
|
if (this.MonitorValue.HasValue && this.CalcuValue.HasValue)
|
{
|
if (this.MonitorValue.Value > 0)
|
{
|
this.EvaluateError = Math.Round(Math.Abs(this.CalcuValue.Value - this.MonitorValue.Value) / this.MonitorValue.Value * 100, 1);
|
}
|
}
|
}
|
|
/// <summary>
|
/// 评估构件
|
/// </summary>
|
[DisplayName("评估构件")]
|
public string EvaluateName { get; set; }
|
|
/// <summary>
|
/// 评估项
|
/// </summary>
|
[DisplayName("评估项")]
|
public string EvaluateItem { get; set; }
|
|
/// <summary>
|
/// 属性名称
|
/// </summary>
|
[DisplayName("属性名称")]
|
public string PropName { get; set; }
|
|
/// <summary>
|
/// 单位
|
/// </summary>
|
[DisplayName("单位")]
|
public string UnitName { get; set; }
|
|
/// <summary>
|
/// 监测值
|
/// </summary>
|
[DisplayName("监测值")]
|
public double? MonitorValue { get; set; }
|
|
/// <summary>
|
/// 计算值
|
/// </summary>
|
[DisplayName("计算值")]
|
public double? CalcuValue { get; set; }
|
|
/// <summary>
|
/// 评估误差
|
/// </summary>
|
[DisplayName("评估误差")]
|
public double? EvaluateError { get; set; }
|
|
|
}
|
}
|