using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.Application
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public class PumpCurveLogicDto
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public PumpCurveLogicDto() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public PumpCurveLogicDto(Model.PumpCurveExMapping rhs)
|
{
|
this.CorpID = rhs.CorpID;
|
this.MappingID = rhs.MappingID;
|
this.CurveID = rhs.ID;
|
this.PumpID = rhs.PumpID;
|
this.CurveCode = rhs.CurveCode;
|
this.SourceFrom = rhs.SourceFrom;
|
this.CreateMethod = rhs.CreateMethod;
|
this.Description = rhs.Description;
|
this.OtherName = rhs.OtherName;
|
this.SortCode = rhs.SortCode;
|
this.IsWorking = rhs.IsWorking;
|
this.PointQH = rhs.CurveInfo?.CurveQH?.GetFitPoints(20)?.Select(x => new CurvePointDto(x.X, x.Y)).ToList();
|
this.PointQP = rhs.CurveInfo?.CurveQP?.GetFitPoints(20)?.Select(x => new CurvePointDto(x.X, x.Y)).ToList();
|
this.PointQE = rhs.CurveInfo?.CurveQE?.GetFitPoints(20)?.Select(x => new CurvePointDto(x.X, x.Y)).ToList();
|
if (rhs.CoordParas == null)
|
rhs.CoordParas = Model.CurveCoordinateParas.CalcCoordinate(rhs.CurveInfo);
|
if (rhs.CoordParas != null)
|
{
|
var coord = rhs.CoordParas;
|
this.CurveRangeQ = new CurveAxisCoordinateDto(coord.DispMaxQ(), coord.CoordMinQ, coord.CoordSpaceQ);
|
this.CurveRangeH = new CurveAxisCoordinateDto(coord.DispMaxH(), coord.DispMinH(), coord.CoordSpaceH);
|
this.CurveRangeP = new CurveAxisCoordinateDto(coord.DispMaxP(), coord.DispMinP(), coord.CoordSpaceP);
|
this.CurveRangeE = new CurveAxisCoordinateDto(coord.DispMaxE(), coord.DispMinE(), coord.CoordSpaceE);
|
}
|
}
|
|
/// <summary>
|
/// 客户标识
|
/// </summary>
|
public long CorpID { get; set; }
|
|
/// <summary>
|
/// 映射标识
|
/// </summary>
|
public long MappingID { get; set; }
|
|
/// <summary>
|
/// 曲线标识
|
/// </summary>
|
public long CurveID { get; set; }
|
|
/// <summary>
|
/// 泵标识
|
/// </summary>
|
public long PumpID { get; set; }
|
|
/// <summary>
|
/// 曲线编码
|
/// </summary>
|
public string CurveCode { get; set; }
|
|
/// <summary>
|
/// 来源类型
|
/// </summary>
|
public Model.eCurveSourceFrom SourceFrom { get; set; }
|
|
/// <summary>
|
/// 创建方法
|
/// </summary>
|
public Model.eCurveCreateMethod CreateMethod { get; set; }
|
|
/// <summary>
|
/// 说明
|
/// </summary>
|
public string Description { get; set; }
|
|
/// <summary>
|
/// 别名
|
/// </summary>
|
public string OtherName { get; set; }
|
|
/// <summary>
|
/// 排序码
|
/// </summary>
|
public int SortCode { get; set; }
|
|
/// <summary>
|
/// 是否为工作曲线
|
/// </summary>
|
public bool IsWorking { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public List<CurvePointDto> PointQH { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public List<CurvePointDto> PointQE { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public List<CurvePointDto> PointQP { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public CurveAxisCoordinateDto CurveRangeQ { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public CurveAxisCoordinateDto CurveRangeH { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public CurveAxisCoordinateDto CurveRangeP { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public CurveAxisCoordinateDto CurveRangeE { get; set; }
|
}
|
}
|