From 0f99680aff09e91f521b5909aab42811c1c3e6f1 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 09 四月 2025 15:28:16 +0800 Subject: [PATCH] 优化Revit=>HydroModelInfo转换方法 --- Service/HStation.Service.Assets.Core/02-model/17-Flowmeter/AssetsFlowmeterSeries.cs | 124 ++++++++++++++++++----------------------- 1 files changed, 55 insertions(+), 69 deletions(-) diff --git a/Service/HStation.Service.Assets.Core/02-model/17-Flowmeter/AssetsFlowmeterSeries.cs b/Service/HStation.Service.Assets.Core/02-model/17-Flowmeter/AssetsFlowmeterSeries.cs index 876ec95..db584f8 100644 --- a/Service/HStation.Service.Assets.Core/02-model/17-Flowmeter/AssetsFlowmeterSeries.cs +++ b/Service/HStation.Service.Assets.Core/02-model/17-Flowmeter/AssetsFlowmeterSeries.cs @@ -1,106 +1,92 @@ 锘縰sing Yw.Model; + namespace HStation.Model { /// <summary> /// 娴侀噺璁$郴鍒� - ///</summary> - [SysType("assets-flowmeter-series")] - public class AssetsFlowmeterSeries : BaseModel , IParas, IFlags, ITagName, ITreeSorter, System.ICloneable + /// </summary> + public class AssetsFlowmeterSeries : BaseModel, IParas, IFlags, ITagName, ITreeSorter, System.ICloneable { - /// <summary> - /// - /// </summary> - public AssetsFlowmeterSeries() { } + /// <summary> + /// + /// </summary> + public AssetsFlowmeterSeries() { } - /// <summary> - /// - /// </summary> - public AssetsFlowmeterSeries(AssetsFlowmeterSeries rhs) : base(rhs) - { - this.CatalogID=rhs.CatalogID; - this.Name=rhs.Name; + /// <summary> + /// + /// </summary> + public AssetsFlowmeterSeries(AssetsFlowmeterSeries rhs) : base(rhs) + { this.ParentIds = rhs.ParentIds?.ToList(); - this.Paras = rhs.Paras == null ? null : new (rhs.Paras); + this.Name = rhs.Name; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(); this.Flags = rhs.Flags?.ToList(); - this.TagName=rhs.TagName; - this.SortCode=rhs.SortCode; - this.Description=rhs.Description; - } + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } - /// <summary> - /// - /// </summary> - public void Reset(AssetsFlowmeterSeries rhs) - { - this.ID=rhs.ID; - this.CatalogID=rhs.CatalogID; - this.Name=rhs.Name; + /// <summary> + /// + /// </summary> + public void Reset(AssetsFlowmeterSeries rhs) + { + this.ID = rhs.ID; this.ParentIds = rhs.ParentIds?.ToList(); - this.Paras = rhs.Paras == null ? null : new (rhs.Paras); + this.Name = rhs.Name; + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(); this.Flags = rhs.Flags?.ToList(); - this.TagName=rhs.TagName; - this.SortCode=rhs.SortCode; - this.Description=rhs.Description; - } - + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } /// <summary> - /// 鎵�灞炵被鍒獻D - ///</summary> - public long CatalogID { get; set; } - - /// <summary> - /// 鍚嶇О - ///</summary> - public string Name { get; set; } - - /// <summary> - /// 鐖剁骇id鍒楄〃锛堢増鏈帶鍒� - ///</summary> + /// 鐖剁骇id鍒楄〃 + /// </summary> public List<long> ParentIds { get; set; } - + /// <summary> - /// 鍙傛暟 - ///</summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> public Dictionary<string, string> Paras { get; set; } - + /// <summary> - /// 鏍囩 - ///</summary> + /// 鏍囩 + /// </summary> public List<string> Flags { get; set; } - + /// <summary> - /// 鏍囧織 - ///</summary> + /// 鏍囧織 + /// </summary> public string TagName { get; set; } - + /// <summary> - /// 鎺掑簭鐮� - ///</summary> + /// 鎺掑簭鐮� + /// </summary> public int SortCode { get; set; } - + /// <summary> - /// 璇存槑 - ///</summary> + /// 璇存槑 + /// </summary> public string Description { get; set; } - /// <summary> /// /// </summary> public AssetsFlowmeterSeries Clone() { - return (AssetsFlowmeterSeries)this.MemberwiseClone(); + return new AssetsFlowmeterSeries(this); } object ICloneable.Clone() { - return this.MemberwiseClone(); + return this.Clone(); } - } -} - - - - +} \ No newline at end of file -- Gitblit v1.9.3