From 4265cdf374c215edf5284cb7fc751060266ec473 Mon Sep 17 00:00:00 2001
From: duheng <2286773002@qq.com>
Date: 星期一, 07 四月 2025 17:34:51 +0800
Subject: [PATCH] 增加供水设备表

---
 Dto/PBS.Dto/05-water-equipment/UpdateWaterEquipmentInput.cs                    |   52 ++
 Service/PBS.Service/05-service/04-elec-price/cache/ElecPriceCacheHelper.cs     |    0 
 Service/PBS.Service/01-entity/04-elec-price/ElecPrice.cs                       |    0 
 Dto/PBS.Dto/05-water-equipment/WaterEquipmentDto.cs                            |   75 +++
 Service/PBS.Service/05-service/05-water-equipment/WaterEquipment.cs            |  283 ++++++++++++
 BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment_Instance.cs               |   86 +++
 Service/PBS.Service/05-service/04-elec-price/ElecPrice.cs                      |    0 
 Service/PBS.Service/05-service/05-water-equipment/WaterEquipment_Instance.cs   |   62 ++
 Service/PBS.Service/04-dal/03-sqlite/05-water-equipment/WaterEquipment.cs      |   18 
 Service/PBS.Service/01-entity/05-water-equipment/WaterEquipment.cs             |   88 +++
 Service/PBS.Service/05-service/05-water-equipment/WaterEquipmentCacheHelper.cs |   70 +++
 Vmo/PBS.Vmo/06-IBoxViewModel/IBoxControllViewModel.cs                          |    0 
 BLL/PBS.BLL/03-localclient/05-water-equipment/WaterEquipment.cs                |  216 +++++++++
 Service/PBS.Service/04-dal/02-postgresql/05-water-equipment/WaterEquipment.cs  |   19 
 Vmo/PBS.Vmo/06-IBoxViewModel/IBoxDataHelper.cs                                 |    0 
 BLL/PBS.BLL/01-interface/05-water-equipment/IWaterEquipment.cs                 |   11 
 WinFrmUI/PBS.WinFrmUI/03-elecPrice/ElecPriceMgr.cs                             |    2 
 Dto/PBS.Dto/05-water-equipment/AddWaterEquipmentInput.cs                       |   46 ++
 Service/PBS.Service/05-service/00-core/03-helper/DbFirstHelper.cs              |    1 
 BLL/PBS.BLL/02-httpclient/05-water-equipment/WaterEquipment.cs                 |   18 
 Service/PBS.Service/04-dal/01-interface/05-water-equipment/IWaterEquipment.cs  |   11 
 WinFrmUI/Yw.WinFrmUI.Core/00-core/GridViewExtensions.cs                        |   22 
 Service/PBS.Service/02-model/05-water-equipment/WaterEquipment.cs              |  101 ++++
 Vmo/PBS.Vmo/05-water-equipment/WaterEquipmentVmo.cs                            |   75 +++
 Service/PBS.Service/05-service/04-elec-price/ElecPrice_Instance.cs             |    0 
 BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment.cs                        |  123 +++++
 26 files changed, 1,359 insertions(+), 20 deletions(-)

diff --git a/BLL/PBS.BLL/01-interface/05-water-equipment/IWaterEquipment.cs b/BLL/PBS.BLL/01-interface/05-water-equipment/IWaterEquipment.cs
new file mode 100644
index 0000000..aaa763c
--- /dev/null
+++ b/BLL/PBS.BLL/01-interface/05-water-equipment/IWaterEquipment.cs
@@ -0,0 +1,11 @@
+锘縰sing Yw.CAL;
+
+namespace PBS.CAL
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public interface IWaterEquipment : IBaseCAL<AddWaterEquipmentInput, UpdateWaterEquipmentInput, WaterEquipmentDto>, IUpdateSorter
+    {
+    }
+}
\ No newline at end of file
diff --git a/BLL/PBS.BLL/02-httpclient/05-water-equipment/WaterEquipment.cs b/BLL/PBS.BLL/02-httpclient/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..e49ae89
--- /dev/null
+++ b/BLL/PBS.BLL/02-httpclient/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,18 @@
+锘縰sing Flurl.Http;
+using Yw;
+using Yw.CAL.HttpClient;
+using Yw.Untity;
+
+namespace PBS.CAL.HttpClient
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class WaterEquipment : BaseCAL_Sorter<AddWaterEquipmentInput, UpdateWaterEquipmentInput, WaterEquipmentDto>, IWaterEquipment
+    {
+        protected override string Prefix
+        {
+            get { return $"{ConfigHelper.HttpUrl}/WaterEquipment"; }
+        }
+    }
+}
\ No newline at end of file
diff --git a/BLL/PBS.BLL/03-localclient/05-water-equipment/WaterEquipment.cs b/BLL/PBS.BLL/03-localclient/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..da5f41c
--- /dev/null
+++ b/BLL/PBS.BLL/03-localclient/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,216 @@
+锘縩amespace PBS.CAL.LocalClient
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class WaterEquipment : IWaterEquipment
+    {
+        private readonly Service.WaterEquipment _service = new();
+
+        #region Query
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈�
+        /// </summary>
+        public async Task<List<WaterEquipmentDto>> GetAll()
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var list = _service.GetAll();
+                var vm_list = list?.Select(x => new WaterEquipmentDto(x)).ToList();
+                return vm_list;
+            });
+        }
+
+        /// <summary>
+        /// 閫氳繃 ID 鑾峰彇
+        /// </summary>
+        public async Task<WaterEquipmentDto> GetByID(long ID)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var model = _service.GetByID(ID);
+                return model == null ? null : new WaterEquipmentDto(model);
+            });
+        }
+
+        /// <summary>
+        /// 閫氳繃 Ids 鑾峰彇
+        /// </summary>
+        public async Task<List<WaterEquipmentDto>> GetByIds(List<long> Ids)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var list = _service.GetByIds(Ids);
+                var vm_list = list?.Select(x => new WaterEquipmentDto(x)).ToList();
+                return vm_list;
+            });
+        }
+
+        /// <summary>
+        /// 鑾峰彇鏈�澶ф帓搴忕爜
+        /// </summary>
+        public async Task<int> GetMaxSortCode()
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var sort_code = _service.GetMaxSortCode();
+                return sort_code;
+            });
+        }
+
+        #endregion Query
+
+        #region Insert
+
+        /// <summary>
+        /// 鎻掑叆涓�鏉�
+        /// </summary>
+        public async Task<long> Insert(AddWaterEquipmentInput input)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var model = input.Adapt<AddWaterEquipmentInput, Model.WaterEquipment>();
+                model.SortCode = _service.GetMaxSortCode() + 1;
+                var id = _service.Insert(model);
+                return id;
+            });
+        }
+
+        /// <summary>
+        /// 鎵归噺鎻掑叆
+        /// </summary>
+        public async Task<bool> Inserts(List<AddWaterEquipmentInput> inputList)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                return false;
+            });
+        }
+
+        /// <summary>
+        /// 澶ф壒閲忔彃鍏�
+        /// </summary>
+        public async Task<bool> BulkInserts(List<AddWaterEquipmentInput> list)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                return false;
+            });
+        }
+
+        #endregion Insert
+
+        #region Update
+
+        /// <summary>
+        /// 鏇存柊涓�鏉�
+        /// </summary>
+        public async Task<bool> Update(UpdateWaterEquipmentInput input)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var model = _service.GetByID(input.ID);
+                if (model == null)
+                {
+                    throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�");
+                }
+                var rhs = new Model.WaterEquipment(model);
+                input.Adapt(rhs);
+                var bol = _service.Update(rhs);
+                return bol;
+            });
+        }
+
+        /// <summary>
+        /// 鎵归噺鏇存柊
+        /// </summary>
+        public async Task<bool> Updates(List<UpdateWaterEquipmentInput> inputList)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                return false;
+            });
+        }
+
+        /// <summary>
+        /// 澶ф壒閲忔洿鏂�
+        /// </summary>
+        public async Task<bool> BulkUpdates(List<UpdateWaterEquipmentInput> list)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                return false;
+            });
+        }
+
+        /// <summary>
+        /// 鏇存柊鎺掑簭鐮�
+        /// </summary>
+        public async Task<bool> UpdateSortCode(long ID, int SortCode)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var bol = _service.UpdateSortCode(ID, SortCode);
+                return bol;
+            });
+        }
+
+        /// <summary>
+        /// 鏇存柊鎺掑簭
+        /// </summary>
+        public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList();
+                var bol = _service.UpdateSorter(list);
+                return bol;
+            });
+        }
+
+        #endregion Update
+
+        #region Delete
+
+        /// <summary>
+        /// 閫氳繃 ID 鍒犻櫎
+        /// </summary>
+        public async Task<bool> DeleteByID(long ID)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var bol = _service.DeleteByID(ID, out string msg);
+                if (!bol)
+                {
+                    throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg);
+                }
+                return true;
+            });
+        }
+
+        /// <summary>
+        /// 閫氳繃 Ids 鍒犻櫎
+        /// </summary>
+        public async Task<bool> DeleteByIds(List<long> Ids)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                return false;
+            });
+        }
+
+        /// <summary>
+        /// 鍏ㄩ儴鍒犻櫎
+        /// </summary>
+        public async Task<bool> DeleteAll()
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                return false;
+            });
+        }
+
+        #endregion Delete
+    }
+}
\ No newline at end of file
diff --git a/BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment.cs b/BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..30a92ea
--- /dev/null
+++ b/BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,123 @@
+锘縰sing Yw.BLL;
+
+namespace PBS.BLL
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public partial class WaterEquipment
+    {
+        private readonly CAL.IWaterEquipment _cal = CALCreateHelper.CreateCAL<CAL.IWaterEquipment>();
+
+        #region Query
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈�
+        /// </summary>
+        public virtual async Task<List<Vmo.WaterEquipmentVmo>> GetAll()
+        {
+            var dtoList = await _cal.GetAll();
+            return Dto2Vmos(dtoList);
+        }
+
+        /// <summary>
+        /// 閫氳繃 ID 鑾峰彇
+        /// </summary>
+        public virtual async Task<Vmo.WaterEquipmentVmo> GetByID(long ID)
+        {
+            var dto = await _cal.GetByID(ID);
+            return Dto2Vmo(dto);
+        }
+
+        /// <summary>
+        /// 閫氳繃 Ids 鑾峰彇
+        /// </summary>
+        public virtual async Task<List<Vmo.WaterEquipmentVmo>> GetByIds(List<long> Ids)
+        {
+            var dtoList = await _cal.GetByIds(Ids);
+            return Dto2Vmos(dtoList);
+        }
+
+        #endregion Query
+
+        #region Insert
+
+        /// <summary>
+        /// 鎻掑叆涓�鏉�
+        /// </summary>
+        public virtual async Task<long> Insert(Vmo.WaterEquipmentVmo vmo)
+        {
+            var dto = Vmo2AddDto(vmo);
+            var id = await _cal.Insert(dto);
+            return id;
+        }
+
+        /// <summary>
+        /// 鎻掑叆澶氭潯
+        /// </summary>
+        public virtual async Task<bool> Inserts(List<Vmo.WaterEquipmentVmo> vmoList)
+        {
+            var dtoList = Vmo2AddDtos(vmoList);
+            var bol = await _cal.Inserts(dtoList);
+            return bol;
+        }
+
+        #endregion Insert
+
+        #region Update
+
+        /// <summary>
+        /// 鏇存柊
+        /// </summary>
+        public virtual async Task<bool> Update(Vmo.WaterEquipmentVmo vmo)
+        {
+            var dto = Vmo2UpdateDto(vmo);
+            var bol = await _cal.Update(dto);
+            return bol;
+        }
+
+        /// <summary>
+        /// 鎵归噺鏇存柊
+        /// </summary>
+        public virtual async Task<bool> Updates(List<Vmo.WaterEquipmentVmo> vmoList)
+        {
+            var dtoList = Vmo2UpdateDtos(vmoList);
+            var bol = await _cal.Updates(dtoList);
+            return bol;
+        }
+
+        /// <summary>
+        /// 鏇存柊鎺掑簭鐮�
+        /// </summary>
+        public virtual async Task<bool> UpdateSortCode(long ID, int SortCode)
+        {
+            var bol = await _cal.UpdateSortCode(ID, SortCode);
+            return bol;
+        }
+
+        /// <summary>
+        /// 鎵归噺鏇存柊鎺掑簭鐮�
+        /// </summary>
+        public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters)
+        {
+            var dtoList = Sorters.ToDtoList();
+            var bol = await _cal.UpdateSorter(dtoList);
+            return bol;
+        }
+
+        #endregion Update
+
+        #region Delete
+
+        /// <summary>
+        /// 閫氳繃 ID 鍒犻櫎
+        /// </summary>
+        public virtual async Task<bool> DeleteByID(long ID)
+        {
+            var bol = await _cal.DeleteByID(ID);
+            return bol;
+        }
+
+        #endregion Delete
+    }
+}
\ No newline at end of file
diff --git a/BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment_Instance.cs b/BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment_Instance.cs
new file mode 100644
index 0000000..ff275c0
--- /dev/null
+++ b/BLL/PBS.BLL/04-bll/05-water-equipment/WaterEquipment_Instance.cs
@@ -0,0 +1,86 @@
+锘縩amespace PBS.BLL
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public partial class WaterEquipment
+    {
+        //dto to vmo
+        internal static Vmo.WaterEquipmentVmo Dto2Vmo(Dto.WaterEquipmentDto dto)
+        {
+            if (dto == null)
+            {
+                return default;
+            }
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.WaterEquipmentDto, Vmo.WaterEquipmentVmo>()
+            ).CreateMapper();
+            var vmo = mapper.Map<Dto.WaterEquipmentDto, Vmo.WaterEquipmentVmo>(dto);
+            return vmo;
+        }
+
+        //dto to vmos
+        internal static List<Vmo.WaterEquipmentVmo> Dto2Vmos(List<Dto.WaterEquipmentDto> dtos)
+        {
+            if (dtos == null || dtos.Count < 1)
+            {
+                return default;
+            }
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Dto.WaterEquipmentDto, Vmo.WaterEquipmentVmo>()
+            ).CreateMapper();
+            var vmos = mapper.Map<List<Dto.WaterEquipmentDto>, List<Vmo.WaterEquipmentVmo>>(dtos);
+            return vmos;
+        }
+
+        //vmo to add dto
+        internal static Dto.AddWaterEquipmentInput Vmo2AddDto(Vmo.WaterEquipmentVmo vmo)
+        {
+            if (vmo == null)
+            {
+                return default;
+            }
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.WaterEquipmentVmo, Dto.AddWaterEquipmentInput>()
+            ).CreateMapper();
+            var dto = mapper.Map<Vmo.WaterEquipmentVmo, Dto.AddWaterEquipmentInput>(vmo);
+            return dto;
+        }
+
+        //vmo to add dtos
+        internal static List<Dto.AddWaterEquipmentInput> Vmo2AddDtos(List<Vmo.WaterEquipmentVmo> vmoList)
+        {
+            if (vmoList == null || vmoList.Count < 1)
+            {
+                return default;
+            }
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.WaterEquipmentVmo, Dto.AddWaterEquipmentInput>()
+            ).CreateMapper();
+            var dtoList = mapper.Map<List<Vmo.WaterEquipmentVmo>, List<Dto.AddWaterEquipmentInput>>(vmoList);
+            return dtoList;
+        }
+
+        //vmo to update dto
+        internal static Dto.UpdateWaterEquipmentInput Vmo2UpdateDto(Vmo.WaterEquipmentVmo vmo)
+        {
+            if (vmo == null)
+            {
+                return default;
+            }
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.WaterEquipmentVmo, Dto.UpdateWaterEquipmentInput>()
+            ).CreateMapper();
+            var dto = mapper.Map<Vmo.WaterEquipmentVmo, Dto.UpdateWaterEquipmentInput>(vmo);
+            return dto;
+        }
+
+        //vmo to update dtos
+        internal static List<Dto.UpdateWaterEquipmentInput> Vmo2UpdateDtos(List<Vmo.WaterEquipmentVmo> vmoList)
+        {
+            if (vmoList == null || vmoList.Count < 1)
+            {
+                return default;
+            }
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Vmo.WaterEquipmentVmo, Dto.UpdateWaterEquipmentInput>()
+            ).CreateMapper();
+            var dtoList = mapper.Map<List<Vmo.WaterEquipmentVmo>, List<Dto.UpdateWaterEquipmentInput>>(vmoList);
+            return dtoList;
+        }
+    }
+}
\ No newline at end of file
diff --git a/Dto/PBS.Dto/05-water-equipment/AddWaterEquipmentInput.cs b/Dto/PBS.Dto/05-water-equipment/AddWaterEquipmentInput.cs
new file mode 100644
index 0000000..029ad65
--- /dev/null
+++ b/Dto/PBS.Dto/05-water-equipment/AddWaterEquipmentInput.cs
@@ -0,0 +1,46 @@
+锘縰sing System.ComponentModel.DataAnnotations;
+
+namespace PBS.Dto
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class AddWaterEquipmentInput
+    {
+        /// <summary>
+        /// 绯荤粺鍚嶇О
+        ///</summary>
+        [Required]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 鍙潬鎬у緱鍒�
+        ///</summary>
+        public int Reliability { get; set; }
+
+        /// <summary>
+        /// 瀹夊叏鎬у緱鍒�
+        ///</summary>
+        public int Safety { get; set; }
+
+        /// <summary>
+        /// 鍗敓寰楀垎
+        ///</summary>
+        public int Hygiene { get; set; }
+
+        /// <summary>
+        /// 鑺傝兘寰楀垎
+        ///</summary>
+        public int SaveEnergy { get; set; }
+
+        /// <summary>
+        /// 绯荤粺缁勬垚寰楀垎
+        ///</summary>
+        public int SystemComposition { get; set; }
+
+        /// <summary>
+        /// 璇存槑
+        ///</summary>
+        public string Description { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/Dto/PBS.Dto/05-water-equipment/UpdateWaterEquipmentInput.cs b/Dto/PBS.Dto/05-water-equipment/UpdateWaterEquipmentInput.cs
new file mode 100644
index 0000000..e69f516
--- /dev/null
+++ b/Dto/PBS.Dto/05-water-equipment/UpdateWaterEquipmentInput.cs
@@ -0,0 +1,52 @@
+锘縰sing System.ComponentModel.DataAnnotations;
+
+namespace PBS.Dto
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class UpdateWaterEquipmentInput
+    {
+        /// <summary>
+        /// 鏍囪瘑
+        ///</summary>
+        [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")]
+        public long ID { get; set; }
+
+        /// <summary>
+        /// 绯荤粺鍚嶇О
+        ///</summary>
+        [Required]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 鍙潬鎬у緱鍒�
+        ///</summary>
+        public int Reliability { get; set; }
+
+        /// <summary>
+        /// 瀹夊叏鎬у緱鍒�
+        ///</summary>
+        public int Safety { get; set; }
+
+        /// <summary>
+        /// 鍗敓寰楀垎
+        ///</summary>
+        public int Hygiene { get; set; }
+
+        /// <summary>
+        /// 鑺傝兘寰楀垎
+        ///</summary>
+        public int SaveEnergy { get; set; }
+
+        /// <summary>
+        /// 绯荤粺缁勬垚寰楀垎
+        ///</summary>
+        public int SystemComposition { get; set; }
+
+        /// <summary>
+        /// 璇存槑
+        ///</summary>
+        public string Description { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/Dto/PBS.Dto/05-water-equipment/WaterEquipmentDto.cs b/Dto/PBS.Dto/05-water-equipment/WaterEquipmentDto.cs
new file mode 100644
index 0000000..6403f74
--- /dev/null
+++ b/Dto/PBS.Dto/05-water-equipment/WaterEquipmentDto.cs
@@ -0,0 +1,75 @@
+锘縩amespace PBS.Dto
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class WaterEquipmentDto
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipmentDto()
+        { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipmentDto(Model.WaterEquipment rhs)
+        {
+            this.ID = rhs.ID;
+            this.Name = rhs.Name;
+            this.Reliability = rhs.Reliability;
+            this.Safety = rhs.Safety;
+            this.Hygiene = rhs.Hygiene;
+            this.SaveEnergy = rhs.SaveEnergy;
+            this.SystemComposition = rhs.SystemComposition;
+            this.SortCode = rhs.SortCode;
+            this.Description = rhs.Description;
+        }
+
+        /// <summary>
+        /// 鏍囪瘑
+        ///</summary>
+        public long ID { get; set; }
+
+        /// <summary>
+        /// 绯荤粺鍚嶇О
+        ///</summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 鍙潬鎬у緱鍒�
+        ///</summary>
+        public int Reliability { get; set; }
+
+        /// <summary>
+        /// 瀹夊叏鎬у緱鍒�
+        ///</summary>
+        public int Safety { get; set; }
+
+        /// <summary>
+        /// 鍗敓寰楀垎
+        ///</summary>
+        public int Hygiene { get; set; }
+
+        /// <summary>
+        /// 鑺傝兘寰楀垎
+        ///</summary>
+        public int SaveEnergy { get; set; }
+
+        /// <summary>
+        /// 绯荤粺缁勬垚寰楀垎
+        ///</summary>
+        public int SystemComposition { get; set; }
+
+        /// <summary>
+        /// 鎺掑簭鐮�
+        ///</summary>
+        public int SortCode { get; set; }
+
+        /// <summary>
+        /// 璇存槑
+        ///</summary>
+        public string Description { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/01-entity/04-elec_price/ElecPrice.cs b/Service/PBS.Service/01-entity/04-elec-price/ElecPrice.cs
similarity index 100%
rename from Service/PBS.Service/01-entity/04-elec_price/ElecPrice.cs
rename to Service/PBS.Service/01-entity/04-elec-price/ElecPrice.cs
diff --git a/Service/PBS.Service/01-entity/05-water-equipment/WaterEquipment.cs b/Service/PBS.Service/01-entity/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..fb2d176
--- /dev/null
+++ b/Service/PBS.Service/01-entity/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,88 @@
+锘縰sing Yw.Entity;
+
+namespace PBS.Entity
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    [SysType("pbs_water_equipment")]
+    [SugarTable("pbs_water_equipment")]
+    public class WaterEquipment : BaseEntity, ISorter, System.ICloneable
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipment()
+        { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipment(WaterEquipment rhs) : base(rhs)
+        {
+            this.Name = rhs.Name;
+            this.Reliability = rhs.Reliability;
+            this.Safety = rhs.Safety;
+            this.Hygiene = rhs.Hygiene;
+            this.SaveEnergy = rhs.SaveEnergy;
+            this.SystemComposition = rhs.SystemComposition;
+            this.SortCode = rhs.SortCode;
+            this.Description = rhs.Description;
+        }
+
+        /// <summary>
+        /// 绯荤粺鍚嶇О
+        ///</summary>
+        [SugarColumn(Length = 50, IsNullable = true)]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 鍙潬鎬у緱鍒�
+        ///</summary>
+        public int Reliability { get; set; }
+
+        /// <summary>
+        /// 瀹夊叏鎬у緱鍒�
+        ///</summary>
+        public int Safety { get; set; }
+
+        /// <summary>
+        /// 鍗敓寰楀垎
+        ///</summary>
+        public int Hygiene { get; set; }
+
+        /// <summary>
+        /// 鑺傝兘寰楀垎
+        ///</summary>
+        public int SaveEnergy { get; set; }
+
+        /// <summary>
+        /// 绯荤粺缁勬垚寰楀垎
+        ///</summary>
+        public int SystemComposition { get; set; }
+
+        /// <summary>
+        /// 鎺掑簭鐮�
+        ///</summary>
+        public int SortCode { get; set; }
+
+        /// <summary>
+        /// 璇存槑
+        ///</summary>
+        [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
+        public string Description { get; set; }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipment Clone()
+        {
+            return (WaterEquipment)this.MemberwiseClone();
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.MemberwiseClone();
+        }
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/02-model/05-water-equipment/WaterEquipment.cs b/Service/PBS.Service/02-model/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..523b006
--- /dev/null
+++ b/Service/PBS.Service/02-model/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,101 @@
+锘縰sing Yw.Model;
+
+namespace PBS.Model
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    [SysType("pbs_water_equipment")]
+    public class WaterEquipment : BaseModel, ISorter, System.ICloneable
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipment()
+        { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipment(WaterEquipment rhs) : base(rhs)
+        {
+            this.Name = rhs.Name;
+            this.Reliability = rhs.Reliability;
+            this.Safety = rhs.Safety;
+            this.Hygiene = rhs.Hygiene;
+            this.SaveEnergy = rhs.SaveEnergy;
+            this.SystemComposition = rhs.SystemComposition;
+            this.SortCode = rhs.SortCode;
+            this.Description = rhs.Description;
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public void Reset(WaterEquipment rhs)
+        {
+            this.ID = rhs.ID;
+            this.Name = rhs.Name;
+            this.Reliability = rhs.Reliability;
+            this.Safety = rhs.Safety;
+            this.Hygiene = rhs.Hygiene;
+            this.SaveEnergy = rhs.SaveEnergy;
+            this.SystemComposition = rhs.SystemComposition;
+            this.SortCode = rhs.SortCode;
+            this.Description = rhs.Description;
+        }
+
+        /// <summary>
+        /// 绯荤粺鍚嶇О
+        ///</summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 鍙潬鎬у緱鍒�
+        ///</summary>
+        public int Reliability { get; set; }
+
+        /// <summary>
+        /// 瀹夊叏鎬у緱鍒�
+        ///</summary>
+        public int Safety { get; set; }
+
+        /// <summary>
+        /// 鍗敓寰楀垎
+        ///</summary>
+        public int Hygiene { get; set; }
+
+        /// <summary>
+        /// 鑺傝兘寰楀垎
+        ///</summary>
+        public int SaveEnergy { get; set; }
+
+        /// <summary>
+        /// 绯荤粺缁勬垚寰楀垎
+        ///</summary>
+        public int SystemComposition { get; set; }
+
+        /// <summary>
+        /// 鎺掑簭鐮�
+        ///</summary>
+        public int SortCode { get; set; }
+
+        /// <summary>
+        /// 璇存槑
+        ///</summary>
+        public string Description { get; set; }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipment Clone()
+        {
+            return (WaterEquipment)this.MemberwiseClone();
+        }
+
+        object ICloneable.Clone()
+        {
+            return this.MemberwiseClone();
+        }
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/04-dal/01-interface/05-water-equipment/IWaterEquipment.cs b/Service/PBS.Service/04-dal/01-interface/05-water-equipment/IWaterEquipment.cs
new file mode 100644
index 0000000..cb2c4be
--- /dev/null
+++ b/Service/PBS.Service/04-dal/01-interface/05-water-equipment/IWaterEquipment.cs
@@ -0,0 +1,11 @@
+锘縰sing Yw.DAL;
+
+namespace PBS.DAL
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public interface IWaterEquipment : IBaseDAL<Entity.WaterEquipment>, IUpdateSorter
+    {
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/04-dal/02-postgresql/05-water-equipment/WaterEquipment.cs b/Service/PBS.Service/04-dal/02-postgresql/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..9e04a25
--- /dev/null
+++ b/Service/PBS.Service/04-dal/02-postgresql/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,19 @@
+锘縰sing PBS;
+using Yw.DAL.PostgreSql;
+
+namespace PBS.DAL.PostgreSql
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class WaterEquipment : BaseDAL_Sorter<Entity.WaterEquipment>, IWaterEquipment
+    {
+        /// <summary>
+		///
+		/// </summary>
+		public override ConnectionConfig ConnectionConfig
+        {
+            get { return ConfigHelper.PostgreSqlConnectionConfig; }
+        }
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/04-dal/03-sqlite/05-water-equipment/WaterEquipment.cs b/Service/PBS.Service/04-dal/03-sqlite/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..8236970
--- /dev/null
+++ b/Service/PBS.Service/04-dal/03-sqlite/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,18 @@
+锘縰sing Yw.DAL.SQLite;
+
+namespace PBS.DAL.SQLite
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class WaterEquipment : BaseDAL_Sorter<Entity.WaterEquipment>, IWaterEquipment
+    {
+        /// <summary>
+		///
+		/// </summary>
+		public override ConnectionConfig ConnectionConfig
+        {
+            get { return ConfigHelper.SQLiteConnectionConfig; }
+        }
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/05-service/00-core/03-helper/DbFirstHelper.cs b/Service/PBS.Service/05-service/00-core/03-helper/DbFirstHelper.cs
index 8c503cb..a6989f8 100644
--- a/Service/PBS.Service/05-service/00-core/03-helper/DbFirstHelper.cs
+++ b/Service/PBS.Service/05-service/00-core/03-helper/DbFirstHelper.cs
@@ -46,6 +46,7 @@
                      typeof(PBS.Entity.ModelTemplate),
                      typeof(PBS.Entity.ModelTemplateGroup),
                      typeof(PBS.Entity.ElecPrice),
+                     typeof(PBS.Entity.WaterEquipment),
                 };
                 using (var db = new SqlSugarClient(connectConfig))
                 {
diff --git a/Service/PBS.Service/05-service/04-elec_price/ElecPrice.cs b/Service/PBS.Service/05-service/04-elec-price/ElecPrice.cs
similarity index 100%
rename from Service/PBS.Service/05-service/04-elec_price/ElecPrice.cs
rename to Service/PBS.Service/05-service/04-elec-price/ElecPrice.cs
diff --git a/Service/PBS.Service/05-service/04-elec_price/ElecPrice_Instance.cs b/Service/PBS.Service/05-service/04-elec-price/ElecPrice_Instance.cs
similarity index 100%
rename from Service/PBS.Service/05-service/04-elec_price/ElecPrice_Instance.cs
rename to Service/PBS.Service/05-service/04-elec-price/ElecPrice_Instance.cs
diff --git a/Service/PBS.Service/05-service/04-elec_price/cache/ElecPriceCacheHelper.cs b/Service/PBS.Service/05-service/04-elec-price/cache/ElecPriceCacheHelper.cs
similarity index 100%
rename from Service/PBS.Service/05-service/04-elec_price/cache/ElecPriceCacheHelper.cs
rename to Service/PBS.Service/05-service/04-elec-price/cache/ElecPriceCacheHelper.cs
diff --git a/Service/PBS.Service/05-service/05-water-equipment/WaterEquipment.cs b/Service/PBS.Service/05-service/05-water-equipment/WaterEquipment.cs
new file mode 100644
index 0000000..c3b5a8c
--- /dev/null
+++ b/Service/PBS.Service/05-service/05-water-equipment/WaterEquipment.cs
@@ -0,0 +1,283 @@
+锘縰sing Yw.Service;
+
+namespace PBS.Service
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public partial class WaterEquipment
+    {
+        #region Cache
+
+        //鑾峰彇缂撳瓨
+        private static List<Model.WaterEquipment> GetCache()
+        {
+            var all = WaterEquipmentCacheHelper.GetSet(() =>
+            {
+                var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+                var entity_list = dal.GetAll();
+                var model_list = Entity2Models(entity_list);
+                if (model_list == null)
+                {
+                    model_list = new List<Model.WaterEquipment>();
+                }
+                return model_list;
+            }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime);
+            return all;
+        }
+
+        //閫氳繃 ID 鏇存柊缂撳瓨
+        private static void UpdateCache(long ID)
+        {
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var entity_ds = dal.GetByID(ID);
+            var model_ds = Entity2Model(entity_ds);
+            var all = GetCache();
+            var model = all.Find(x => x.ID == ID);
+            if (model == null)
+            {
+                all.Add(model_ds);
+            }
+            else
+            {
+                model.Reset(model_ds);
+            }
+            WaterEquipmentCacheHelper.Trigger();
+        }
+
+        //閫氳繃 Ids 鏇存柊缂撳瓨
+        private static void UpdateCache(List<long> Ids)
+        {
+            if (Ids == null || Ids.Count < 1)
+            {
+                return;
+            }
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var entity_list = dal.GetByIds(Ids);
+            var model_list = Entity2Models(entity_list);
+            var all = GetCache();
+            all.RemoveAll(x => Ids.Contains(x.ID));
+            if (model_list != null && model_list.Count > 0)
+            {
+                all.AddRange(model_list);
+            }
+            WaterEquipmentCacheHelper.Trigger();
+        }
+
+        //绉婚櫎缂撳瓨
+        private static void RemoveCache(long ID)
+        {
+            var all = GetCache();
+            all.RemoveAll(x => x.ID == ID);
+            WaterEquipmentCacheHelper.Trigger();
+        }
+
+        /// <summary>
+        /// 鍙戝竷缂撳瓨
+        /// </summary>
+        public static void PublishCache(string key)
+        {
+            WaterEquipmentCacheHelper.Publish(key);
+        }
+
+        #endregion Cache
+
+
+
+        #region Query
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈�
+        /// </summary>
+        public List<Model.WaterEquipment> GetAll()
+        {
+            var all = GetCache();
+            return all.OrderBy(x => x.SortCode).ToList();
+        }
+
+        /// <summary>
+        /// 閫氳繃 ID 鑾峰彇
+        /// </summary>
+        public Model.WaterEquipment GetByID(long ID)
+        {
+            var all = GetAll();
+            return all.Find(x => x.ID == ID);
+        }
+
+        /// <summary>
+        /// 閫氳繃 ID 鑾峰彇
+        /// </summary>
+        public List<Model.WaterEquipment> GetByIds(List<long> Ids)
+        {
+            if (Ids == null || Ids.Count < 1)
+            {
+                return default;
+            }
+            var all = GetAll();
+            return all.Where(x => Ids.Contains(x.ID)).OrderBy(x => x.SortCode).ToList();
+        }
+
+        /// <summary>
+        /// 鑾峰彇鏈�澶ф帓搴忕爜
+        /// </summary>
+        public int GetMaxSortCode()
+        {
+            var list = GetAll();
+            if (list == null || list.Count < 1)
+            {
+                return 0;
+            }
+            return list.Max(x => x.SortCode);
+        }
+
+        #endregion Query
+
+        #region Insert
+
+        /// <summary>
+        /// 鎻掑叆涓�鏉℃暟鎹�
+        /// </summary>
+        public long Insert(Model.WaterEquipment model)
+        {
+            if (model == null)
+            {
+                return default;
+            }
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var entity = Model2Entity(model);
+            var id = dal.Insert(entity);
+            if (id > 0)
+            {
+                UpdateCache(id);
+            }
+            return id;
+        }
+
+        /// <summary>
+        /// 鎻掑叆澶氭潯
+        /// </summary>
+        public bool Inserts(List<Model.WaterEquipment> list)
+        {
+            if (list == null || list.Count < 1)
+            {
+                return false;
+            }
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var entity_list = Model2Entities(list);
+            var ids = dal.InsertsR(entity_list);
+            if (ids != null && ids.Count > 0)
+            {
+                UpdateCache(ids);
+                return true;
+            }
+            return false;
+        }
+
+        #endregion Insert
+
+        #region Update
+
+        /// <summary>
+        /// 鏇存柊涓�鏉�
+        /// </summary>
+        public bool Update(Model.WaterEquipment model)
+        {
+            if (model == null)
+            {
+                return false;
+            }
+            var entity = Model2Entity(model);
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var bol = dal.Update(entity);
+            if (bol)
+            {
+                UpdateCache(model.ID);
+            }
+            return bol;
+        }
+
+        /// <summary>
+        /// 鎵归噺鏇存柊
+        /// </summary>
+        public bool Updates(List<Model.WaterEquipment> list)
+        {
+            if (list == null || list.Count < 1)
+            {
+                return false;
+            }
+            if (list.Exists(x => x.ID < 1))
+            {
+                return false;
+            }
+            var entity_list = Model2Entities(list);
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var bol = dal.Updates(entity_list);
+            if (bol)
+            {
+                UpdateCache(list.Select(x => x.ID).ToList());
+            }
+            return bol;
+        }
+
+        /// <summary>
+        /// 鏇存柊鎺掑簭鐮�
+        /// </summary>
+        public bool UpdateSortCode(long ID, int SortCode)
+        {
+            if (ID < 1)
+            {
+                return false;
+            }
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var bol = dal.UpdateSortCode(ID, SortCode);
+            if (bol)
+            {
+                UpdateCache(ID);
+            }
+            return bol;
+        }
+
+        /// <summary>
+        /// 鏇存柊鎺掑簭
+        /// </summary>
+        public bool UpdateSorter(List<Yw.Model.Sorter> sorters)
+        {
+            if (sorters == null || sorters.Count < 1)
+            {
+                return false;
+            }
+            if (sorters.Exists(x => x.ID < 1))
+            {
+                return false;
+            }
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var bol = dal.UpdateSorter(sorters.ToEntityList());
+            if (bol)
+            {
+                UpdateCache(sorters.Select(x => x.ID).ToList());
+            }
+            return bol;
+        }
+
+        #endregion Update
+
+        #region Delete
+
+        /// <summary>
+        /// 閫氳繃 ID 鍒犻櫎
+        /// </summary>
+        public bool DeleteByID(long ID, out string Msg)
+        {
+            Msg = string.Empty;
+            var dal = DALCreateHelper.CreateDAL<DAL.IWaterEquipment>();
+            var bol = dal.DeleteByID(ID);
+            if (bol)
+            {
+                RemoveCache(ID);
+            }
+            return bol;
+        }
+
+        #endregion Delete
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/05-service/05-water-equipment/WaterEquipmentCacheHelper.cs b/Service/PBS.Service/05-service/05-water-equipment/WaterEquipmentCacheHelper.cs
new file mode 100644
index 0000000..10a1c66
--- /dev/null
+++ b/Service/PBS.Service/05-service/05-water-equipment/WaterEquipmentCacheHelper.cs
@@ -0,0 +1,70 @@
+锘縩amespace PBS.Service
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    internal class WaterEquipmentCacheHelper
+    {
+        private const string _contentKey = "WaterEquipmentList";
+
+        internal static string GetCacheKey()
+        {
+            return CacheHelper.GetCacheKey(_contentKey);
+        }
+
+        /// <summary>
+        /// 璁剧疆缂撳瓨
+        /// </summary>
+        public static void Set(List<Model.WaterEquipment> list, int Minites = 30, int RandomSeconds = 0)
+        {
+            var cacheKey = GetCacheKey();
+            MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds);
+        }
+
+        /// <summary>
+        /// 鑾峰彇缂撳瓨
+        /// </summary>
+        /// <returns></returns>
+        public static List<Model.WaterEquipment> Get()
+        {
+            var cacheKey = GetCacheKey();
+            return MemoryCacheHelper.Get<List<Model.WaterEquipment>>(cacheKey);
+        }
+
+        /// <summary>
+        /// 鑾峰彇璁剧疆缂撳瓨
+        /// </summary>
+        public static List<Model.WaterEquipment> GetSet(Func<List<Model.WaterEquipment>> func, int Minites = 30, int RandomSeconds = 0)
+        {
+            var cacheKey = GetCacheKey();
+            return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds);
+        }
+
+        /// <summary>
+        /// 绉婚櫎缂撳瓨
+        /// </summary>
+        public static void Remove()
+        {
+            var cacheKey = GetCacheKey();
+            MemoryCacheHelper.Remove(cacheKey);
+        }
+
+        /// <summary>
+        /// 鍙戝竷
+        /// </summary>
+        public static void Publish(string key)
+        {
+            var cacheKey = GetCacheKey();
+            MemoryCacheWipeRelationHelper.Set(key, cacheKey);
+        }
+
+        /// <summary>
+        /// 瑙﹀彂
+        /// </summary>
+        public static void Trigger()
+        {
+            var cacheKey = GetCacheKey();
+            MemoryCacheWipeRelationHelper.Trigger(cacheKey);
+        }
+    }
+}
\ No newline at end of file
diff --git a/Service/PBS.Service/05-service/05-water-equipment/WaterEquipment_Instance.cs b/Service/PBS.Service/05-service/05-water-equipment/WaterEquipment_Instance.cs
new file mode 100644
index 0000000..7fb83c9
--- /dev/null
+++ b/Service/PBS.Service/05-service/05-water-equipment/WaterEquipment_Instance.cs
@@ -0,0 +1,62 @@
+锘縩amespace PBS.Service
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public partial class WaterEquipment
+    {
+        //Entity to GetModel
+        internal static Model.WaterEquipment Entity2Model(Entity.WaterEquipment entity)
+        {
+            if (entity == null)
+                return default;
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.WaterEquipment, Model.WaterEquipment>()
+            ).CreateMapper();
+            var model = mapper.Map<Entity.WaterEquipment, Model.WaterEquipment>(entity);
+            return model;
+        }
+
+        //Entities to GetModels
+        internal static List<Model.WaterEquipment> Entity2Models(List<Entity.WaterEquipment> entities)
+        {
+            if (entities == null || entities.Count < 1)
+                return default;
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.WaterEquipment, Model.WaterEquipment>()
+            ).CreateMapper();
+            var models = mapper.Map<List<Entity.WaterEquipment>, List<Model.WaterEquipment>>(entities);
+            return models;
+        }
+
+        //Model to Entity
+        internal static Entity.WaterEquipment Model2Entity(Model.WaterEquipment model)
+        {
+            if (model == null)
+                return default;
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.WaterEquipment, Entity.WaterEquipment>()
+            ).CreateMapper();
+            var entity = mapper.Map<Model.WaterEquipment, Entity.WaterEquipment>(model);
+            return entity;
+        }
+
+        //Models to Entities
+        internal static List<Entity.WaterEquipment> Model2Entities(List<Model.WaterEquipment> models)
+        {
+            if (models == null || models.Count < 1)
+                return default;
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.WaterEquipment, Entity.WaterEquipment>()
+            ).CreateMapper();
+            var entities = mapper.Map<List<Model.WaterEquipment>, List<Entity.WaterEquipment>>(models);
+            return entities;
+        }
+
+        //Model to Entity
+        internal static void Model2Entity(Model.WaterEquipment model, Entity.WaterEquipment entity)
+        {
+            if (model == null || entity == null)
+                return;
+            var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.WaterEquipment, Entity.WaterEquipment>()
+            ).CreateMapper();
+            mapper.Map(model, entity);
+        }
+    }
+}
\ No newline at end of file
diff --git a/Vmo/PBS.Vmo/05-water-equipment/WaterEquipmentVmo.cs b/Vmo/PBS.Vmo/05-water-equipment/WaterEquipmentVmo.cs
new file mode 100644
index 0000000..2d45a5a
--- /dev/null
+++ b/Vmo/PBS.Vmo/05-water-equipment/WaterEquipmentVmo.cs
@@ -0,0 +1,75 @@
+锘縩amespace PBS.Vmo
+{
+    /// <summary>
+    /// 渚涙按璁惧(鍚瘎浠�)
+    ///</summary>
+    public class WaterEquipmentVmo
+    {
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipmentVmo()
+        { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public WaterEquipmentVmo(Dto.WaterEquipmentDto rhs)
+        {
+            this.ID = rhs.ID;
+            this.Name = rhs.Name;
+            this.Reliability = rhs.Reliability;
+            this.Safety = rhs.Safety;
+            this.Hygiene = rhs.Hygiene;
+            this.SaveEnergy = rhs.SaveEnergy;
+            this.SystemComposition = rhs.SystemComposition;
+            this.SortCode = rhs.SortCode;
+            this.Description = rhs.Description;
+        }
+
+        /// <summary>
+        /// 鏍囪瘑
+        ///</summary>
+        public long ID { get; set; }
+
+        /// <summary>
+        /// 绯荤粺鍚嶇О
+        ///</summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 鍙潬鎬у緱鍒�
+        ///</summary>
+        public int Reliability { get; set; }
+
+        /// <summary>
+        /// 瀹夊叏鎬у緱鍒�
+        ///</summary>
+        public int Safety { get; set; }
+
+        /// <summary>
+        /// 鍗敓寰楀垎
+        ///</summary>
+        public int Hygiene { get; set; }
+
+        /// <summary>
+        /// 鑺傝兘寰楀垎
+        ///</summary>
+        public int SaveEnergy { get; set; }
+
+        /// <summary>
+        /// 绯荤粺缁勬垚寰楀垎
+        ///</summary>
+        public int SystemComposition { get; set; }
+
+        /// <summary>
+        /// 鎺掑簭鐮�
+        ///</summary>
+        public int SortCode { get; set; }
+
+        /// <summary>
+        /// 璇存槑
+        ///</summary>
+        public string Description { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/Vmo/PBS.Vmo/05-IBoxViewModel/IBoxControllViewModel.cs b/Vmo/PBS.Vmo/06-IBoxViewModel/IBoxControllViewModel.cs
similarity index 100%
rename from Vmo/PBS.Vmo/05-IBoxViewModel/IBoxControllViewModel.cs
rename to Vmo/PBS.Vmo/06-IBoxViewModel/IBoxControllViewModel.cs
diff --git a/Vmo/PBS.Vmo/05-IBoxViewModel/IBoxDataHelper.cs b/Vmo/PBS.Vmo/06-IBoxViewModel/IBoxDataHelper.cs
similarity index 100%
rename from Vmo/PBS.Vmo/05-IBoxViewModel/IBoxDataHelper.cs
rename to Vmo/PBS.Vmo/06-IBoxViewModel/IBoxDataHelper.cs
diff --git a/WinFrmUI/PBS.WinFrmUI/03-elecPrice/ElecPriceMgr.cs b/WinFrmUI/PBS.WinFrmUI/03-elecPrice/ElecPriceMgr.cs
index 86565d4..a616d57 100644
--- a/WinFrmUI/PBS.WinFrmUI/03-elecPrice/ElecPriceMgr.cs
+++ b/WinFrmUI/PBS.WinFrmUI/03-elecPrice/ElecPriceMgr.cs
@@ -119,7 +119,7 @@
                 var isok = await bll.Update(_elecPrice);
                 if (isok)
                 {
-                   this.SetBindingData();
+                    this.SetBindingData();
                     return true;
                 }
                 return false;
diff --git a/WinFrmUI/Yw.WinFrmUI.Core/00-core/GridViewExtensions.cs b/WinFrmUI/Yw.WinFrmUI.Core/00-core/GridViewExtensions.cs
index 74dfa79..3fe0647 100644
--- a/WinFrmUI/Yw.WinFrmUI.Core/00-core/GridViewExtensions.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Core/00-core/GridViewExtensions.cs
@@ -42,8 +42,6 @@
             grid.OptionsBehavior.Editable = false;
             grid.OptionsBehavior.ReadOnly = true;
 
-
-
             grid.OptionsView.EnableAppearanceOddRow = true;   // 浣胯兘 // 鍜屽拰涓婇潰缁戝畾 鍚屾椂浣跨敤鏈夋晥
             grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);  // 璁剧疆鍋舵暟琛岄鑹�
             grid.OptionsView.EnableAppearanceEvenRow = true;
@@ -83,7 +81,6 @@
             grid.OptionsView.EnableAppearanceEvenRow = true;
             grid.Appearance.OddRow.BackColor = Color.White; // 璁剧疆鍋舵暟琛岄鑹�
 
-
             grid.RowHeight = height;
             grid.ColumnPanelRowHeight = height;
             grid.GroupRowHeight = height;
@@ -119,7 +116,6 @@
             grid.Appearance.OddRow.BackColor = Color.White;
             grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);
 
-
             grid.RowHeight = height;
             grid.ColumnPanelRowHeight = height;
             grid.GroupRowHeight = height;
@@ -154,7 +150,6 @@
             grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);  // 璁剧疆鍋舵暟琛岄鑹�
             grid.OptionsView.EnableAppearanceEvenRow = true;
             grid.Appearance.OddRow.BackColor = Color.White; // 璁剧疆鍋舵暟琛岄鑹�
-
 
             grid.RowHeight = height;
             grid.ColumnPanelRowHeight = height;
@@ -219,8 +214,6 @@
             grid.ColumnPanelRowHeight = height;
             grid.GroupRowHeight = height;
             grid.BestFitColumns();
-
-
         }
 
         /// <summary>
@@ -330,7 +323,7 @@
             return row;
         }
 
-        #endregion
+        #endregion 榛樿
 
         /// <summary>
         /// 缁戝畾鎸夊垪鍒嗙粍瑙嗗浘璁剧疆 Nsx_20210729
@@ -372,7 +365,6 @@
             grid.BestFitColumns();
         }
 
-
         /// <summary>
         /// 鏅�氱紪杈戣鍥捐缃�
         /// </summary>
@@ -402,17 +394,15 @@
             grid.Appearance.OddRow.BackColor = Color.White;
             grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);
 
-
             grid.RowHeight = height;
             grid.ColumnPanelRowHeight = height;
             grid.GroupRowHeight = height;
             grid.BestFitColumns();
         }
 
-
         /// <summary>
         /// 璁剧疆鎷栨嫿鐘舵�佷笅鐨勬櫘閫氳鍥�
-        /// </summary> 
+        /// </summary>
         public static void SetDragNormalView<t>(this GridView rhs, int height = 30) where t : class
         {
             rhs.SetNormalView(height);
@@ -431,7 +421,6 @@
                     }
                 }
             };
-
 
             rhs.MouseMove += (sender, e) =>
             {
@@ -457,10 +446,5 @@
                 }
             };
         }
-
-
-
-
-
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.3