diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ConfigGroupController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ConfigGroupController.cs index 6d05da9c..174e74b8 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ConfigGroupController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ConfigGroupController.cs @@ -11,4 +11,14 @@ public class Ghrh_ConfigGroupController : BaseController + /// 批量更新数据 + /// + /// + [HttpPost, Route("BulkUpdateValue")] + public virtual async Task BulkUpdateValue([FromBody] List entitys) + { + return await _service.BulkUpdateValue(entitys); + } } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index d645663f..4c913ca6 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1310,6 +1310,12 @@ 招聘参数配置组(Controller) + + + 批量更新数据 + + + 人力需求维护(Controller) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ConfigGroupServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ConfigGroupServices.cs index ac7aed4e..5d5bcc7e 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ConfigGroupServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ConfigGroupServices.cs @@ -1,4 +1,5 @@ using Tiobon.Core.IServices.BASE; +using Tiobon.Core.Model; using Tiobon.Core.Model.Models; namespace Tiobon.Core.IServices; @@ -8,4 +9,5 @@ namespace Tiobon.Core.IServices; /// public interface IGhrh_ConfigGroupServices : IBaseServices { + Task BulkUpdateValue(List entitys); } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ConfigGroupServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ConfigGroupServices.cs index 9061af0d..4ca9424d 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ConfigGroupServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ConfigGroupServices.cs @@ -26,4 +26,21 @@ public class Ghrh_ConfigGroupServices : BaseServices BulkUpdateValue(List entitys) + { + for (int i = 0; i < entitys.Count; i++) + { + for (int j = 0; j < entitys[i].Configs.Count; j++) + { + await Db.Updateable() + .SetColumns(it => new Ghrh_Config() + { + ConfigValue = entitys[i].Configs[j].ConfigValue + }, true) + .Where(x => x.Id == entitys[i].Configs[j].Id) + .ExecuteCommandAsync(); + } + } + return ServiceResult.OprateSuccess(); + } } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index d645663f..4c913ca6 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1310,6 +1310,12 @@ 招聘参数配置组(Controller) + + + 批量更新数据 + + + 人力需求维护(Controller)