lixiaojun
2025-01-20 bef933e7e166b085ba7e46e38ea62d9ae0129ec6
Service/HStation.Service.Revit.Core/04-service/01-json/RevitJsonHelper.cs
@@ -3748,19 +3748,6 @@
            #endregion
            #region CurrentFlow
            if (jobject[RevitJsonProp.CurrentFlow].MatchNumeric(out double currentFlow))
            {
                flowmeter.CurrentFlow = currentFlow;
            }
            else
            {
                flowmeter.UpdatePropStatus(nameof(flowmeter.CurrentFlow), ePropStatus.Abnormal, "[流量信息]缺少或者数据格式错误");
            }
            #endregion
            return flowmeter;
        }
@@ -3988,19 +3975,6 @@
            #endregion
            #region CurrentPress
            if (jobject[RevitJsonProp.CurrentPress].MatchNumeric(out double currentPress))
            {
                pressmeter.CurrentPress = currentPress;
            }
            else
            {
                pressmeter.UpdatePropStatus(nameof(pressmeter.CurrentPress), ePropStatus.Abnormal, "[压力信息]缺少或者数据格式错误");
            }
            #endregion
            return pressmeter;
        }
@@ -4066,7 +4040,7 @@
            if (jobject.ParseString(RevitJsonProp.Flags, out string flags))
            {
                pipe.Flags = RevitFlagsHelper.ToList(flags);
                pipe.Flags = FlagsHelper.ToList(flags);
                if (!string.IsNullOrEmpty(flags))
                {
                    if (pipe.Flags == null || pipe.Flags.Count < 1)
@@ -4572,51 +4546,6 @@
            else
            {
                translation.UpdatePropStatus(nameof(translation.Material), ePropStatus.Abnormal, "缺少[材质信息]");
            }
            #endregion
            #region Diameter
            if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter))
            {
                translation.Diameter = diameter;
            }
            else
            {
                translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Abnormal, "[直径信息]缺少或者格式错误");
            }
            if (translation.Diameter < 1)
            {
                if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out double internalDiameter))
                {
                    translation.Diameter = internalDiameter;
                    translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Lack, "[直径信息]通过[内径]进行修复]");
                }
                else
                {
                    translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Abnormal, "[直径信息]无法通过[内径]进行修复]");
                }
            }
            if (translation.Diameter < 1)
            {
                if (jobject[RevitJsonProp.DN].MatchNumeric(out double dn))
                {
                    translation.Diameter = dn;
                    translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Lack, "[直径信息]通过[公称直径]进行修复]");
                }
                else
                {
                    translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Abnormal, "[直径信息]无法通过[公称直径]进行修复]");
                }
            }
            if (translation.Diameter < 1)
            {
                translation.Diameter = 500;
                translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Lack, "[直径信息][内径]解析错误,使用默认值(500mm)修正]");
            }
            #endregion