新增获取查询条件接口

master
xiaochanghai 8 months ago
parent 08c93ad8f4
commit 353a9aca9a
  1. 9
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 6
      Tiobon.Core.Api/Tiobon.Core.xml
  3. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  4. 13
      Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs
  5. 13
      Tiobon.Core.Services/BASE/BaseServices.cs
  6. 18
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
  7. 8
      Tiobon.Core/Tiobon.Core.Model.xml
  8. 6
      Tiobon.Core/Tiobon.Core.xml

@ -37,4 +37,13 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
return await _service.QueryFilterPage(body, $"Status ='{status}'");
}
#endregion
#region 获取查询条件
/// <summary>
/// 获取简历Tabs接口
/// </summary>
/// <returns></returns>
[HttpPost("QueryConditions/{menuName}")]
public async Task<ServiceResult<List<ResumeCondition>>> QueryConditions() => await _service.QueryConditions();
#endregion
}

@ -1163,6 +1163,12 @@
<param name="status">status</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryConditions">
<summary>
获取简历Tabs接口
</summary>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_ResumeInfoColumnController">
<summary>
简历信息栏位(Controller)

@ -11,5 +11,7 @@ namespace Tiobon.Core.IServices
public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDto, InsertGhrh_ResumeInput, EditGhrh_ResumeInput>
{
ServiceResult<List<ResumeViewTab>> QueryViewTab();
Task<ServiceResult<List<ResumeCondition>>> QueryConditions();
}
}

@ -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<string, string> Items { get; set; }
}

@ -1314,6 +1314,19 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ
label = list.FirstOrDefault(x => x.ParaDetailNo == value)?.ParaDetailName;
return label;
}
public async Task<List<Ghrs_ParaDetail>> GetParaList(string key)
{
var list = await _caching.GetAsync<List<Ghrs_ParaDetail>>(key);
if (list == null || (list != null && !list.Any()))
{
string sql = $"SELECT * FROM Ghrs_ParaDetail WHERE ParaMasterNo ='{key}' ORDER BY SortNo ASC";
list = DbAccess.QueryList<Ghrs_ParaDetail>(sql);
if (list.Any())
await _caching.SetAsync(key, list);
}
return list;
}
#endregion
#region 处理json查询条件

@ -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;
@ -57,4 +58,21 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
}
#endregion
#region 获取查询条件
public async Task<ServiceResult<List<ResumeCondition>>> 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<List<ResumeCondition>>(str);
tabs.ForEach(async x =>
{
var items = await GetParaList(x.ParaMasterNo);
x.Items = items.ToDictionary(item => item.ParaDetailNo, item => item.ParaDetailName);
});
return ServiceResult<List<ResumeCondition>>.OprateSuccess("查询成功!", tabs);
}
#endregion
}

@ -6020,14 +6020,14 @@
毕业日期
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeBase.求职状态">
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeBase.ApplyStatus">
<summary>
求职状态
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeBase.TitleId">
<summary>
岗位
岗位ID
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeBase.MaritalStatus">
@ -14691,14 +14691,14 @@
毕业日期
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_Resume.求职状态">
<member name="P:Tiobon.Core.Model.Models.Ghrh_Resume.ApplyStatus">
<summary>
求职状态
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_Resume.TitleId">
<summary>
岗位
岗位ID
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_Resume.MaritalStatus">

@ -1163,6 +1163,12 @@
<param name="status">status</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryConditions">
<summary>
获取简历Tabs接口
</summary>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_ResumeInfoColumnController">
<summary>
简历信息栏位(Controller)

Loading…
Cancel
Save