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; }
|
}
|
}
|