lixiaojun
2024-12-02 dbcef6befb123066754141adef6dc3ef6653b6ce
WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/PumpParallelAnalyDlg.cs
@@ -18,12 +18,12 @@
            };
            this.pumpParallelInfoCtrl1.SetInfoEvent += (id, name, color) =>
            {
                this.pumpSerialParallelChart.SetInfo(id, name, color);
                this.pumpSerialParallelChart.Set(id, name, color);
            };
            this.pumpParallelInfoCtrl1.SetDesignPointEvent += (q, h) =>
            {
                this.pumpSerialParallelChart.SetEquipPt(new Point2d(q, h));
                this.pumpSerialParallelChart.SetDesignPoint(new Point2d(q, h));
            };
            this.pumpParallelInfoCtrl1.AddEvent += (vm) =>
@@ -38,7 +38,7 @@
                SetParallel(list);
            };
            this.pumpSerialParallelChart.OnCalcQueryPoint += (id, pt) =>
            this.pumpSerialParallelChart.QueryPointChangedEvent += (id, pt) =>
            {
                this.pumpParallelInfoCtrl1.SetQueryInfo(id, pt);
            };
@@ -47,6 +47,7 @@
                var list = this.pumpParallelInfoCtrl1.GetRunList();
                SetParallel(list);
            };
            this.pumpParallelInfoCtrl1.SaveEvent += () =>
            {
                var run_list = this.pumpParallelInfoCtrl1.GetRunList();
@@ -75,7 +76,7 @@
        private string _parallel_id = "parallel";
        public event Func<List<XhsSingleResultViewModel>, bool> ReloadDataEvent;
        /// <summary>
        /// 设置
@@ -105,21 +106,21 @@
                vm.Name = x.Name;
                vm.Code = x.Code;
                vm.IsBp = x.IsBp;
                vm.RatedSpeed = x.RatedSpeed;
                vm.CurrentSpeed = x.CurrentSpeed;
                vm.RatedN = x.RatedSpeed;
                vm.CurrentN = x.CurrentSpeed;
                vm.RunStatus = x.RunStatus;
                vm.CurrentHz = x.CurrentHz;
                var qh_pt_list = x.CurveQH.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                vm.Qh = new CubicSpline2d(qh_pt_list);
                vm.CurveQH = new CubicSpline2d(qh_pt_list);
                if (x.CurveQE != null && x.CurveQE.Any())
                {
                    var qe_pt_list = x.CurveQE.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                    vm.Qe = new CubicSpline2d(qe_pt_list);
                    vm.CurveQE = new CubicSpline2d(qe_pt_list);
                }
                if (x.CurveQP != null && x.CurveQP.Any())
                {
                    var qp_pt_list = x.CurveQP.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                    vm.Qp = new CubicSpline2d(qp_pt_list);
                    vm.CurveQP = new CubicSpline2d(qp_pt_list);
                }
                vm.CalcuQ = x.CalcuQ;
@@ -136,11 +137,11 @@
                var calc_flow = x.CalcuQ.Value;
                var calc_head = x.CalcuH.Value;
                var max_flow = vm.Qh.MaxX;
                var max_flow_head = vm.Qh.GetPointY(max_flow);
                var max_flow = vm.CurveQH.MaxX;
                var max_flow_head = vm.CurveQH.GetPointY(max_flow);
                var min_flow = vm.Qh.MinX;
                var min_flow_head = vm.Qh.GetPointY(min_flow);
                var min_flow = vm.CurveQH.MinX;
                var min_flow_head = vm.CurveQH.GetPointY(min_flow);
                if (max_flow_head < calc_head && min_flow_head > calc_head)
                    continue;
@@ -179,7 +180,7 @@
        private string SetParallel(List<Yw.WinFrmUI.Phart.PumpSerialParallelInfoViewModel> list)
        {
            var msg = "并联成功";
            this.pumpSerialParallelChart.Delete();
            this.pumpSerialParallelChart.Clear();
            if (list == null || !list.Any())
            {
                msg = "无数据";
@@ -244,9 +245,9 @@
            var vm_sp = new Yw.WinFrmUI.Phart.PumpSerialParallelInfoViewModel();
            vm_sp.Id = _parallel_id;
            vm_sp.Name = line_name;
            vm_sp.Qh = qh;
            vm_sp.Qe = qe;
            vm_sp.Qp = qp;
            vm_sp.CurveQH = qh;
            vm_sp.CurveQE = qe;
            vm_sp.CurveQP = qp;
            vm_sp.QhCalc = qh;
            vm_sp.QeCalc = qe;