namespace Yw.Application
|
{
|
/// <summary>
|
/// 泵曲线
|
/// </summary>
|
public class PumpChartDto
|
{
|
|
/// <summary>
|
///
|
/// </summary>
|
public PumpChartDto() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public PumpChartDto(Model.PumpCurve rhs)
|
{
|
this.Name = rhs.Name;
|
this.SourceWay = rhs.SourceWay;
|
this.CreateMethod = rhs.CreateMethod;
|
//this.CoordParas = rhs.CoordParas;
|
//this.CurveInfo = rhs.CurveInfo;
|
this.ReliabilityStatus = rhs.ReliabilityStatus;
|
this.InputTime = rhs.InputTime;
|
this.CreateTime = rhs.CreateTime;
|
this.CreateUserID = rhs.CreateUserID;
|
this.CreateUserName = rhs.CreateUserName;
|
this.UpdateTime = rhs.UpdateTime;
|
this.UpdateUserID = rhs.UpdateUserID;
|
this.UpdateUserName = rhs.UpdateUserName;
|
this.Description = rhs.Description;
|
|
_dictChartObject = new Dictionary<string, object>();
|
if(rhs.CurveInfo != null && rhs.CurveInfo.CurveQH != null)
|
{
|
//最大叶轮曲线
|
List<Yw.Curve.CurvePoint> qhPointMax = Yw.Curve.FitHelper.GetFitPoints(rhs.CurveInfo.CurveQH, 20);
|
List<Yw.Curve.CurvePoint> qePointMax = Yw.Curve.FitHelper.GetFitPoints(rhs.CurveInfo.CurveQE, 14);
|
List<Yw.Curve.CurvePoint> qpPointMax = Yw.Curve.FitHelper.GetFitPoints(rhs.CurveInfo.CurveQP, 14);
|
//List<Yw.Curve.CurvePoint> npshPointMax = Yw.Curve.FitHelper.GetFitPoints(_maxCurveGrp.CurveExpressNPSH, 8);
|
|
if (!string.IsNullOrEmpty(rhs.CoordParas))
|
{
|
var lxp = new Yw.Coordinate.LxpCoordinateParas(rhs.CoordParas);
|
_dictChartObject["Coordinate"] = new Yw.Dto.CoordinateParasLxp(lxp);
|
}
|
else
|
{
|
var lxp = Yw.Coordinate.CoordinateHelper.CalcCoordinate(qhPointMax, qePointMax, qpPointMax);
|
_dictChartObject["Coordinate"] = new Yw.Dto.CoordinateParasLxp(lxp);
|
}
|
|
_dictChartObject["MaxCurveQH"] = BuildDispElement4UI(qhPointMax);
|
_dictChartObject["MaxCurveQE"] = BuildDispElement4UI(qePointMax);
|
_dictChartObject["MaxCurveQP"] = BuildDispElement4UI(qpPointMax);
|
//_dictChartObject["MaxWaterCurveNPSH"] = BuildDispElement4UI(npshPointMax);
|
}
|
|
}
|
//传入到前端,没必要有过多小数点
|
private List<Yw.Curve.CurvePoint> BuildDispElement4UI(List<Yw.Curve.CurvePoint> points)
|
{
|
if (points != null && points.Count > 0)
|
{
|
foreach (var pt in points)
|
{
|
if (pt != null)
|
{
|
pt.X = Math.Round(pt.X, 3);
|
pt.Y = Math.Round(pt.Y, 3);
|
}
|
}
|
}
|
return points;
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public virtual long ID { get; set; }
|
/// <summary>
|
/// 名称
|
/// </summary>
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 来源方式
|
/// </summary>
|
public eSourceWay SourceWay { get; set; }
|
|
/// <summary>
|
/// 创建方法
|
/// </summary>
|
public string CreateMethod { get; set; }
|
|
|
private Dictionary<string, object> _dictChartObject = null;
|
/// <summary>
|
///
|
/// </summary>
|
public Dictionary<string, object> DictChartObject { get { return _dictChartObject; }set { _dictChartObject = value; } }
|
/// <summary>
|
/// 可信度
|
/// </summary>
|
public eReliabilityStatus ReliabilityStatus { get; set; }
|
|
/// <summary>
|
/// 录入时间
|
/// </summary>
|
public DateTime InputTime { get; set; }
|
|
/// <summary>
|
/// 创建时间
|
/// </summary>
|
public DateTime CreateTime { get; set; }
|
|
/// <summary>
|
/// 创建人id
|
/// </summary>
|
public long CreateUserID { get; set; }
|
|
/// <summary>
|
/// 创建人名称
|
/// </summary>
|
public string CreateUserName { get; set; }
|
|
/// <summary>
|
/// 更新时间
|
/// </summary>
|
public DateTime? UpdateTime { get; set; }
|
|
/// <summary>
|
/// 更新人id
|
/// </summary>
|
public long? UpdateUserID { get; set; }
|
|
/// <summary>
|
/// 更新人名称
|
/// </summary>
|
public string UpdateUserName { get; set; }
|
|
/// <summary>
|
/// 说明
|
/// </summary>
|
public string Description { get; set; }
|
|
|
}
|
|
}
|