From a2a57963e160a319276c5c8499f16c9809056e4c Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期日, 17 十一月 2024 21:54:55 +0800 Subject: [PATCH] 修改资产表 --- Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMapping/AssetsPumpMainAndPartMapping.cs | 44 ++++++++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMap/PumpMainAndPartMap.cs b/Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMapping/AssetsPumpMainAndPartMapping.cs similarity index 84% rename from Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMap/PumpMainAndPartMap.cs rename to Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMapping/AssetsPumpMainAndPartMapping.cs index c2c0d09..f66385e 100644 --- a/Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMap/PumpMainAndPartMap.cs +++ b/Service/HStation.Service.Assets.Core/05-service/01-PumpMain/07-PumpMainAndPartMapping/AssetsPumpMainAndPartMapping.cs @@ -8,16 +8,16 @@ #region Cache //鑾峰彇缂撳瓨 - private static List<Model.AssetsPumpMainAndPartMap> GetCache() + private static List<Model.AssetsPumpMainAndPartMapping> GetCache() { - var all = AssetsPumpMainAndPartMapCacheHelper.GetSet(() => + var all = AssetsPumpMainAndPartMappingCacheHelper.GetSet(() => { - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var entity_list = dal.GetAll(); var model_list = Entity2Models(entity_list); if (model_list == null) { - model_list = new List<Model.AssetsPumpMainAndPartMap>(); + model_list = new List<Model.AssetsPumpMainAndPartMapping>(); } return model_list; }, Yw.Service.ConfigHelper.CacheKeepTime, Yw.Service.ConfigHelper.CacheRandomTime); @@ -27,7 +27,7 @@ //閫氳繃 ID 鏇存柊缂撳瓨 private static void UpdateCache(long ID) { - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var entity_ds = dal.GetByID(ID); var model_ds = Entity2Model(entity_ds); var all = GetCache(); @@ -46,9 +46,9 @@ //閫氳繃 PartID 鏇存柊缂撳瓨 public static void UpdateCacheByPartID(long ID) { - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var alllist = dal.GetAll(); - var select = alllist.Find(x => x.PumpPartID == ID); + var select = alllist.Find(x => x.PartID == ID); var model_ds = Entity2Model(select); var all = GetCache(); var model = all.Find(x => x.ID == ID); @@ -70,7 +70,7 @@ { return; } - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var entity_list = dal.GetByIds(Ids); var model_list = Entity2Models(entity_list); var all = GetCache(); @@ -94,7 +94,7 @@ public static void RemoveCacheByGroupID(long ID) { var all = GetCache(); - var maplist = AssetsPumpGroupAndMainMap.GetMainIDByGroupID(ID); + var maplist = AssetsPumpGroupAndMainMapping.GetMainIDByGroupID(ID); all.RemoveAll(item => maplist.Any(mapItem => mapItem == item.ID)); AssetsPumpSeriesCacheHelper.Trigger(); } @@ -114,7 +114,7 @@ /// <summary> /// 鑾峰彇鎵�鏈� /// </summary> - public List<Model.AssetsPumpMainAndPartMap> GetAll() + public List<Model.AssetsPumpMainAndPartMapping> GetAll() { var all = GetCache(); return all; @@ -123,7 +123,7 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public Model.AssetsPumpMainAndPartMap GetByID(long ID) + public Model.AssetsPumpMainAndPartMapping GetByID(long ID) { var all = GetAll(); return all.Find(x => x.ID == ID); @@ -132,7 +132,7 @@ /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> - public List<Model.AssetsPumpMainAndPartMap> GetByIds(List<long> Ids) + public List<Model.AssetsPumpMainAndPartMapping> GetByIds(List<long> Ids) { if (Ids == null || Ids.Count < 1) { @@ -152,7 +152,7 @@ return default; } var all = GetCache(); - return all.Where(x => x.PumpID == ID).Select(x => x.PumpPartID).ToList(); + return all.Where(x => x.MainID == ID).Select(x => x.PartID).ToList(); } #endregion Query @@ -162,13 +162,13 @@ /// <summary> /// 鎻掑叆涓�鏉℃暟鎹� /// </summary> - public long Insert(Model.AssetsPumpMainAndPartMap model) + public long Insert(Model.AssetsPumpMainAndPartMapping model) { if (model == null) { return default; } - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var entity = Model2Entity(model); var id = dal.Insert(entity); if (id > 0) @@ -181,13 +181,13 @@ /// <summary> /// 鎻掑叆澶氭潯 /// </summary> - public bool Inserts(List<Model.AssetsPumpMainAndPartMap> list) + public bool Inserts(List<Model.AssetsPumpMainAndPartMapping> list) { if (list == null || list.Count < 1) { return false; } - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var entity_list = Model2Entities(list); var ids = dal.InsertsR(entity_list); if (ids != null && ids.Count > 0) @@ -205,14 +205,14 @@ /// <summary> /// 鏇存柊涓�鏉� /// </summary> - public bool Update(Model.AssetsPumpMainAndPartMap model) + public bool Update(Model.AssetsPumpMainAndPartMapping model) { if (model == null) { return false; } var entity = Model2Entity(model); - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var bol = dal.Update(entity); if (bol) { @@ -224,7 +224,7 @@ /// <summary> /// 鎵归噺鏇存柊 /// </summary> - public bool Updates(List<Model.AssetsPumpMainAndPartMap> list) + public bool Updates(List<Model.AssetsPumpMainAndPartMapping> list) { if (list == null || list.Count < 1) { @@ -235,7 +235,7 @@ return false; } var entity_list = Model2Entities(list); - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var bol = dal.Updates(entity_list); if (bol) { @@ -254,7 +254,7 @@ public bool DeleteByID(long ID, out string Msg) { Msg = string.Empty; - var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMap>(); + var dal = DALCreateHelper.CreateDAL<HStation.DAL.IAssetsPumpMainAndPartMapping>(); var bol = dal.DeleteByID(ID); if (bol) { -- Gitblit v1.9.3