From 9eb94e9eec2e2e164698e34d0481d66093c8655b Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期三, 15 一月 2025 17:40:55 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs | 28 +++++++++++++++++++++------- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs index 7b90309..4158f0a 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/14-matching/00-core/HydroMatchingHelper.cs @@ -1,8 +1,4 @@ -锘縰sing DevExpress.XtraSpreadsheet.Model.CopyOperation; -using System.Windows.Media.Imaging; -using Yw.DAL.Basic; -using Yw.EPAnet; -using Yw.Hydro; +锘縰sing Yw.Hydro; using Yw.Model; namespace Yw.WinFrmUI @@ -2591,9 +2587,15 @@ /// <summary> /// 搴旂敤 /// </summary> - public static bool Apply(HydroPumpViewModel visualViewModel, HydroPumpMatchingViewModel matching) + public static bool Apply + ( + HydroPumpViewModel visualViewModel, + HydroPumpMatchingViewModel matching, + HydroChangeHelper changeHelper = null, + HydroPropStatusHelper propStatusHelper = null + ) { - var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching); + var bol = Apply(visualViewModel.HydroInfo, visualViewModel.Vmo, matching, changeHelper, propStatusHelper); visualViewModel.UpdateProperty(); return bol; } @@ -2740,6 +2742,9 @@ } hydroInfo.Curves.Add(curveqh); visual.CurveQH = curveqh.Code; + changeHelper?.Append(curveqh, eChangeType.Add); + changeHelper?.Append(visual, eChangeType.Update); + propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.CurveQH), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}閫氳繃浜у搧閰嶇疆鍖归厤淇敼"); result = true; } else @@ -2748,6 +2753,7 @@ { curveqh.DbId = matching.MatchingCurveDbId; curveqh.CurveData = matching.MatchingCurveQH?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList(); + changeHelper?.Append(curveqh, eChangeType.Update); result = true; } } @@ -2771,6 +2777,9 @@ } hydroInfo.Curves.Add(curveqp); visual.CurveQP = curveqp.Code; + changeHelper?.Append(curveqp, eChangeType.Add); + changeHelper?.Append(visual, eChangeType.Update); + propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.CurveQP), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}閫氳繃浜у搧閰嶇疆鍖归厤淇敼"); result = true; } else @@ -2779,6 +2788,7 @@ { curveqp.DbId = matching.MatchingCurveDbId; curveqp.CurveData = matching.MatchingCurveQP?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList(); + changeHelper?.Append(curveqp, eChangeType.Update); result = true; } } @@ -2802,6 +2812,9 @@ } hydroInfo.Curves.Add(curveqe); visual.CurveQE = curveqe.Code; + changeHelper?.Append(curveqe, eChangeType.Add); + changeHelper?.Append(visual, eChangeType.Update); + propStatusHelper?.UpdatePropStatus(visual.Code, nameof(visual.CurveQE), ePropStatus.Normal, $"{DateTime.Now.ToStandardString()}閫氳繃浜у搧閰嶇疆鍖归厤淇敼"); result = true; } else @@ -2810,6 +2823,7 @@ { curveqe.DbId = matching.MatchingCurveDbId; curveqe.CurveData = matching.MatchingCurveQE?.Select(x => new Yw.Model.Hydro.CurvePoint(x.X, x.Y)).ToList(); + changeHelper?.Append(curveqe, eChangeType.Update); result = true; } } -- Gitblit v1.9.3