ningshuxia
2022-10-31 0171d347fec140d31db39ab5d76d51eebac472c2
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
129
130
131
132
133
134
135
136
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.Dto.DispatchAna
{
    /// <summary>
    /// 泵站调度的测点记录
    /// </summary>
    public class StationSignalRecord
    {
        /// <summary>
        /// 
        /// </summary>
        public class RecordValue
        {
            /// <summary>
            /// 
            /// </summary>
            public RecordValue( )
            {
            }
                /// <summary>
                /// 
                /// </summary>
                /// <param name="m"></param>
                public RecordValue(IStation.Calculation.DispatchAna.Model.CurrentRecordBundle.RecordValue m)
            {
                this.Name = m.Name;
                this.Value = m.Value;
            }
            /// <summary>
            /// 
            /// </summary>
            public string Name { get; set; }
            /// <summary>
            /// /
            /// </summary>
            public double Value { get; set; }
        }
        /// <summary>
        /// 
        /// </summary>
        public StationSignalRecord( )
        {
        }
          /// <summary>
          /// /
          /// </summary>
          /// <param name="anaRecord"></param>
        public StationSignalRecord(StationEtaAnaRecord anaRecord)
        {
            this.PressValueType = 1;//1:表示扬程
            if (anaRecord.Q != null)
            {
                this.FlowList = new List<StationSignalRecord.RecordValue>();
                this.FlowList.Add(new StationSignalRecord.RecordValue() { Value = anaRecord.Q.Value });
            }
            if (anaRecord.H != null)
            {
                this.PressList = new List<StationSignalRecord.RecordValue>();
                this.PressList.Add(new StationSignalRecord.RecordValue() { Value = anaRecord.H.Value });
            }
        }
        /// <summary>
        ///        
        /// </summary>
        /// <param name="signalRecord"></param>
        public StationSignalRecord(IStation.Calculation.DispatchAna.Model.CurrentRecordBundle signalRecord )
        {
            this.PressValueType = 0;//0:表示压力
            if(signalRecord.FlowList != null)
            {
                this.FlowList = new List<RecordValue>();
                foreach (var flow in signalRecord.FlowList)
                {
                    this.FlowList.Add(new RecordValue(flow));
                }
            }
 
            if (signalRecord.PressList != null)
            {
                this.PressList = new List<RecordValue>();
                foreach (var flow in signalRecord.PressList)
                {
                    this.PressList.Add(new RecordValue(flow));
                }
            }
 
            if (signalRecord.WaterLevelList != null)
            {
                this.WaterLevelList = new List<RecordValue>();
                foreach (var flow in signalRecord.WaterLevelList)
                {
                    this.WaterLevelList.Add(new RecordValue(flow));
                }
            }
 
            if (signalRecord.VavleOpenList != null)
            {
                this.VavleOpenList = new List<RecordValue>();
                foreach (var flow in signalRecord.VavleOpenList)
                {
                    this.VavleOpenList.Add(new RecordValue(flow));
                }
            }
        }
 
        /// <summary>
        /// 压力值类型 0:表示压力 1:表示扬程
        /// </summary>
        public int PressValueType { get; set; }
 
        /// <summary>
        /// 流量
        /// </summary>
        public List<RecordValue> FlowList { get; set; }
 
        /// <summary>
        /// 压力/扬程 
        /// </summary>
        public List<RecordValue> PressList { get; set; }
 
        /// <summary>
        /// 水位
        /// </summary>
        public List<RecordValue> WaterLevelList { get; set; }
 
        /// <summary>
        /// 阀门
        /// </summary>
        public List<RecordValue> VavleOpenList { get; set; }
    }
}