From a434b83043a5646d5dd99c3e934cc8a30ac6165f Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期二, 29 十月 2024 13:29:35 +0800 Subject: [PATCH] 曲线修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs index bcd9e9b..55d9941 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs @@ -158,9 +158,13 @@ return true; } var structOthersFileInfo = allFileInfoList.Find(x => x.Name == HStation.Revit.ConstParas.StructOthersFileName); - var structRevitModel = HStation.Service.RevitParseHelper.FromJsonFile (structFileInfo.FullName, structOthersFileInfo?.FullName, out bool structFileResult, out List<string> structFileMsgList); + //瑙f瀽缁撴灉鍒ゆ柇 + if (!structFileResult) + { + structFileMsgList?.ForEach(x => feedBackMsg?.Invoke(x, Color.Red)); + } //Revit灞炴�ч敊璇鐞� var hasRevitPropError = false; if (structRevitModel != null) @@ -180,33 +184,28 @@ { case Revit.ePropStatus.Error: { - feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.Code}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛岄敊璇細{revitParterPropStatus.StatusInfo} ", Color.Red); + feedBackMsg?.Invoke($"鏋勪欢绫诲瀷锛歿revitParter.Catalog}锛屾瀯浠剁紪鐮侊細{revitParter.Code}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛岄敊璇細{revitParterPropStatus.StatusInfo} ", Color.Red); } break; case Revit.ePropStatus.Lack: { - feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.Code}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛岀己鐪侊細{revitParterPropStatus.StatusInfo} ", Color.Gray); + //feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.Id}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛岀己鐪侊細{revitParterPropStatus.StatusInfo} ", Color.Gray); } break; case Revit.ePropStatus.Abnormal: { - feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.Code}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛屽紓甯革細{revitParterPropStatus.StatusInfo} ", Color.Orange); + //feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.Id}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛屽紓甯革細{revitParterPropStatus.StatusInfo} ", Color.Orange); } break; + + default: break; } } } } } - - //瑙f瀽缁撴灉鍒ゆ柇 - if (!structFileResult) - { - structFileMsgList?.ForEach(x => feedBackMsg?.Invoke(x, Color.Red)); - } - if (hasRevitPropError || !structFileResult) { feedBackMsg?.Invoke($"姘村姏缁撴瀯鏂囦欢瑙f瀽閿欒锛侊紒锛�", Color.Red); @@ -214,6 +213,8 @@ feedBackProgress?.Invoke(100, 100); return true; } + + vm.RevitModel = structRevitModel; var hydroInfo = HStation.Hydro.TransferHelper.FromRevit(structRevitModel, out msg); if (hydroInfo == null) @@ -235,12 +236,12 @@ feedBackMsg?.Invoke("姝e湪杩涜浜у搧鍖归厤...", Color.Black); hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId); - var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo); + var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo, null); if (AssetsMatchingHelper.Matching(matchingParas, out string error)) { if (AssetsMatchingParasHelper.Apply(hydroInfo, matchingParas)) { - feedBackMsg?.Invoke("浜у搧鍖归厤鎴愬姛銆傘�傘��", Color.Green); + feedBackMsg?.Invoke("浜у搧鍖归厤瀹屾垚銆傘�傘��", Color.Green); } else { @@ -310,8 +311,8 @@ return true; } - // var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//涓婁紶 - var bimfaceId = 10000878572231; //娴嬭瘯鐢ㄤ緥 + //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//涓婁紶 + var bimfaceId = 10000884893369; //娴嬭瘯鐢ㄤ緥 10000878572231 10000882826621 10000884283372 10000884362886 10000884702464 10000884893369 if (bimfaceId < 1) { feedBackMsg?.Invoke("Revit妯″瀷鏂囦欢涓婁紶澶辫触锛侊紒锛�", Color.Red); -- Gitblit v1.9.3