duheng
2025-01-17 4c32366350018806978182f05352ef75698f995f
Service/HStation.Service.Revit.Core/04-service/01-json/RevitJsonHelper.cs
@@ -21,8 +21,8 @@
                msg = "Revit json 字符串为空";
                return default;
            }
            try
            {
            //try
            //{
                var model = new Model.RevitModel();
                //解析结构json
@@ -150,6 +150,15 @@
                                }
                            }
                            break;
                        case RevitJsonCatalog.Cooling:
                            {
                                var cooling = ParseCooling(jobject);
                                if (cooling != null)
                                {
                                    model.Coolings.Add(cooling);
                                }
                            }
                            break;
                        case RevitJsonCatalog.Pipe:
                            {
                                var pipe = ParsePipe(jobject);
@@ -251,12 +260,12 @@
                }
                return model;
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                return default;
            }
            //}
            //catch (Exception ex)
            //{
            //    msg = ex.Message;
            //    return default;
            //}
        }
@@ -363,6 +372,10 @@
            {
                reservoir.UpdatePropStatus(nameof(reservoir.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (reservoir.Flags == null)
            {
                reservoir.Flags = new List<string>();
            }
            #endregion
@@ -433,6 +446,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    reservoir.PoolElev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                reservoir.PoolElev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -562,6 +586,11 @@
                tank.UpdatePropStatus(nameof(tank.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (tank.Flags == null)
            {
                tank.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -631,6 +660,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    tank.PoolElev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                tank.PoolElev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -835,6 +875,11 @@
                waterbox.UpdatePropStatus(nameof(waterbox.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (waterbox.Flags == null)
            {
                waterbox.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -904,6 +949,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    waterbox.PoolElev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                waterbox.PoolElev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -1108,6 +1164,11 @@
                junction.UpdatePropStatus(nameof(junction.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (junction.Flags == null)
            {
                junction.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -1163,7 +1224,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                junction.Elev = elev;
            }
@@ -1177,11 +1238,23 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    junction.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                junction.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
                    junction.UpdatePropStatus(nameof(junction.Elev), ePropStatus.Abnormal, "[标高中的高程]缺少或者格式错误");
                }
            }
            if (junction.Elev <= 0)
@@ -1319,6 +1392,11 @@
                blunthead.UpdatePropStatus(nameof(blunthead.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (blunthead.Flags == null)
            {
                blunthead.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -1374,7 +1452,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                blunthead.Elev = elev;
            }
@@ -1388,6 +1466,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    blunthead.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                blunthead.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -1434,7 +1523,14 @@
            {
                blunthead.Caliber = caliber;
            }
            else
            if (blunthead.Caliber <= 0)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber))
                {
                    blunthead.Caliber = caliber;
                }
            }
            if (blunthead.Caliber <= 0)
            {
                blunthead.UpdatePropStatus(nameof(blunthead.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误");
            }
@@ -1561,6 +1657,11 @@
                elbow.UpdatePropStatus(nameof(elbow.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (elbow.Flags == null)
            {
                elbow.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -1616,7 +1717,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                elbow.Elev = elev;
            }
@@ -1630,6 +1731,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    elbow.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                elbow.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -1676,7 +1788,14 @@
            {
                elbow.Caliber = caliber;
            }
            else
            if (elbow.Caliber <= 0)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber))
                {
                    elbow.Caliber = caliber;
                }
            }
            if (elbow.Caliber <= 0)
            {
                elbow.UpdatePropStatus(nameof(elbow.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误");
            }
@@ -1730,7 +1849,7 @@
            if (jobject[RevitJsonProp.BendingAngle].MatchNumeric(out double bendingAngle))
            {
                elbow.BendingAngle = bendingAngle;
                elbow.BendingAngle = (int)bendingAngle;
            }
            else
            {
@@ -1832,6 +1951,11 @@
                threelink.UpdatePropStatus(nameof(threelink.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (threelink.Flags == null)
            {
                threelink.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -1887,7 +2011,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                threelink.Elev = elev;
            }
@@ -1901,6 +2025,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    threelink.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                threelink.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -1947,7 +2082,14 @@
            {
                threelink.Caliber = caliber;
            }
            else
            if (threelink.Caliber <= 0)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber))
                {
                    threelink.Caliber = caliber;
                }
            }
            if (threelink.Caliber <= 0)
            {
                threelink.UpdatePropStatus(nameof(threelink.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误");
            }
@@ -2099,6 +2241,11 @@
                fourlink.UpdatePropStatus(nameof(fourlink.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (fourlink.Flags == null)
            {
                fourlink.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -2154,7 +2301,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                fourlink.Elev = elev;
            }
@@ -2168,6 +2315,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    fourlink.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                fourlink.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -2214,7 +2372,14 @@
            {
                fourlink.Caliber = caliber;
            }
            else
            if (fourlink.Caliber <= 0)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber))
                {
                    fourlink.Caliber = caliber;
                }
            }
            if (fourlink.Caliber <= 0)
            {
                fourlink.UpdatePropStatus(nameof(fourlink.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误");
            }
@@ -2340,6 +2505,11 @@
                nozzle.UpdatePropStatus(nameof(nozzle.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (nozzle.Flags == null)
            {
                nozzle.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -2395,7 +2565,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                nozzle.Elev = elev;
            }
@@ -2409,6 +2579,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    nozzle.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                nozzle.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -2611,6 +2792,11 @@
                hydrant.UpdatePropStatus(nameof(hydrant.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (hydrant.Flags == null)
            {
                hydrant.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -2666,7 +2852,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                hydrant.Elev = elev;
            }
@@ -2680,6 +2866,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    hydrant.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                hydrant.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -2804,6 +3001,305 @@
            return hydrant;
        }
        //解析冷却塔
        private static HStation.Model.RevitCooling ParseCooling(JToken jobject)
        {
            if (jobject == null)
            {
                return default;
            }
            var cooling = new Model.RevitCooling();
            cooling.Catalog = RevitJsonCatalog.Cooling;
            #region Id
            if (jobject.ParseString(RevitJsonProp.Id, out string id))
            {
                cooling.Id = id;
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Id), ePropStatus.Error, "缺少[构件编码]");
            }
            #endregion
            #region Name
            if (jobject.ParseString(RevitJsonProp.Name, out string name))
            {
                cooling.Name = name;
                cooling.UpdatePropStatus(nameof(cooling.Name), ePropStatus.Lack, "[构件名称]缺省");
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Name), ePropStatus.Error, "缺少 [构件名称]");
            }
            #endregion
            #region ModelType
            if (jobject.ParseString(RevitJsonProp.ModelType, out string modelType))
            {
                cooling.ModelType = modelType;
                if (string.IsNullOrEmpty(cooling.ModelType))
                {
                    cooling.UpdatePropStatus(nameof(cooling.ModelType), ePropStatus.Lack, "[型号信息]缺省");
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.ModelType), ePropStatus.Error, "缺少[型号信息]");
            }
            #endregion
            #region Flags
            if (jobject.ParseString(RevitJsonProp.Flags, out string flags))
            {
                cooling.Flags = Yw.Untity.FlagsHelper.ToList(flags);
                if (!string.IsNullOrEmpty(flags))
                {
                    if (cooling.Flags == null || cooling.Flags.Count < 1)
                    {
                        cooling.UpdatePropStatus(nameof(cooling.Flags), ePropStatus.Abnormal, "[标签信息]格式错误");
                    }
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (cooling.Flags == null)
            {
                cooling.Flags = new List<string>();
            }
            #endregion
            #region Description
            if (jobject.ParseString(RevitJsonProp.Description, out string description))
            {
                cooling.Description = description;
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Description), ePropStatus.Error, "缺少[说明信息]");
            }
            #endregion
            #region ConnectList
            if (jobject.ParseString(RevitJsonProp.Connects, out string connectString))
            {
                var connectList = JsonHelper.Json2Object<List<RevitJsonConnectModel>>(connectString);
                cooling.ConnectList = connectList?.Select(x => new Model.RevitConnect()
                {
                    Id = x.ConnectId,
                    Direction = x.Dirction,
                    Position = new Model.RevitPosition()
                    {
                        X = x.Point.X / 1000f,
                        Y = x.Point.Y / 1000f,
                        Z = x.Point.Z / 1000f
                    }
                }).ToList();
                if (cooling.ConnectList == null || cooling.ConnectList.Count < 1)
                {
                    cooling.UpdatePropStatus(nameof(cooling.ConnectList), ePropStatus.Error, "[连接列表]解析失败");
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.ConnectList), ePropStatus.Error, "缺少[连接列表]");
            }
            #endregion
            #region Position
            cooling.Position = cooling.ConnectList?.GetCenterPosition();
            if (cooling.Position == null)
            {
                cooling.UpdatePropStatus(nameof(cooling.Position), ePropStatus.Lack, "[位置信息]缺省,可能是受[连接列表]解析失败影响");
            }
            #endregion
            #region Elev
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                cooling.Elev = elev;
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Elev), ePropStatus.Abnormal, "[标高信息]缺少或者格式错误");
            }
            if (cooling.Elev <= 0)
            {
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    cooling.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                cooling.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
                    cooling.UpdatePropStatus(nameof(cooling.Elev), ePropStatus.Abnormal, "[标高中的高程]缺少或者格式错误");
                }
            }
            if (cooling.Elev <= 0)
            {
                //通过z轴自动计算
                if (cooling.Position == null)
                {
                    cooling.UpdatePropStatus(nameof(cooling.Elev), ePropStatus.Lack, "[标高信息]缺省,受[位置]影响,无法通过Z轴自动计算");
                }
                else
                {
                    cooling.Elev = cooling.Position.Z;
                    cooling.UpdatePropStatus(nameof(cooling.Elev), ePropStatus.Lack, "[标高信息]缺省,通过Z轴自动计算");
                }
            }
            #endregion
            #region Material
            if (jobject.ParseString(RevitJsonProp.Material, out string material))
            {
                cooling.Material = material;
                if (string.IsNullOrEmpty(cooling.Material))
                {
                    cooling.UpdatePropStatus(nameof(cooling.Material), ePropStatus.Lack, "[材质信息]缺省");
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Material), ePropStatus.Abnormal, "缺少[材质信息]");
            }
            #endregion
            #region Caliber
            if (jobject[RevitJsonProp.Caliber].MatchNumeric(out double caliber))
            {
                cooling.Caliber = caliber;
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误");
            }
            #endregion
            #region Demand
            if (jobject[RevitJsonProp.Demand].MatchNumeric(out double demand))
            {
                cooling.Demand = demand;
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Demand), ePropStatus.Abnormal, "[需水量]缺少或者数据格式错误");
            }
            #endregion
            #region DemandPattern
            if (jobject.ParseString(RevitJsonProp.DemandPattern, out string demandPattern))
            {
                cooling.DemandPattern = demandPattern;
                if (string.IsNullOrEmpty(cooling.DemandPattern))
                {
                    cooling.UpdatePropStatus(nameof(cooling.DemandPattern), ePropStatus.Lack, "[需水模式]缺省");
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.DemandPattern), ePropStatus.Abnormal, "缺少[需水模式]");
            }
            #endregion
            #region MinorLoss
            if (jobject[RevitJsonProp.MinorLoss].MatchNumeric(out double minorLoss))
            {
                cooling.MinorLoss = minorLoss;
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.MinorLoss), ePropStatus.Abnormal, "[局阻系数]缺少或者数据格式错误");
            }
            #endregion
            #region Coefficient
            if (jobject[RevitJsonProp.CoefficientP].MatchNumeric(out double coeffientp))
            {
                cooling.Coefficient = coeffientp;
                if (cooling.Coefficient <= 0)
                {
                    cooling.UpdatePropStatus(nameof(cooling.Coefficient), ePropStatus.Lack, "[喷射系数]缺省");
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.Coefficient), ePropStatus.Abnormal, "[喷射系数]缺少或者格式错误");
                if (jobject[RevitJsonProp.CoefficientF].MatchNumeric(out double coeffientf))
                {
                    cooling.Coefficient = coeffientf;
                    if (cooling.Coefficient <= 0)
                    {
                        cooling.UpdatePropStatus(nameof(cooling.Coefficient), ePropStatus.Lack, "[流量系数]缺省");
                    }
                }
            }
            #endregion
            #region LowerLimit
            if (jobject[RevitJsonProp.LowerLimit].MatchNumeric(out double lowerLimit))
            {
                cooling.LowerLimit = lowerLimit;
                if (cooling.LowerLimit <= 0)
                {
                    cooling.UpdatePropStatus(nameof(cooling.LowerLimit), ePropStatus.Lack, "[最小压力]缺省");
                }
            }
            else
            {
                cooling.UpdatePropStatus(nameof(cooling.LowerLimit), ePropStatus.Abnormal, "[最小压力]缺少或者格式错误");
            }
            #endregion
            return cooling;
        }
        //解析水表
        private static HStation.Model.RevitMeter ParseMeter(JToken jobject)
        {
@@ -2877,6 +3373,11 @@
                meter.UpdatePropStatus(nameof(meter.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (meter.Flags == null)
            {
                meter.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -2932,7 +3433,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                meter.Elev = elev;
            }
@@ -2946,6 +3447,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    meter.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                meter.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -3088,6 +3600,11 @@
                flowmeter.UpdatePropStatus(nameof(flowmeter.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (flowmeter.Flags == null)
            {
                flowmeter.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -3143,7 +3660,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                flowmeter.Elev = elev;
            }
@@ -3157,6 +3674,14 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    flowmeter.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                        {
                            flowmeter.Elev += facade / 1000f;
                        }
                    }
                }
                else
                {
@@ -3312,6 +3837,11 @@
                pressmeter.UpdatePropStatus(nameof(pressmeter.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (pressmeter.Flags == null)
            {
                pressmeter.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -3367,7 +3897,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                pressmeter.Elev = elev;
            }
@@ -3381,6 +3911,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    pressmeter.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                pressmeter.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -3492,7 +4033,10 @@
            if (jobject.ParseString(RevitJsonProp.Name, out string name))
            {
                pipe.Name = name;
                pipe.UpdatePropStatus(nameof(pipe.Name), ePropStatus.Lack, "[构件名称]缺省");
                if (string.IsNullOrEmpty(pipe.Name))
                {
                    pipe.UpdatePropStatus(nameof(pipe.Name), ePropStatus.Lack, "[构件名称]缺省");
                }
            }
            else
            {
@@ -3522,7 +4066,7 @@
            if (jobject.ParseString(RevitJsonProp.Flags, out string flags))
            {
                pipe.Flags = Yw.Untity.FlagsHelper.ToList(flags);
                pipe.Flags = RevitFlagsHelper.ToList(flags);
                if (!string.IsNullOrEmpty(flags))
                {
                    if (pipe.Flags == null || pipe.Flags.Count < 1)
@@ -3534,6 +4078,11 @@
            else
            {
                pipe.UpdatePropStatus(nameof(pipe.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (pipe.Flags == null)
            {
                pipe.Flags = new List<string>();
            }
            #endregion
@@ -3657,7 +4206,8 @@
            #region Diameter
            if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter))
            //直径信息
            if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter))
            {
                pipe.Diameter = diameter;
            }
@@ -3666,11 +4216,26 @@
                pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Abnormal, "[直径信息]缺少或者格式错误");
            }
            //直径
            if (pipe.Diameter < 1)
            {
                if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out double internalDiameter))
                if (jobject[RevitJsonProp.Diameter].MatchNumeric(out diameter))
                {
                    pipe.Diameter = internalDiameter;
                    pipe.Diameter = diameter;
                    pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Lack, "[直径信息]通过[直径]进行修复]");
                }
                else
                {
                    pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Abnormal, "[直径信息]无法通过[直径]进行修复]");
                }
            }
            //内径
            if (pipe.Diameter < 1)
            {
                if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out diameter))
                {
                    pipe.Diameter = diameter;
                    pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Lack, "[直径信息]通过[内径]进行修复]");
                }
                else
@@ -3679,6 +4244,7 @@
                }
            }
            //公称直径
            if (pipe.Diameter < 1)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out double dn))
@@ -3694,8 +4260,7 @@
            if (pipe.Diameter < 1)
            {
                pipe.Diameter = 500;
                pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Lack, "[直径信息][内径]解析错误,使用默认值(500mm)修正]");
                pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Error, "[直径信息]解析错误,无法通过【直径】【内径】【公称直径】修复");
            }
            #endregion
@@ -3833,6 +4398,11 @@
                translation.UpdatePropStatus(nameof(translation.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (translation.Flags == null)
            {
                translation.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -3937,7 +4507,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                translation.Elev = elev;
            }
@@ -3951,6 +4521,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    translation.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                translation.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -3997,7 +4578,7 @@
            #region Diameter
            if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter))
            if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter))
            {
                translation.Diameter = diameter;
            }
@@ -4036,6 +4617,24 @@
            {
                translation.Diameter = 500;
                translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Lack, "[直径信息][内径]解析错误,使用默认值(500mm)修正]");
            }
            #endregion
            #region StartDiameter
            if (jobject[RevitJsonProp.MaxSize].MatchNumeric(out double maxSize))
            {
                translation.StartDiameter = maxSize;
            }
            #endregion
            #region EndDiameter
            if (jobject[RevitJsonProp.MinSize].MatchNumeric(out double minSize))
            {
                translation.EndDiameter = minSize;
            }
            #endregion
@@ -4172,6 +4771,11 @@
                pump.UpdatePropStatus(nameof(pump.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (pump.Flags == null)
            {
                pump.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -4276,7 +4880,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                pump.Elev = elev;
            }
@@ -4290,6 +4894,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    pump.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                pump.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -4570,6 +5185,11 @@
                valve.UpdatePropStatus(nameof(valve.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (valve.Flags == null)
            {
                valve.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -4647,7 +5267,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                valve.Elev = elev;
            }
@@ -4661,6 +5281,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    valve.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                valve.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -4734,7 +5365,7 @@
            #region Diameter
            if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter))
            if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter))
            {
                valve.Diameter = diameter;
            }
@@ -4745,9 +5376,9 @@
            if (valve.Diameter < 1)
            {
                if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out double internalDiameter))
                if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out diameter))
                {
                    valve.Diameter = internalDiameter;
                    valve.Diameter = diameter;
                    valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Lack, "[直径信息]通过[内径]进行修复]");
                }
                else
@@ -4758,9 +5389,9 @@
            if (valve.Diameter < 1)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out double dn))
                if (jobject[RevitJsonProp.DN].MatchNumeric(out diameter))
                {
                    valve.Diameter = dn;
                    valve.Diameter = diameter;
                    valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Lack, "[直径信息]通过[公称直径]进行修复]");
                }
                else
@@ -4771,8 +5402,33 @@
            if (valve.Diameter < 1)
            {
                valve.Diameter = 500;
                valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Lack, "[直径信息][内径]解析错误,使用默认值(500mm)修正]");
                if (jobject[RevitJsonProp.MaxSize].MatchNumeric(out diameter))
                {
                    valve.Diameter = diameter;
                    valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Lack, "[直径信息]通过[最大尺寸]进行修复]");
                }
                else
                {
                    valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Abnormal, "[直径信息]无法通过[最大尺寸]进行修复]");
                }
            }
            if (valve.Diameter < 1)
            {
                if (jobject[RevitJsonProp.MinSize].MatchNumeric(out diameter))
                {
                    valve.Diameter = diameter;
                    valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Lack, "[直径信息]通过[最小尺寸]进行修复]");
                }
                else
                {
                    valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Abnormal, "[直径信息]无法通过[最小尺寸]进行修复]");
                }
            }
            if (valve.Diameter < 1)
            {
                valve.UpdatePropStatus(nameof(valve.Diameter), ePropStatus.Lack, "[直径信息]解析错误,无法通过[内径][公称直径][最大尺寸][最小尺寸]修复");
            }
            #endregion
@@ -4845,7 +5501,7 @@
            else
            {
                valve.OpeningDegree = 100;
                valve.UpdatePropStatus(nameof(valve.MinorLoss), ePropStatus.Abnormal, "[阀门开度]缺少或者数据格式错误,使用默认值(100)进行修正");
                valve.UpdatePropStatus(nameof(valve.OpeningDegree), ePropStatus.Abnormal, "[阀门开度]缺少或者数据格式错误,使用默认值(100)进行修正");
            }
            #endregion
@@ -4946,6 +5602,11 @@
            else
            {
                exchanger.UpdatePropStatus(nameof(exchanger.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (exchanger.Flags == null)
            {
                exchanger.Flags = new List<string>();
            }
            #endregion
@@ -5052,7 +5713,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                exchanger.Elev = elev;
            }
@@ -5066,6 +5727,22 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    exchanger.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (!jre.HasValues)
                    {
                    }
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                exchanger.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -5112,7 +5789,7 @@
            #region Diameter
            if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter))
            if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter))
            {
                exchanger.Diameter = diameter;
            }
@@ -5266,6 +5943,11 @@
                compressor.UpdatePropStatus(nameof(compressor.Flags), ePropStatus.Error, "缺少[标签信息]");
            }
            if (compressor.Flags == null)
            {
                compressor.Flags = new List<string>();
            }
            #endregion
            #region Description
@@ -5370,7 +6052,7 @@
            #region Elev
            if (jobject[RevitJsonProp.Elev].MatchNumeric(out double elev))
            if (jobject[RevitJsonProp.ElevInfo].MatchNumeric(out double elev))
            {
                compressor.Elev = elev;
            }
@@ -5384,6 +6066,17 @@
                if (jobject[RevitJsonProp.ElevOfElevation].MatchNumeric(out double elevOfElevation))
                {
                    compressor.Elev = elevOfElevation / 1000f;
                    var jre = jobject[RevitJsonProp.Elev];
                    if (jre != null)
                    {
                        if (jre.HasValues)
                        {
                            if (jre[RevitJsonProp.ElevFacade].MatchNumeric(out double facade))
                            {
                                compressor.Elev += facade / 1000f;
                            }
                        }
                    }
                }
                else
                {
@@ -5430,7 +6123,7 @@
            #region Diameter
            if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter))
            if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter))
            {
                compressor.Diameter = diameter;
            }