diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index ba24c8d1..f44cdd78 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -37,4 +37,13 @@ public class Ghrh_ResumeController : BaseController + /// 获取简历Tabs接口 + /// + /// + [HttpPost("QueryConditions/{menuName}")] + public async Task>> QueryConditions() => await _service.QueryConditions(); + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 090c4c84..12990f04 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1163,6 +1163,12 @@ status + + + 获取简历Tabs接口 + + + 简历信息栏位(Controller) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 3b37fc69..62768492 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -11,5 +11,7 @@ namespace Tiobon.Core.IServices public interface IGhrh_ResumeServices : IBaseServices { ServiceResult> QueryViewTab(); + + Task>> QueryConditions(); } } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs index 20e4e874..8d71721d 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs @@ -1,4 +1,6 @@ -namespace Tiobon.Core.Model.ViewModels.Extend; +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.Model.ViewModels.Extend; public class ResumeViewTab { @@ -16,4 +18,13 @@ public class ResumeViewTabItem public int Count { get; set; } } +public class ResumeCondition +{ + public string Key { get; set; } + public string Name { get; set; } + public string ParaMasterNo { get; set; } + public Dictionary Items { get; set; } + +} + diff --git a/Tiobon.Core.Services/BASE/BaseServices.cs b/Tiobon.Core.Services/BASE/BaseServices.cs index 6a2137ad..48a5de3c 100644 --- a/Tiobon.Core.Services/BASE/BaseServices.cs +++ b/Tiobon.Core.Services/BASE/BaseServices.cs @@ -1314,6 +1314,19 @@ public class BaseServices : IBaseServ label = list.FirstOrDefault(x => x.ParaDetailNo == value)?.ParaDetailName; return label; } + + public async Task> GetParaList(string key) + { + var list = await _caching.GetAsync>(key); + if (list == null || (list != null && !list.Any())) + { + string sql = $"SELECT * FROM Ghrs_ParaDetail WHERE ParaMasterNo ='{key}' ORDER BY SortNo ASC"; + list = DbAccess.QueryList(sql); + if (list.Any()) + await _caching.SetAsync(key, list); + } + return list; + } #endregion #region 处理json查询条件 diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 1b2b1523..c417b44b 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -8,6 +8,7 @@ using Tiobon.Core.Common; using Tiobon.Core.Model.ViewModels.Extend; using Tiobon.Core.Model; using Tiobon.Core.Common.Helper; +using System.Collections.Generic; namespace Tiobon.Core.Services; @@ -39,7 +40,7 @@ public class Ghrh_ResumeServices : BaseServices>> QueryConditions() + { + string str = "[\r\n\t{\r\n\t\t\"Key\": \"Education\",\r\n\t\t\"Name\": \"学历要求\",\r\n\t\t\"ParaMasterNo\": \"EducationalBGLevel\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": null,\r\n\t\t\"Name\": \"经验要求\",\r\n\t\t\"ParaMasterNo\": \"EducationalBGLevel\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Age\",\r\n\t\t\"Name\": \"年龄要求\",\r\n\t\t\"ParaMasterNo\": \"AgePeriodSetup\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Gender\",\r\n\t\t\"Name\": \"性 别\",\r\n\t\t\"ParaMasterNo\": \"Gender\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Apply\",\r\n\t\t\"Name\": \"薪资区间\",\r\n\t\t\"ParaMasterNo\": \"SeniorityPeriodSetup\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"ApplyStatus\",\r\n\t\t\"Name\": \"求职状态\",\r\n\t\t\"ParaMasterNo\": \"ResumeApplyStatus\"\r\n\t}\r\n]"; + var tabs = JsonHelper.JsonToObj>(str); + + tabs.ForEach(async x => + { + var items = await GetParaList(x.ParaMasterNo); + x.Items = items.ToDictionary(item => item.ParaDetailNo, item => item.ParaDetailName); + }); + + return ServiceResult>.OprateSuccess("查询成功!", tabs); + + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 2f264bd7..24cd6c41 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -6020,14 +6020,14 @@ 毕业日期 - + 求职状态 - 岗位 + 岗位ID @@ -14691,14 +14691,14 @@ 毕业日期 - + 求职状态 - 岗位 + 岗位ID diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 090c4c84..12990f04 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1163,6 +1163,12 @@ status + + + 获取简历Tabs接口 + + + 简历信息栏位(Controller)