From 6c88a90d2330a27c0052a22538f6ebd6200faae7 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 21 八月 2024 18:02:15 +0800 Subject: [PATCH] 完善主界面 --- Service/HStation.Service.Assets.Core/05-service/03-PumpMain/PumpMain.cs | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Service/HStation.Service.Assets.Core/05-service/03-PumpMain/PumpMain.cs b/Service/HStation.Service.Assets.Core/05-service/03-PumpMain/PumpMain.cs index 4e134b8..4762bc7 100644 --- a/Service/HStation.Service.Assets.Core/05-service/03-PumpMain/PumpMain.cs +++ b/Service/HStation.Service.Assets.Core/05-service/03-PumpMain/PumpMain.cs @@ -1,6 +1,4 @@ -锘縰sing System.Security.Cryptography; - -namespace HStation.Service +锘縩amespace HStation.Service { /// <summary> /// @@ -121,6 +119,18 @@ } /// <summary> + /// 閫氳繃 ID 鑾峰彇鎵�鏈変骇鍝� + /// </summary> + public List<Model.PumpPartMain> GetPartByID(long ID) + { + var all = GetAll(); + var allidlist = PumpMainAndPartMap.GetByPumpMainID(ID); + var partmain = new PumpPartMain(); + var allpart = partmain.GetByIds(allidlist); + return allpart; + } + + /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> public List<Model.PumpMain> GetByIds(List<long> Ids) @@ -185,16 +195,16 @@ /// <summary> /// 鎻掑叆鎷撳睍 /// </summary> - public long InsertEx(Model.PumpMain model, Model.PumpGroupAndMainMap map) + public long InsertEx(Model.PumpMain main, Model.PumpGroupAndMainMap map) { - if (model == null) + if (main == null) { return default; } var dal = DALCreateHelper.CreateDAL<HStation.DAL.IPumpMain>(); - var main = Model2Entity(model); - var entity = PumpGroupAndMainMap.Model2Entity(map); - var id = dal.InsertsEx(main, entity); + var mainEntity = Model2Entity(main); + var groupMapEntity = PumpGroupAndMainMap.Model2Entity(map); + var id = dal.InsertsEx(mainEntity, groupMapEntity); if (id > 0) { UpdateCache(id); -- Gitblit v1.9.3