lixiaojun
2024-12-03 a87bafbd85730f089ea731d91cff12a205603348
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -199,13 +199,13 @@
                                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;
@@ -234,17 +234,7 @@
                return true;
            }
            //var hydroId = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.Save(hydroInfo);
            //if (hydroId < 1)
            //{
            //    feedBackMsg?.Invoke("水力结构信息保存失败!!!", Color.Red);
            //    feedBackMsg?.Invoke("项目导入结束。。。", Color.Blue);
            //    feedBackProgress?.Invoke(100, 100);
            //    return true;
            //}
            feedBackMsg?.Invoke("正在进行产品匹配...", Color.Black);
            //hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId);
            var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo, null);
            if (AssetsMatchingHelper.Matching(matchingParas, out string error))
            {
@@ -261,7 +251,29 @@
            {
                feedBackMsg?.Invoke("产品匹配失败!!!", Color.Red);
            }
            feedBackMsg?.Invoke("正在保存水利结构信息...", Color.Black);
            feedBackMsg?.Invoke("正在进行管网修复...", Color.Black);
            if (hydroInfo.RepairLinksDirection(out msg))
            {
                feedBackMsg?.Invoke(msg, Color.Green);
            }
            else
            {
                feedBackMsg?.Invoke(msg, Color.Red);
            }
            feedBackMsg?.Invoke("正在进行管网参数修复...", Color.Black);
            hydroInfo.RepairParas(out msg);
            if (string.IsNullOrEmpty(msg))
            {
                feedBackMsg?.Invoke("管网参数修复完成。。。", Color.Green);
            }
            else
            {
                feedBackMsg?.Invoke(msg, Color.Red);
            }
            feedBackMsg?.Invoke("正在保存水力结构信息...", Color.Black);
            var hydroId = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.Save(hydroInfo);
            if (hydroId < 1)
            {
@@ -452,5 +464,7 @@
            #endregion
        }
    }
}