From 9be9ba4e159969fb5e32648c2c34e912ccc3ae6d Mon Sep 17 00:00:00 2001 From: duheng <2286773002@qq.com> Date: 星期五, 28 三月 2025 14:22:42 +0800 Subject: [PATCH] 优化细节问题 --- Service/HStation.Service.Assets.Core/02-model/16-Meter/AssetsMeterMain.cs | 164 ++++++++++++++++++++++++------------------------------ 1 files changed, 73 insertions(+), 91 deletions(-) diff --git a/Service/HStation.Service.Assets.Core/02-model/16-Meter/AssetsMeterMain.cs b/Service/HStation.Service.Assets.Core/02-model/16-Meter/AssetsMeterMain.cs index 337dbf4..2a3af91 100644 --- a/Service/HStation.Service.Assets.Core/02-model/16-Meter/AssetsMeterMain.cs +++ b/Service/HStation.Service.Assets.Core/02-model/16-Meter/AssetsMeterMain.cs @@ -1,127 +1,109 @@ 锘縰sing Yw.Model; + namespace HStation.Model { /// <summary> - /// 姘存睜 - ///</summary> - [SysType("assets-meter-main")] - public class AssetsMeterMain : BaseModel , IParas, IFlags, ITagName, ISorter, System.ICloneable + /// 姘磋〃鍨嬪彿 + /// </summary> + public class AssetsMeterMain : BaseModel, IParas, IFlags, ITagName, ISorter, System.ICloneable { - /// <summary> - /// - /// </summary> - public AssetsMeterMain() { } - - /// <summary> - /// - /// </summary> - public AssetsMeterMain(AssetsMeterMain rhs) : base(rhs) - { - this.Name=rhs.Name; - this.SeriesID=rhs.SeriesID; - this.Caliber=rhs.Caliber; - this.Material=rhs.Material; - this.MinorLoss=rhs.MinorLoss; - this.KeyWord=rhs.KeyWord; - this.Paras = rhs.Paras == null ? null : new (rhs.Paras); - this.Flags = rhs.Flags?.ToList(); - this.TagName=rhs.TagName; - this.SortCode=rhs.SortCode; - this.Description=rhs.Description; - } - - /// <summary> - /// - /// </summary> - public void Reset(AssetsMeterMain rhs) - { - this.ID=rhs.ID; - this.Name=rhs.Name; - this.SeriesID=rhs.SeriesID; - this.Caliber=rhs.Caliber; - this.Material=rhs.Material; - this.MinorLoss=rhs.MinorLoss; - this.KeyWord=rhs.KeyWord; - this.Paras = rhs.Paras == null ? null : new (rhs.Paras); - this.Flags = rhs.Flags?.ToList(); - this.TagName=rhs.TagName; - this.SortCode=rhs.SortCode; - this.Description=rhs.Description; - } - + /// <summary> + /// + /// </summary> + public AssetsMeterMain() { } /// <summary> - /// 鍚嶇О - ///</summary> - public string Name { get; set; } - + /// + /// </summary> + public AssetsMeterMain(AssetsMeterMain rhs) : base(rhs) + { + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.MinorLoss = rhs.MinorLoss; + this.KeyWords = rhs.KeyWords?.ToList(); + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + /// <summary> - /// 绯诲垪ID - ///</summary> + /// + /// </summary> + public void Reset(AssetsMeterMain rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.MinorLoss = rhs.MinorLoss; + this.KeyWords = rhs.KeyWords?.ToList(); + this.Paras = rhs.Paras == null ? null : new Dictionary<string, string>(rhs.Paras); + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// 绯诲垪id + /// </summary> public long SeriesID { get; set; } - + /// <summary> - /// 鍙e緞 - ///</summary> - public double? Caliber { get; set; } - + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + /// <summary> - /// 鏉愭枡 - ///</summary> - public string Material { get; set; } - - /// <summary> - /// 灞�闃荤郴鏁� - ///</summary> + /// 灞�闃荤郴鏁� + /// </summary> public double MinorLoss { get; set; } - + /// <summary> - /// 璇嗗埆鍏抽敭瀛� - ///</summary> - public string KeyWord { get; set; } - + /// 鍏抽敭瀛� + /// </summary> + public List<string> KeyWords { get; set; } + /// <summary> - /// 鍙傛暟 - ///</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 AssetsMeterMain Clone() { - return (AssetsMeterMain)this.MemberwiseClone(); + return new AssetsMeterMain(this); } object ICloneable.Clone() { - return this.MemberwiseClone(); + return this.Clone(); } + } -} - - - - +} \ No newline at end of file -- Gitblit v1.9.3