From dc93db6fef81b17e572f293321a980a6c50e67f9 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期三, 24 七月 2024 08:59:13 +0800
Subject: [PATCH] 增加删除拓展方法

---
 Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs b/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs
index a1d815e..dd3dc30 100644
--- a/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs
+++ b/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs
@@ -327,6 +327,22 @@
             return bol;
         }
 
+        //閫氳繃 ID 鍒犻櫎浜у搧琛ㄥ強灞炴�ц〃
+        public bool DeleteExByID(long ID)
+        {
+            var dal = DALCreateHelper.CreateDAL<HStation.DAL.IPumpPartMain>();
+            var partmain = dal.GetByID(ID);
+            var propmodellist = PumpPropContent.GetProplistByPartID(ID);
+            var propentitylist = PumpPropContent.Model2Entities(propmodellist);
+            var bol = dal.DeleteEx(partmain, propentitylist);
+            if (bol)
+            {
+                RemoveCache(ID);
+                PumpPropContent.RemoveCacheByIDs(propmodellist.Select(x => x.ID).ToList());
+            }
+            return bol;
+        }
+
         #endregion Delete
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3