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 |   74 ++++++++++++++++--------------------
 1 files changed, 33 insertions(+), 41 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 2fd27ae..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,10 +1,4 @@
 锘縰sing Castle.Core.Internal;
-using DevExpress.XtraEditors;
-using HStation.Model;
-using HStation.Vmo;
-using Microsoft.Extensions.DependencyInjection;
-using static DevExpress.XtraEditors.XtraInputBox;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
 
 namespace HStation.WinFrmUI
 {
@@ -203,6 +197,7 @@
                                         feedBackMsg?.Invoke($"鏋勪欢绫诲瀷锛歿revitParter.Catalog}锛屾瀯浠剁紪鐮侊細{revitParter.Id}锛屾瀯浠跺睘鎬э細{revitParterPropStatus.PropName}锛岄敊璇細{revitParterPropStatus.StatusInfo} ", Color.Red);
                                     }
                                     break;
+
                                 default: break;
                             }
                         }
@@ -218,7 +213,13 @@
             }
 
             vm.HydroInfo = HStation.Hydro.TransferHelper.FromRevit
-                (vm.RevitModel, out List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueInfo, out List<Yw.Model.HydroDecoratorInfo> allDecoratorList, out msg);
+                (
+                    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);
@@ -226,6 +227,8 @@
                 feedBackProgress?.Invoke(100, 100);
                 return true;
             }
+
+            var propStatusHelper = new HydroPropStatusHelper(vm.HydroInfo, allPropStatusDbList);
 
             feedBackMsg?.Invoke("姝e湪杩涜浜у搧鍖归厤...", Color.Black);
             var matchingParas = Yw.WinFrmUI.HydroMatchingHelper.Create(vm.HydroInfo);
@@ -246,7 +249,7 @@
             }
 
             feedBackMsg?.Invoke("姝e湪杩涜绠$綉鍙傛暟淇...", Color.Black);
-            vm.HydroInfo.RepairParas(out msg);
+            vm.HydroInfo.RepairParas(propStatusHelper, out msg);
             if (string.IsNullOrEmpty(msg))
             {
                 feedBackMsg?.Invoke("绠$綉鍙傛暟淇瀹屾垚銆傘�傘��", Color.Green);
@@ -271,10 +274,24 @@
             feedBackProgress?.Invoke(100, 40);
             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%锛�
@@ -316,8 +333,8 @@
                 return true;
             }
 
-            //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//姝e紡浠g爜
-            var bimfaceId = 10000896316958;//娴嬭瘯鐢ㄤ緥  10000884893369  10000894297457  10000895957527  10000896316958
+            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);
@@ -387,39 +404,14 @@
 
             feedBackProgress?.Invoke(100, 60);
             feedBackMsg?.Invoke("姝e湪杩涜妯″瀷杞婚噺鍖�...", Color.Black);
-            //var bimfaceTranslateStatus = await Yw.WinFrmUI.BimfaceHelper.TranslateRvtFile(bimfaceId);//鍙戣捣杞崲
-            var bimfaceTranslateStatus = Yw.BIMFace.eTranslateStatus.Processing;//娴嬭瘯浠g爜
+            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);
-                    feedBackMsg?.Invoke("妯″瀷杞婚噺鍖栧畬鎴愩�傘�傘��", Color.Green);
-                }
-                else
-                {
-                    bol = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.UpdateFileStatus(vm.BimfaceFile.ID, (int)Yw.Bimface.eFileStatus.Converting);
-                    if (bol)
-                    {
-                        vm.BimfaceFile.FileStatus = (int)Yw.Bimface.eFileStatus.Converting;
-                    }
-                    else
-                    {
-                        feedBackMsg?.Invoke("妯″瀷鏂囦欢鐘舵�佹洿鏂板け璐ワ紒锛侊紒", Color.Red);
-                    }
-                    feedBackMsg?.Invoke("璺宠繃妯″瀷杞婚噺鍖栫瓑寰呫�傘�傘��", Color.Black);
-                    feedBackMsg?.Invoke("椤圭洰瀵煎叆缁撴潫銆傘�傘��", Color.Blue);
-                    feedBackProgress?.Invoke(100, 100);
-                    return true;
-                }
+                await Yw.WinFrmUI.BimfaceHelper.WaitFileTranslateStatusUntilSuccess(bimfaceId, 3000);
             }
-            else
-            {
-                feedBackMsg?.Invoke("妯″瀷杞婚噺鍖栧畬鎴愩�傘�傘��", Color.Green);
-            }
-
+            feedBackMsg?.Invoke("妯″瀷杞婚噺鍖栧畬鎴愩�傘�傘��", Color.Green);
             feedBackProgress?.Invoke(100, 90);
 
             #endregion
@@ -445,8 +437,8 @@
             return true;
 
             #endregion
+
+
         }
-
-
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3