Shuxia Ning
2024-10-24 0711485ecb4fe66fbe820478d92eb9f04b77c042
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);
            //解析结果判断
            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.Id},构件属性:{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.Id},构件属性:{revitParterPropStatus.PropName},缺省:{revitParterPropStatus.StatusInfo} ", Color.Gray);
                                        //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);
                                        //feedBackMsg?.Invoke($"构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},异常:{revitParterPropStatus.StatusInfo} ", Color.Orange);
                                    }
                                    break;
                                default: break;
                            }
                        }
                    }
                }
            }
            //解析结果判断
            if (!structFileResult)
            {
                structFileMsgList?.ForEach(x => feedBackMsg?.Invoke(x, Color.Red));
            }
            if (hasRevitPropError || !structFileResult)
            {
                feedBackMsg?.Invoke($"水力结构文件解析错误!!!", 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("正在进行产品匹配...", 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
                {
@@ -311,7 +312,7 @@
            }
            //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//上传
            var bimfaceId = 10000878572231; //测试用例 10000882826621
            var bimfaceId = 10000884702464; //测试用例 10000878572231 10000882826621  10000884283372 10000884362886 10000884702464
            if (bimfaceId < 1)
            {
                feedBackMsg?.Invoke("Revit模型文件上传失败!!!", Color.Red);