Shuxia Ning
2024-11-06 adf8dc1c7cae1b12f486dcdb3d7daf4a5a59ec52
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
using System;
using System.ComponentModel.DataAnnotations;
 
namespace IStation.Vm
{
    public class PumpScheduleVm
    {
    
        public PumpScheduleVm() { }
        public PumpScheduleVm(PumpScheduleVm rhs)
        { 
            this.Flag = rhs.Flag;
            this.WL = rhs.WL;
            this.TargetRpm = rhs.TargetRpm;
            this.CalcRpm = rhs.CalcRpm;
            this.RpmDeviation = rhs.RpmDeviation;
            this.TargetFlow = rhs.TargetFlow;
            this.CalcFlow = rhs.CalcFlow;
            this.FlowDeviation = rhs.FlowDeviation;
            //this.TargetPressure = rhs.TargetPressure;
            //this.CalcPressure = rhs.CalcPressure;
            this.PressureDeviation = rhs.PressureDeviation;
            this.TargetHead = rhs.TargetHead;
            this.CalcHead = rhs.CalcHead;
            this.TargetPressureDiff = rhs.TargetPressureDiff;
            this.CalcPressureDiff = rhs.CalcPressureDiff;
        }
 
 
 
        [Display(Name = "泵")]
        public int Flag { get; set; }
         
 
        [Display(Name = "水位")]
        public double? WL { get; set; }
 
         
 
        [Display(Name = "目标转速")]
        public double? TargetRpm { get; set; }
 
        [Display(Name = "计算转速")]
        public double? CalcRpm { get; set; }
 
        [Display(Name = "转速偏差")]
        public double? RpmDeviation { get; set; } 
         
 
        [Display(Name = "目标流量")]
        public double? TargetFlow { get; set; }
 
        [Display(Name = "计算流量")]
        public double? CalcFlow { get; set; }
 
        [Display(Name = "流量偏差")]
        public double? FlowDeviation { get; set; }
          
 
        //[Display(Name = "目标压力")]
        //public double? TargetPressure { get; set; }
 
        //[Display(Name = "计算压力")]
        //public double? CalcPressure { get; set; }
 
        [Display(Name = "压力偏差")]
        public double? PressureDeviation { get; set; }
         
        [Display(Name = "目标扬程")]
        public double? TargetHead { get; set; }
 
        [Display(Name = "计算扬程")]
        public double? CalcHead { get; set; }
 
 
        [Display(Name = "目标压差")]
        public double? TargetPressureDiff { get; set; }
 
        [Display(Name = "计算压差")]
        public double? CalcPressureDiff { get; set; }
 
        public void Round()
        {
            this.WL = Round(this.WL, 2); 
             
            this.TargetRpm = Round(this.TargetRpm, 2);
            this.CalcRpm = Round(this.CalcRpm, 2);
            this.RpmDeviation = Round(this.RpmDeviation, 2); 
             
            this.TargetFlow = Round(this.TargetFlow, 1);
            this.CalcFlow = Round(this.CalcFlow, 1);
            this.FlowDeviation = Round(this.FlowDeviation, 1);
              
            //this.TargetPressure = Round(this.TargetPressure, 2);
            //this.CalcPressure = Round(this.CalcPressure, 2);
            this.PressureDeviation = Round(this.PressureDeviation, 2);
 
            this.TargetHead = Round(this.TargetHead, 2);
            this.CalcHead = Round(this.CalcHead, 2);
            this.TargetPressureDiff = Round(this.TargetPressureDiff, 2);
            this.CalcPressureDiff = Round(this.CalcPressureDiff, 2);
 
 
        }
 
        private double? Round(double? value, int digits = 0)
        {
            if (value == null) return null;
            return Math.Round(value.Value, digits);
        }
 
        public void Clear()
        {  
            this.CalcRpm=null;
            this.RpmDeviation = null; 
 
            this.CalcFlow = null;
            this.FlowDeviation = null;
             
            this.PressureDeviation = null;
 
           
 
        }
 
 
    }
}