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
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
 
namespace IStation.Vm
{
    public class StationScheduleVm
    {
        public StationScheduleVm() { }
        public StationScheduleVm(StationScheduleVm rhs) 
        {
            this.Name= rhs.Name;
            this.Flag= rhs.Flag;
            this.Time= rhs.Time;    
            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.PumpSchedules= rhs.PumpSchedules?.ToList();
        }
 
        [Display(Name = "名称")]
        public string Name { get; set; }
 
        [Display(Name = "标志")]
        public int Flag { get; set; }
 
 
        [Display(Name = "时间")]
        public DateTime Time { 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 List<PumpScheduleVm> PumpSchedules { get; set; }
 
 
        public void Round()
        { 
            this.TargetFlow = Round(this.TargetFlow, 1);
            this.CalcFlow = Round(this.CalcFlow, 1);
            this.FlowDeviation = Round(this.FlowDeviation, 1);
             
            this.TargetPressure = Round(this.TargetPressure, 3);
            this.CalcPressure = Round(this.CalcPressure, 3);
            this.PressureDeviation = Round(this.PressureDeviation, 3); 
        }
 
        private double Round(  double value, int digits = 0)
        {
            return Math.Round(value, digits);
        }
 
      
 
 
    }
}