From 5c14c9686d2bd7c99fdd6cc6fc19404e6e4b8e4d Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期五, 29 十一月 2024 15:02:20 +0800
Subject: [PATCH] 增加用水当量和用水器具界面

---
 BLL/HStation.BLL.WE.Core/03-localclient/03-catalogue/CatalogueMapping.cs |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/BLL/HStation.BLL.WE.Core/03-localclient/03-catalogue/CatalogueMapping.cs b/BLL/HStation.BLL.WE.Core/03-localclient/03-catalogue/CatalogueMapping.cs
index 470d6fe..3b5bbd2 100644
--- a/BLL/HStation.BLL.WE.Core/03-localclient/03-catalogue/CatalogueMapping.cs
+++ b/BLL/HStation.BLL.WE.Core/03-localclient/03-catalogue/CatalogueMapping.cs
@@ -2,12 +2,11 @@
 {
     /// <summary>
     /// 鐢ㄦ按褰撻噺鐩綍鏄犲皠
-    ///</summary>    
+    ///</summary>
     public class CatalogueMapping : ICatalogueMapping
-    { 
-        
+    {
         private readonly Service.WE.CatalogueMapping _service = new();
-   
+
         #region Query
 
         /// <summary>
@@ -36,6 +35,19 @@
         }
 
         /// <summary>
+        /// 閫氳繃 鐩綍ID 鑾峰彇
+        /// </summary>
+        public async Task<CatalogueMappingDto> GetByCatalogueID(long CatalogueID)
+        {
+            return await Task.Factory.StartNew(() =>
+            {
+                var list = _service.GetAll();
+                var select = list.Find(x => x.CatalogueID == CatalogueID);
+                return select == null ? null : new CatalogueMappingDto(select); 
+            });
+        }
+
+        /// <summary>
         /// 閫氳繃 Ids 鑾峰彇
         /// </summary>
         public async Task<List<CatalogueMappingDto>> GetByIds(List<long> Ids)
@@ -48,7 +60,7 @@
             });
         }
 
-        #endregion 
+        #endregion Query
 
         #region Insert
 
@@ -75,10 +87,10 @@
                 return false;
             });
         }
-  
+
         /// <summary>
         /// 澶ф壒閲忔彃鍏�
-        /// </summary> 
+        /// </summary>
         public async Task<bool> BulkInserts(List<AddCatalogueMappingInput> list)
         {
             return await Task.Factory.StartNew(() =>
@@ -120,10 +132,10 @@
                 return false;
             });
         }
-        
+
         /// <summary>
         /// 澶ф壒閲忔洿鏂�
-        /// </summary> 
+        /// </summary>
         public async Task<bool> BulkUpdates(List<UpdateCatalogueMappingInput> list)
         {
             return await Task.Factory.StartNew(() =>
@@ -131,11 +143,11 @@
                 return false;
             });
         }
-        
+
         #endregion Update
 
         #region Delete
-        
+
         /// <summary>
         /// 閫氳繃 ID 鍒犻櫎
         /// </summary>
@@ -154,7 +166,7 @@
 
         /// <summary>
         /// 閫氳繃 Ids 鍒犻櫎
-        /// </summary> 
+        /// </summary>
         public async Task<bool> DeleteByIds(List<long> Ids)
         {
             return await Task.Factory.StartNew(() =>
@@ -165,16 +177,15 @@
 
         /// <summary>
         /// 鍏ㄩ儴鍒犻櫎
-        /// </summary> 
+        /// </summary>
         public async Task<bool> DeleteAll()
         {
             return await Task.Factory.StartNew(() =>
             {
                 return false;
             });
-        } 
-        
-        #endregion 
- 
+        }
+
+        #endregion Delete
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3