using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IStation.Dto.DispatchAna
{
///
/// 泵站调度的测点记录
///
public class StationSignalRecord
{
///
///
///
public class RecordValue
{
///
///
///
public RecordValue( )
{
}
///
///
///
///
public RecordValue(IStation.Calculation.DispatchAna.Model.CurrentRecordBundle.RecordValue m)
{
this.Name = m.Name;
this.Value = m.Value;
}
///
///
///
public string Name { get; set; }
///
/// /
///
public double Value { get; set; }
}
///
///
///
public StationSignalRecord( )
{
}
///
/// /
///
///
public StationSignalRecord(StationEtaAnaRecord anaRecord)
{
this.PressValueType = 1;//1:表示扬程
if (anaRecord.Q != null)
{
this.FlowList = new List();
this.FlowList.Add(new StationSignalRecord.RecordValue() { Value = anaRecord.Q.Value });
}
if (anaRecord.H != null)
{
this.PressList = new List();
this.PressList.Add(new StationSignalRecord.RecordValue() { Value = anaRecord.H.Value });
}
}
///
///
///
///
public StationSignalRecord(IStation.Calculation.DispatchAna.Model.CurrentRecordBundle signalRecord )
{
this.PressValueType = 0;//0:表示压力
if(signalRecord.FlowList != null)
{
this.FlowList = new List();
foreach (var flow in signalRecord.FlowList)
{
this.FlowList.Add(new RecordValue(flow));
}
}
if (signalRecord.PressList != null)
{
this.PressList = new List();
foreach (var flow in signalRecord.PressList)
{
this.PressList.Add(new RecordValue(flow));
}
}
if (signalRecord.WaterLevelList != null)
{
this.WaterLevelList = new List();
foreach (var flow in signalRecord.WaterLevelList)
{
this.WaterLevelList.Add(new RecordValue(flow));
}
}
if (signalRecord.VavleOpenList != null)
{
this.VavleOpenList = new List();
foreach (var flow in signalRecord.VavleOpenList)
{
this.VavleOpenList.Add(new RecordValue(flow));
}
}
}
///
/// 压力值类型 0:表示压力 1:表示扬程
///
public int PressValueType { get; set; }
///
/// 流量
///
public List FlowList { get; set; }
///
/// 压力/扬程
///
public List PressList { get; set; }
///
/// 水位
///
public List WaterLevelList { get; set; }
///
/// 阀门
///
public List VavleOpenList { get; set; }
}
}