lixiaojun
2024-12-23 b9c79f595e5ad4684d731f968bf120ff8c52dbd8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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; }
 
 
    }
}