| | |
| | | |
| | | #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; |
| | | } |
| | | |
| | |
| | | |
| | | #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; |
| | | } |
| | | |
| | |
| | | |
| | | 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) |
| | |
| | | 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 |