lixiaojun
2024-10-22 530dbe6d17bea0fd9dfcde66167eb9008b97d7ba
Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0
已修改7个文件
119 ■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/02-chart-edit/PumpPerform2dEditChart.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/02-chart-edit/PumpPerform2dEditCtrl.cs 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/02-chart-edit/PumpPerform2dEditDlg.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/02-valve-chart/02-chart-edit/ValvePerform2dEditCtrl.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/02-valve-chart/02-chart-edit/ValvePerform2dEditDlg.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/99-models/01-coordinate/PumpCoordinate_Disp.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs
@@ -28,11 +28,12 @@
            {
                InitData(pump_mian_id, null);
            }
        }
        private Yw.Geometry.CubicSpline2d _qh, _qe, _qp;
        private Yw.Geometry.Point2d _work_pt;
        private double _rated_speed;
        private double _rated_speed=50;
        private async void InitData(long pump_main_id, Yw.Geometry.Point2d work_pt)
        {
@@ -78,37 +79,49 @@
            var qe = new Yw.Geometry.CubicSpline2d(points_qe);
            var qp = new Yw.Geometry.CubicSpline2d(points_qp);
            InitChart(qh, qe, qp, work_pt, pump_main.RatedSpeed);
            InitChart(qh, qe, qp, work_pt, pump_main.RatedSpeed, pump_main.RatedSpeed, 50);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="qh">流量扬程线</param>
        /// <param name="qe">流量效率线</param>
        /// <param name="qp">流量功率线</param>
        /// <param name="work_pt">工作点</param>
        /// <param name="rated_spped">额定转速</param>
        /// <param name="current_speed">当前转速</param>
        /// <param name="current_hz">当前频率</param>
        public void InitChart(
            Yw.Geometry.CubicSpline2d qh,
            Yw.Geometry.CubicSpline2d qe,
            Yw.Geometry.CubicSpline2d qp,
            Yw.Geometry.Point2d work_pt,
            double rated_speed)
            double rated_spped,
            double current_speed,
            double current_hz)
        {
            _qh = qh;
            _qe = qe;
            _qp = qp;
            _work_pt = work_pt;
            _rated_speed = rated_speed;
            _rated_speed = rated_spped;
            this.pumpPerformCompareChart1.SetBindingData(_qh, _qe, _qp);
            if (work_pt != null)
            {
                var calc_speed = PumpCalcHelper.GetSimuValue(qh, work_pt, rated_speed);
                var calc_hz = calc_speed / rated_speed * 50;
                var calc_hz = PumpCalcHelper.GetSimuValue(qh, work_pt, _rated_speed);
                calc_hz = Math.Round(calc_hz, 1);
                this.pumpPerformCompareInfoCtrl1.SetDesignPoint(work_pt, calc_hz);
            }
            var vm_vs = new Yw.WinFrmUI.Phart.PumpVariableSpeedInfoViewModel();
            vm_vs.Id = Guid.NewGuid().ToString();
            vm_vs.Name = rated_speed.ToString();
            vm_vs.RatedSpeed = rated_speed;
            vm_vs.CurrentSpeed = rated_speed;
            vm_vs.CurrentHz = 50;
            vm_vs.Name = current_hz.ToString();
            vm_vs.RatedSpeed = _rated_speed;
            vm_vs.CurrentSpeed = current_speed;
            vm_vs.CurrentHz = current_hz;
            vm_vs.Qh = _qh;
            vm_vs.Qe = _qe;
            vm_vs.Qp = _qp;
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/02-chart-edit/PumpPerform2dEditChart.cs
@@ -428,8 +428,8 @@
            }
            _axisYQE.SetAxisRange(_coordinate_paras.CoordMinE, _coordinate_paras.CoordMinE + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceE);
            _axisYQP.SetAxisRange(_coordinate_paras.CoordMinP, _coordinate_paras.CoordMinP + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceP);
            //_axisYQE.SetAxisRange(_coordinate_paras.CoordMinE-_coordinate_paras.CoordMinP, _coordinate_paras.CoordMinE + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceE);
            //_axisYQP.SetAxisRange(_coordinate_paras.DispMinP(), _coordinate_paras.CoordMinP + _coordinate_paras.GridNumberY * _coordinate_paras.CoordSpaceP);
        }
        /// <summary>
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/02-chart-edit/PumpPerform2dEditCtrl.cs
@@ -121,21 +121,34 @@
                    {
                        _qh_pt_list = points;
                        foreach (Yw.Geometry.Point2d pt in _qh_pt_list)
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
                        {
                            var x = Math.Round(pt.X, 2);
                            var y = Math.Round(pt.Y, 2);
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y));
                        }
                    }
                    break;
                case Yw.Pump.eCurveType.QE:
                    {
                        _qe_pt_list = points;
                        foreach (Yw.Geometry.Point2d pt in _qe_pt_list)
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
                        {
                            var x = Math.Round(pt.X, 2);
                            var y = Math.Round(pt.Y, 2);
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y));
                        }
                    }
                    break;
                case Yw.Pump.eCurveType.QP:
                    {
                        _qp_pt_list = points;
                        foreach (Yw.Geometry.Point2d pt in _qp_pt_list)
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
                        {
                            var x = Math.Round(pt.X, 2);
                            var y = Math.Round(pt.Y, 2);
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y));
                        }
                    }
                    break;
            }
@@ -216,19 +229,31 @@
                case Yw.Pump.eCurveType.QH:
                    {
                        foreach (Yw.Geometry.Point2d pt in _qh_pt_list)
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
                        {
                            var x = Math.Round(pt.X, 2);
                            var y = Math.Round(pt.Y, 2);
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y));
                        }
                    }
                    break;
                case Yw.Pump.eCurveType.QE:
                    {
                        foreach (Yw.Geometry.Point2d pt in _qe_pt_list)
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
                        {
                            var x = Math.Round(pt.X, 2);
                            var y = Math.Round(pt.Y, 2);
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y));
                        }
                    }
                    break;
                case Yw.Pump.eCurveType.QP:
                    {
                        foreach (Yw.Geometry.Point2d pt in _qp_pt_list)
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
                        {
                            var x = Math.Round(pt.X, 2);
                            var y = Math.Round(pt.Y, 2);
                            _fitCurvePoints.Add(new Yw.Geometry.Point2d(x, y));
                        }
                    }
                    break;
            }
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/02-chart-edit/PumpPerform2dEditDlg.cs
@@ -29,9 +29,9 @@
            Yw.Geometry.CubicSpline2d qh = null, qe = null, qp = null;
            qh = new Yw.Geometry.CubicSpline2d(curve_qh.FeatCurve.GetPointList());
            if (qe != null)
            if (curve_qe != null)
                qe = new Yw.Geometry.CubicSpline2d(curve_qe.FeatCurve.GetPointList());
            if (qp != null)
            if (curve_qp != null)
                qp = new Yw.Geometry.CubicSpline2d(curve_qp.FeatCurve.GetPointList());
            this.curveExpressEditCtrl1.SetBindingData(qh, qe, qp);
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/02-valve-chart/02-chart-edit/ValvePerform2dEditCtrl.cs
@@ -88,8 +88,11 @@
            _fitCurvePoints.Clear(); 
            _pt_ql_list = points;
            foreach (Yw.Geometry.Point2d pt in _pt_ql_list)
                _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y));
            {
                var x = Math.Round(pt.X, 2);
                var y = Math.Round(pt.Y, 2);
                _fitCurvePoints.Add(new Yw.Geometry.Point2d(x,y));
            }
            this.bindingSource1.ResetBindings(false);
        }
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/02-valve-chart/02-chart-edit/ValvePerform2dEditDlg.cs
@@ -23,8 +23,7 @@
            {
                return;
            } 
            this.curveExpressEditCtrl1.SetBindingData(ql);
        }
WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/99-models/01-coordinate/PumpCoordinate_Disp.cs
@@ -1,4 +1,8 @@
namespace Yw.WinFrmUI.Phart
using DevExpress.CodeParser;
using DevExpress.DataAccess.Native.Json;
using DevExpress.Diagram.Core.Shapes;
namespace Yw.WinFrmUI.Phart
{
    /// <summary>
    ///  
@@ -195,8 +199,8 @@
            var validGridNumH = 6;
            var coordinate_paras = new PumpCoordinate();
            coordinate_paras.GridNumberX = 10;
            coordinate_paras.GridNumberY = 18;
            coordinate_paras.GridNumberX = 10;//10
            coordinate_paras.GridNumberY = 18;//18
            CalcCoordinateQ(minQ, maxQ, ref coordinate_paras, coordinate_paras.GridNumberX);
            CalcCoordinateH(minH, maxH, validGridNumH, ref coordinate_paras, out double disMinH, out double disMaxH);
@@ -205,7 +209,7 @@
            if (maxE > minE + 0.01)
                CalcCoordinateE(minE, maxE, ref coordinate_paras);
            return coordinate_paras;
        }
@@ -352,7 +356,7 @@
        /// <param name="coordinate_paras">坐标Model</param>
        public static void CalcCoordinateP(double minP, double maxP, double disMaxH, int downGridNum, ref PumpCoordinate coordinate_paras)
        {
            int default_num = 5;
            int default_num = 7;
            int spaceNum = coordinate_paras.StartLineNoH - default_num - downGridNum;
            if (spaceNum < 3)
                spaceNum = 3;
@@ -370,6 +374,10 @@
                stratLineNoP--;
            }
            coordinate_paras.CoordSpaceP = coordSpaceP;
            coordinate_paras.EndLineNoP = endLineNoP;
            coordinate_paras.StartLineNoP = stratLineNoP;
@@ -378,13 +386,22 @@
            if (coordinate_paras.StartLineNoP < downGridNum)
            {
                int diff_num = downGridNum - coordinate_paras.StartLineNoP;
                coordinate_paras.EndLineNoP += diff_num;
                coordinate_paras.StartLineNoP += diff_num;
            }
            coordinate_paras.CoordMinH = GetByPlacesLength(disMaxH - (double)coordinate_paras.EndLineNoH * coordinate_paras.CoordSpaceH, 3);
            coordinate_paras.CoordMinH = GetByPlacesLength(disMaxH - (double)coordinate_paras.EndLineNoH * coordinate_paras.CoordSpaceH, 3);
            coordinate_paras.CoordMinP = GetByPlacesLength(disMaxP - (double)coordinate_paras.EndLineNoP * coordinate_paras.CoordSpaceP, 3);
            if (minP > 0 && minP < 10)
            {
                coordinate_paras.StartLineNoP = 0;
                coordinate_paras.EndLineNoP = endLineNoP;
                coordinate_paras.CoordSpaceP = coordSpaceP;
                coordinate_paras.CoordMinP = Math.Floor(minP);
            }
        }
        /// <summary>