From 26f45822a2a84af81e20ca543da98d3b822c5afd Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 17 二月 2025 21:25:59 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs | 302 +++++++++++++++++++++++--------------------------- 1 files changed, 138 insertions(+), 164 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 37ef2ae..92b38e5 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 @@ -1,9 +1,4 @@ 锘縰sing Castle.Core.Internal; -using DevExpress.XtraEditors; -using HStation.Model; -using HStation.Vmo; -using static DevExpress.XtraEditors.XtraInputBox; -using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window; namespace HStation.WinFrmUI { @@ -46,35 +41,36 @@ #region 绗簩姝� 鍒涘缓椤圭洰锛堣繘搴� 10%锛� - feedBackMsg?.Invoke("姝e湪鍒涘缓椤圭洰...", Color.Black); - - var project = new Vmo.XhsProjectExtensionsVmo(); - project.NO = vm.NO; - project.Name = vm.Name; - project.Address = vm.Address; - project.Customer = vm.Customer; - project.Flags = vm.Flags; - project.TagName = vm.TagName; - project.Description = vm.Description; - project.SiteList = new List<XhsProjectSiteVmo>() - { - new XhsProjectSiteVmo() - { - Name=vm.Name, - Description=vm.Description - } - }; - - var projectId = await BLLFactory<HStation.BLL.XhsProjectExtensions>.Instance.Insert(project); - if (projectId < 1) + //鍒ゆ柇椤圭洰鏁版嵁鍚堟硶鎬� + if (vm.Project == null) { - feedBackMsg?.Invoke("椤圭洰鍒涘缓澶辫触锛侊紒锛�", Color.Red); + feedBackMsg?.Invoke("椤圭洰鏁版嵁鍒濆鍖栭敊璇紒锛侊紒", Color.Red); return false; } - feedBackMsg?.Invoke("椤圭洰鍒涘缓鎴愬姛銆傘�傘��", Color.Green); - - vm.ProjectID = projectId; + if (vm.Project.ID < 1) + { + feedBackMsg?.Invoke("姝e湪鍒涘缓椤圭洰...", Color.Black); + vm.Project.ID = await BLLFactory<HStation.BLL.XhsProjectExtensions>.Instance.Insert(vm.Project); + if (vm.Project.ID < 1) + { + feedBackMsg?.Invoke("椤圭洰鍒涘缓澶辫触锛侊紒锛�", Color.Red); + return false; + } + vm.Project = await BLLFactory<HStation.BLL.XhsProjectExtensions>.Instance.GetByID(vm.Project.ID); + feedBackMsg?.Invoke("椤圭洰鍒涘缓鎴愬姛銆傘�傘��", Color.Green); + } + else + { + feedBackMsg?.Invoke("姝e湪鏇存柊椤圭洰...", Color.Black); + if (!await BLLFactory<HStation.BLL.XhsProjectExtensions>.Instance.Update(vm.Project)) + { + feedBackMsg?.Invoke("椤圭洰鏇存柊澶辫触锛侊紒锛�", Color.Red); + return false; + } + vm.Project = await BLLFactory<HStation.BLL.XhsProjectExtensions>.Instance.GetByID(vm.Project.ID); + feedBackMsg?.Invoke("椤圭洰鏇存柊鎴愬姛銆傘�傘��", Color.Green); + } feedBackProgress?.Invoke(100, 10); @@ -82,33 +78,39 @@ #region 绗笁姝� 璁剧疆鍦板浘浣嶇疆锛堣繘搴� 20%锛� - feedBackMsg?.Invoke("姝e湪璁剧疆鍦板浘浣嶇疆...", Color.Black); - - if (vm.Location != null) + //宸叉湁鍦板浘淇℃伅鎵嶉渶瑕佽繘琛岃缃� + if (vm.MapInfo != null) { - var mapInfo = new Yw.Vmo.MapInfoVmo(); - mapInfo.ObjectType = HStation.Xhs.DataType.XhsProject; - mapInfo.ObjectID = projectId; - mapInfo.ObjectName = project.Name; - mapInfo.Purpose = Yw.Map.Purpose.Location; - mapInfo.Kind = Yw.Map.Kind.Gaodei; - mapInfo.Shape = Yw.Map.Shape.Marker; - mapInfo.Position = vm.Location.ToJson(); - - var mapInfoId = await BLLFactory<Yw.BLL.MapInfo>.Instance.Insert(mapInfo); - if (mapInfoId < 1) + feedBackMsg?.Invoke("姝e湪璁剧疆浣嶇疆淇℃伅...", Color.Black); + vm.MapInfo.ObjectID = vm.Project.ID; + vm.MapInfo.ObjectName = vm.Project.Name; + if (vm.MapInfo.ID < 1) { - feedBackMsg?.Invoke("璁剧疆鍦板浘浣嶇疆澶辫触锛侊紒锛�", Color.Red); + vm.MapInfo.ID = await BLLFactory<Yw.BLL.MapInfo>.Instance.Insert(vm.MapInfo); + if (vm.MapInfo.ID < 1) + { + feedBackMsg?.Invoke("浣嶇疆淇℃伅璁剧疆澶辫触锛侊紒锛�", Color.Red); + } + else + { + feedBackMsg?.Invoke("浣嶇疆淇℃伅璁剧疆鎴愬姛銆傘�傘��", Color.Green); + } } else { - vm.MapInfoID = mapInfoId; - feedBackMsg?.Invoke("璁剧疆鍦板浘浣嶇疆鎴愬姛銆傘�傘��", Color.Green); + if (!await BLLFactory<Yw.BLL.MapInfo>.Instance.Update(vm.MapInfo)) + { + feedBackMsg?.Invoke("浣嶇疆淇℃伅璁剧疆澶辫触锛侊紒锛�", Color.Red); + } + else + { + feedBackMsg?.Invoke("浣嶇疆淇℃伅璁剧疆鎴愬姛銆傘�傘��", Color.Green); + } } } else { - feedBackMsg?.Invoke("鏈缃湴鍥句綅缃俊鎭紒锛侊紒", Color.Red); + feedBackMsg?.Invoke("鏈缃綅缃俊鎭紒锛侊紒", Color.Red); } feedBackProgress?.Invoke(100, 20); @@ -128,8 +130,7 @@ feedBackMsg?.Invoke("妯″瀷鏂囦欢涓嬭浇瀹屾垚锛侊紒锛�", Color.Green); } } - msg = "姝e湪瑙f瀽妯″瀷鏂囦欢..."; - feedBackMsg?.Invoke(msg, Color.Black); + feedBackMsg?.Invoke("姝e湪瑙f瀽妯″瀷鏂囦欢...", Color.Black); var bol = Yw.FileFolderZipHelper.UnZip(localZipFile, tempFolder, zipFilePwd); if (!bol) { @@ -167,8 +168,8 @@ 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); + vm.RevitModel = HStation.Service.RevitParseHelper.FromJsonFile + (structFileInfo.FullName, structOthersFileInfo?.FullName, out bool structFileResult, out List<string> structFileMsgList); //瑙f瀽缁撴灉鍒ゆ柇 if (!structFileResult) { @@ -176,9 +177,9 @@ } //Revit灞炴�ч敊璇鐞� var hasRevitPropError = false; - if (structRevitModel != null) + if (vm.RevitModel != null) { - var allRevitParterList = structRevitModel.GetAllParters(); + var allRevitParterList = vm.RevitModel.GetAllParters(); foreach (var revitParter in allRevitParterList) { if (revitParter.PropStatusList != null && revitParter.PropStatusList.Count > 0) @@ -197,18 +198,6 @@ } break; - case Revit.ePropStatus.Lack: - { - //feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.ID}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛岀己鐪侊細{revitParterPropStatus.StatusInfo} ", Color.Gray); - } - break; - - case Revit.ePropStatus.Abnormal: - { - //feedBackMsg?.Invoke($"鏋勪欢缂栫爜锛歿revitParter.ID}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛屽紓甯革細{revitParterPropStatus.StatusInfo} ", Color.Orange); - } - break; - default: break; } } @@ -223,10 +212,15 @@ return true; } - vm.RevitModel = structRevitModel; - - var hydroInfo = HStation.Hydro.TransferHelper.FromRevit(structRevitModel, out msg); - if (hydroInfo == null) + vm.HydroInfo = HStation.Hydro.TransferHelper.FromRevit + ( + vm.RevitModel, + out List<Yw.Model.HydroParterPropStatusInfo> allPropStatusDbList, + out List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList, + out List<Yw.Model.HydroDecoratorInfo> allDecoratorList, + out msg + ); + if (vm.HydroInfo == null) { feedBackMsg?.Invoke($"姘村姏缁撴瀯鏂囦欢瑙f瀽澶辫触锛寋msg}锛侊紒锛�", Color.Red); feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); @@ -234,11 +228,13 @@ return true; } + var propStatusHelper = new HydroPropStatusHelper(vm.HydroInfo, allPropStatusDbList); + feedBackMsg?.Invoke("姝e湪杩涜浜у搧鍖归厤...", Color.Black); - var matchingParas = Yw.WinFrmUI.HydroMatchingHelper.Create(hydroInfo); + var matchingParas = Yw.WinFrmUI.HydroMatchingHelper.Create(vm.HydroInfo); if (AssetsMatchingHelper.Matching(matchingParas, out string error)) { - if (Yw.WinFrmUI.HydroMatchingHelper.Apply(hydroInfo, matchingParas)) + if (Yw.WinFrmUI.HydroMatchingHelper.Apply(vm.HydroInfo, matchingParas)) { feedBackMsg?.Invoke("浜у搧鍖归厤瀹屾垚銆傘�傘��", Color.Green); } @@ -252,18 +248,8 @@ feedBackMsg?.Invoke("浜у搧鍖归厤澶辫触锛侊紒锛�", Color.Red); } - feedBackMsg?.Invoke("姝e湪杩涜绠$綉淇...", Color.Black); - if (hydroInfo.RepairLinksDirection(out msg)) - { - feedBackMsg?.Invoke(msg, Color.Green); - } - else - { - feedBackMsg?.Invoke(msg, Color.Red); - } - feedBackMsg?.Invoke("姝e湪杩涜绠$綉鍙傛暟淇...", Color.Black); - hydroInfo.RepairParas(out msg); + vm.HydroInfo.RepairParas(propStatusHelper, out msg); if (string.IsNullOrEmpty(msg)) { feedBackMsg?.Invoke("绠$綉鍙傛暟淇瀹屾垚銆傘�傘��", Color.Green); @@ -274,8 +260,8 @@ } feedBackMsg?.Invoke("姝e湪淇濆瓨姘村姏缁撴瀯淇℃伅...", Color.Black); - var hydroId = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.Save(hydroInfo); - if (hydroId < 1) + vm.HydroInfo.ID = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.Save(vm.HydroInfo); + if (vm.HydroInfo.ID < 1) { feedBackMsg?.Invoke("姘村姏缁撴瀯淇℃伅淇濆瓨澶辫触锛侊紒锛�", Color.Red); feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); @@ -286,44 +272,50 @@ feedBackMsg?.Invoke("姘村姏缁撴瀯鏂囦欢瑙f瀽鎴愬姛銆傘�傘��", Color.Green); feedBackProgress?.Invoke(100, 40); - vm.HydroID = hydroId; + vm.HydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(vm.HydroInfo.ID); + + //灞炴�х姸鎬� + if (allPropStatusDbList != null && allPropStatusDbList.Count > 0) + { + await BLLFactory<Yw.BLL.HydroParterPropStatusInfo>.Instance.Save(vm.HydroInfo.ID, allPropStatusDbList); + } + + //鍦烘櫙灞炴�� + if (allScenePropValueList != null && allScenePropValueList.Count > 0) + { + await BLLFactory<Yw.BLL.HydroParterScenePropValueInfo>.Instance.Save(vm.HydroInfo.ID, HStation.Revit.ConstParas.Scene, allScenePropValueList); + } + + //瑁呴グ浠� + if (allDecoratorList != null && allDecoratorList.Count > 0) + { + await BLLFactory<Yw.BLL.HydroDecoratorInfo>.Instance.Save(vm.HydroInfo.ID, HStation.Revit.ConstParas.Scene, allDecoratorList); + } #endregion #region 绗叚姝� 鍏宠仈姘村姏缁撴瀯妯″瀷锛堣繘搴� 50%锛� - var projectSite = await BLLFactory<HStation.BLL.XhsProjectSite>.Instance.GetDefaultByProjectID(projectId); - if (projectSite == null) - { - feedBackMsg?.Invoke("椤圭洰绔欎俊鎭敊璇�...", Color.Red); - feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); - feedBackProgress?.Invoke(100, 100); - return true; - } - - var projectSiteId = projectSite.ID; - vm.ProjectSiteID = projectSite.ID; - feedBackMsg?.Invoke("姝e湪鍏宠仈姘村姏缁撴瀯妯″瀷...", Color.Black); - var hydroRelation = new Yw.Vmo.HydroModelRelationVmo(); - hydroRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite; - hydroRelation.ObjectID = projectSiteId; - hydroRelation.ModelID = hydroId; - hydroRelation.Purpose = HStation.Xhs.Purpose.Simulation; - hydroRelation.Content = null; - hydroRelation.Description = null; + vm.HydroRelation = new Yw.Vmo.HydroModelRelationVmo(); + vm.HydroRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite; + vm.HydroRelation.ObjectID = vm.Project.SiteList.First().ID; + vm.HydroRelation.ModelID = vm.HydroInfo.ID; + vm.HydroRelation.Purpose = Yw.Hydro.Purpose.Simulation; + vm.HydroRelation.Content = null; + vm.HydroRelation.Description = "瀵煎叆鑷姩鐢熸垚"; - var hydroRelationId = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.Insert(hydroRelation); - if (hydroRelationId < 1) + vm.HydroRelation.ID = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.Insert(vm.HydroRelation); + if (vm.HydroRelation.ID < 1) { feedBackMsg?.Invoke("鍏宠仈姘村姏缁撴瀯妯″瀷澶辫触锛侊紒锛�", Color.Red); feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); feedBackProgress?.Invoke(100, 100); return true; } + vm.HydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.GetByID(vm.HydroRelation.ID); - vm.HydroRelationID = hydroRelationId; feedBackMsg?.Invoke("鍏宠仈姘村姏缁撴瀯妯″瀷鎴愬姛銆傘�傘��", Color.Green); feedBackProgress?.Invoke(100, 50); @@ -341,8 +333,8 @@ return true; } - //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//涓婁紶 - var bimfaceId = 10000884893369; //娴嬭瘯鐢ㄤ緥 10000878572231 10000882826621 10000884283372 10000884362886 10000884702464 10000884893369 + var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//姝e紡浠g爜 + //var bimfaceId = 10000899666805;//娴嬭瘯鐢ㄤ緥 鍒舵爱寰幆:10000884893369 10000896755736 10000899666805 if (bimfaceId < 1) { feedBackMsg?.Invoke("Revit妯″瀷鏂囦欢涓婁紶澶辫触锛侊紒锛�", Color.Red); @@ -351,7 +343,6 @@ return true; } - vm.BimfaceId = bimfaceId; feedBackMsg?.Invoke("瑙f瀽Revit妯″瀷鏂囦欢鎴愬姛銆傘�傘��", Color.Green); feedBackProgress?.Invoke(100, 60); @@ -361,25 +352,24 @@ feedBackMsg?.Invoke("姝e湪淇濆瓨Bimface鏂囦欢...", Color.Black); - var bimfaceFile = new Yw.Vmo.BimfaceFileVmo(); - bimfaceFile.BimfaceId = bimfaceId.ToString(); - bimfaceFile.Name = vm.Name; - bimfaceFile.ModelType = (int)Yw.Bimface.eModelType.File; - bimfaceFile.FileStatus = (int)Yw.Bimface.eFileStatus.UploadSucceed; - bimfaceFile.FormatType = (int)Yw.Bimface.eFormatType._3D; - bimfaceFile.FileSuffix = rvtFileInfo.Extension; - bimfaceFile.FileSize = string.Format("{0}MB", System.Math.Ceiling(rvtFileInfo.Length / 1024.0 / 1024.0)); + vm.BimfaceFile = new Yw.Vmo.BimfaceFileVmo(); + vm.BimfaceFile.BimfaceId = bimfaceId.ToString(); + vm.BimfaceFile.Name = vm.Project.Name; + vm.BimfaceFile.ModelType = (int)Yw.Bimface.eModelType.File; + vm.BimfaceFile.FileStatus = (int)Yw.Bimface.eFileStatus.UploadSucceed; + vm.BimfaceFile.FormatType = (int)Yw.Bimface.eFormatType._3D; + vm.BimfaceFile.FileSuffix = rvtFileInfo.Extension; + vm.BimfaceFile.FileSize = string.Format("{0}MB", System.Math.Ceiling(rvtFileInfo.Length / 1024.0 / 1024.0)); - var bimfaceFileId = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.Insert(bimfaceFile); - if (bimfaceFileId < 1) + vm.BimfaceFile.ID = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.Insert(vm.BimfaceFile); + if (vm.BimfaceFile.ID < 1) { feedBackMsg?.Invoke("Bimface鏂囦欢淇濆瓨澶辫触锛侊紒锛�", Color.Red); feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); feedBackProgress?.Invoke(100, 100); return true; } - - vm.BimfaceFileID = bimfaceFileId; + vm.BimfaceFile = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.GetByID(vm.BimfaceFile.ID); feedBackMsg?.Invoke("Bimface鏂囦欢淇濆瓨鎴愬姛銆傘�傘��", Color.Green); feedBackProgress?.Invoke(100, 65); @@ -389,72 +379,56 @@ feedBackMsg?.Invoke("姝e湪鍏宠仈Bimface鏂囦欢...", Color.Black); - var bimfaceRelation = new Yw.Vmo.BimfaceFileRelationVmo(); - bimfaceRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite; - bimfaceRelation.ObjectID = projectSiteId; - bimfaceRelation.BimfaceFileID = bimfaceFileId; - bimfaceRelation.Purpose = HStation.Xhs.Purpose.Simulation; - bimfaceRelation.Description = vm.Description; + vm.BimfaceRelation = new Yw.Vmo.BimfaceFileRelationVmo(); + vm.BimfaceRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite; + vm.BimfaceRelation.ObjectID = vm.Project.SiteList.First().ID; + vm.BimfaceRelation.BimfaceFileID = vm.BimfaceFile.ID; + vm.BimfaceRelation.Purpose = Yw.Bimface.Purpose.Simulation; + vm.BimfaceRelation.Description = "瀵煎叆鑷姩鐢熸垚"; - var bimfaceRelationId = await BLLFactory<Yw.BLL.BimfaceFileRelation>.Instance.Insert(bimfaceRelation); - if (bimfaceRelationId < 1) + vm.BimfaceRelation.ID = await BLLFactory<Yw.BLL.BimfaceFileRelation>.Instance.Insert(vm.BimfaceRelation); + if (vm.BimfaceRelation.ID < 1) { feedBackMsg?.Invoke("Bimface鏂囦欢鍏宠仈澶辫触锛侊紒锛�", Color.Red); feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); feedBackProgress?.Invoke(100, 100); return true; } - vm.BimfaceFileRelationID = bimfaceRelationId; + vm.BimfaceRelation = await BLLFactory<Yw.BLL.BimfaceFileRelation>.Instance.GetByID(vm.BimfaceRelation.ID); feedBackMsg?.Invoke("Bimface鏂囦欢鍏宠仈鎴愬姛銆傘�傘��", Color.Green); feedBackProgress?.Invoke(100, 70); #endregion - #region 绗崄姝� 鍙戣捣bimface杞崲锛堣繘搴� 90%锛� + #region 绗崄姝� 鍙戣捣妯″瀷杞崲锛堣繘搴� 90%锛� - feedBackMsg?.Invoke("姝e湪杩涜Bimface妯″瀷杞婚噺鍖�...", Color.Black); - //var bimfaceTranslateStatus = await Yw.WinFrmUI.BimfaceHelper.TranslateRvtFile(bimfaceId);//鍙戣捣杞崲 - var bimfaceTranslateStatus = Yw.BIMFace.eTranslateStatus.Processing;//娴嬭瘯浠g爜 feedBackProgress?.Invoke(100, 60); + feedBackMsg?.Invoke("姝e湪杩涜妯″瀷杞婚噺鍖�...", Color.Black); + var bimfaceTranslateStatus = await Yw.WinFrmUI.BimfaceHelper.TranslateRvtFile(bimfaceId);//鍙戣捣杞崲 + //var bimfaceTranslateStatus = Yw.BIMFace.eTranslateStatus.Processing;//娴嬭瘯浠g爜 + if (bimfaceTranslateStatus != Yw.BIMFace.eTranslateStatus.Success) { - var dlgResult = XtraMessageBox.Show("Bimface妯″瀷杞婚噺鍖栭渶瑕佷竴瀹氱殑鏃堕棿锛屾槸鍚︾户缁瓑寰咃紵", "璇㈤棶", MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (dlgResult == DialogResult.Yes) - { - await Yw.WinFrmUI.BimfaceHelper.WaitFileTranslateStatusUntilSuccess(bimfaceId, 3000); - vm.BimfaceConverted = true; - feedBackMsg?.Invoke("Bimface妯″瀷杞婚噺鍖栧畬鎴愩�傘�傘��", Color.Green); - } - else - { - feedBackMsg?.Invoke("璺宠繃Bimface妯″瀷杞婚噺鍖栫瓑寰呫�傘�傘��", Color.Black); - feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); - feedBackProgress?.Invoke(100, 100); - return true; - } + await Yw.WinFrmUI.BimfaceHelper.WaitFileTranslateStatusUntilSuccess(bimfaceId, 3000); } - else - { - vm.BimfaceConverted = true; - feedBackMsg?.Invoke("Bimface妯″瀷杞婚噺鍖栧畬鎴愩�傘�傘��", Color.Green); - } - + feedBackMsg?.Invoke("妯″瀷杞婚噺鍖栧畬鎴愩�傘�傘��", Color.Green); feedBackProgress?.Invoke(100, 90); #endregion - #region 绗崄涓�姝� 鏇存柊Bimface鏂囦欢鐘舵�侊紙杩涘害 100%锛� + #region 绗崄涓�姝� 鏇存柊妯″瀷鏂囦欢鐘舵�侊紙杩涘害 100%锛� - feedBackMsg?.Invoke("姝e湪鏇存柊Bimface鏂囦欢鐘舵��...", Color.Black); - bol = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.UpdateFileStatus(bimfaceFileId, (int)Yw.Bimface.eFileStatus.ConvertSucceed); + feedBackMsg?.Invoke("姝e湪鏇存柊妯″瀷鏂囦欢鐘舵��...", Color.Black); + bol = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.UpdateFileStatus(vm.BimfaceFile.ID, (int)Yw.Bimface.eFileStatus.ConvertSucceed); if (bol) { - feedBackMsg?.Invoke("Bimface鏂囦欢鐘舵�佹洿鏂版垚鍔熴�傘�傘��", Color.Green); + vm.BimfaceFile.FileStatus = (int)Yw.Bimface.eFileStatus.ConvertSucceed; + feedBackMsg?.Invoke("妯″瀷鏂囦欢鐘舵�佹洿鏂版垚鍔熴�傘�傘��", Color.Green); } else { - feedBackMsg?.Invoke("Bimface鏂囦欢鐘舵�佹洿鏂板け璐ワ紒锛侊紒", Color.Red); - feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Black); + feedBackMsg?.Invoke("妯″瀷鏂囦欢鐘舵�佹洿鏂板け璐ワ紒锛侊紒", Color.Red); + feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue); return true; } @@ -463,8 +437,8 @@ return true; #endregion + + } - - } } \ No newline at end of file -- Gitblit v1.9.3