duheng
2024-12-24 b826e3716742abba49ab2a851b943ea8328db66e
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs
@@ -1470,15 +1470,20 @@
                {
                    if (input.DbId == null)
                        input.MatchingDbId = vmo.ID.ToString();
                    if (input.ModelType == null)
                    if (input.ModelType == null && input.ModelType == string.Empty)
                        input.MatchingModelType = vmo.Name;
                    if (input.DN < 0)
                    if (input.DN <= 0)
                        input.MatchingDN = vmo.DN;
                    if (input.MinLevel < 0)
                    if (input.MinLevel <= 0)
                        input.MatchingMinLevel = vmo.MinLevel;
                    input.MatchingOverFlow = vmo.OverFlow;
                    if (input.MinVol <= 0)
                        input.MatchingMinVol = vmo.MinVol;
                    if (input.MaxLevel <= 0)
                        input.MatchingMaxLevel = vmo.MaxLevel;
                    if (input.CurveDbId == null)
                    {
                        var list = Task.Run(async () => await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(HStation.Assets.DataType.ValveMain, vmo.ID)).Result;
                        var list = Task.Run(async () => await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(HStation.Assets.DataType.TankMain, vmo.ID)).Result;
                        if (list != null && list.Count > 0)
                        {
                            var def = list.OrderByDescending(x => x.Importance).First();
@@ -1499,6 +1504,9 @@
                    input.MatchingDN = vmo.DN;
                    input.MatchingMinLevel = vmo.MinLevel;
                    input.MatchingOverFlow = vmo.OverFlow;
                    input.MatchingMinVol = vmo.MinVol;
                    input.MatchingMaxLevel = vmo.MaxLevel;
                    var list = Task.Run(async () => await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(HStation.Assets.DataType.ValveMain, vmo.ID)).Result;
                    if (list != null && list.Count > 0)
                    {