duheng
2025-01-14 bee0b4fc0f1126dd10fb9d7be931121266f97f6e
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/00-core/AssetsMatchingHelper.cs
@@ -111,7 +111,7 @@
                    }
                }
                //喷头匹配
                //冷却塔匹配
                foreach (var item in assetsAutoMatchingView.Coolings)
                {
                    if (Matching(item, allCoolingMain))
@@ -417,7 +417,6 @@
            {
                input.MatchingValveSetting = valve.ValveSetting;
            }
            input.MatchingValveType = (Yw.WinFrmUI.eValveType)(int)valve.ValveType;
            if (input.CurveDbId == null)
            {
                var list = Task.Run(async () =>
@@ -427,26 +426,21 @@
                    var def = list.OrderByDescending(x => x.Importance).First();
                    input.MatchingCurveDbId = def.ID.ToString();
                    var curve = def.Diagram.GraphList[0].GetFeatPointList();
                    if (valve.ValveType == HStation.Assets.eValveType.GPV)
                    input.MatchingCurveQL = new List<HydroCurvePointViewModel>();
                    /*   foreach (var item in curve)
                       {
                           input.MatchingCurveQL.Add(new HydroCurvePointViewModel(item.X, item.Y));
                       }*/
                    input.MatchingCurveOL = new List<HydroCurvePointViewModel>();
                    foreach (var item in curve)
                    {
                        input.MatchingCurveQL = new List<HydroCurvePointViewModel>();
                        foreach (var item in curve)
                        {
                            input.MatchingCurveQL.Add(new HydroCurvePointViewModel(item.X, item.Y));
                        }
                    }
                    else if (valve.ValveType == HStation.Assets.eValveType.TCV)
                    {
                        input.MatchingCurveOL = new List<HydroCurvePointViewModel>();
                        foreach (var item in curve)
                        {
                            input.MatchingCurveOL.Add(new HydroCurvePointViewModel(item.X, item.Y));
                        }
                        input.MatchingCurveOL.Add(new HydroCurvePointViewModel(item.X, item.Y));
                    }
                }
                return true;
            }
            return true;
            return false;
        }
        //管道匹配
@@ -1774,7 +1768,10 @@
            {
                input.MatchingBendingAngle = elbow.Angle;
            }
            input.MatchingElbowType = (Yw.WinFrmUI.eElbowType)(int)elbow.ElbowType;
            if (elbow.ElbowType != null)
            {
                input.MatchingElbowType = (Yw.WinFrmUI.eElbowType)(int)elbow.ElbowType;
            }
            if (input.Material == null || input.Material == string.Empty)
            {
                input.MatchingMaterial = elbow.Material;