You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
203 lines
6.3 KiB
203 lines
6.3 KiB
using Tiobon.Core.Model.ViewModels.Extend;
|
|
|
|
namespace Tiobon.Core.Api.Controllers;
|
|
|
|
/// <summary>
|
|
/// 个人简历(Controller)
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController, GlobalActionFilter]
|
|
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghrh)]
|
|
public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_Resume, Ghrh_ResumeDto, InsertGhrh_ResumeInput, EditGhrh_ResumeInput>
|
|
{
|
|
public Ghrh_ResumeController(IGhrh_ResumeServices service) : base(service)
|
|
{
|
|
}
|
|
|
|
#region 获取简历Tabs接口
|
|
/// <summary>
|
|
/// 获取简历Tabs接口
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("QueryViewTab")]
|
|
public ServiceResult<List<ResumeViewTab>> QueryViewTab() => _service.QueryViewTab();
|
|
|
|
#endregion
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 根据条件查询数据
|
|
/// </summary>
|
|
/// <param name="body">条件</param>
|
|
/// <param name="status">status</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QueryList/{status}")]
|
|
public async Task<ServicePageResult<Ghrh_ResumeDto>> QueryByStatus([FromBody] QueryBody body, string status)
|
|
{
|
|
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
|
|
|
|
#region 推荐简历
|
|
/// <summary>
|
|
/// 推荐简历
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("Recommend")]
|
|
public async Task<ServiceResult> Recommend([FromBody] List<long> ids) => await _service.SwitchIsRecommend(ids, true);
|
|
#endregion
|
|
|
|
#region 取消推荐简历
|
|
/// <summary>
|
|
/// 取消推荐简历
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("CancelRecommend")]
|
|
public async Task<ServiceResult> CancelRecommend([FromBody] List<long> ids) => await _service.SwitchIsRecommend(ids, false);
|
|
#endregion
|
|
|
|
#region 回收简历
|
|
/// <summary>
|
|
/// 回收简历
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("Recovery")]
|
|
public async Task<ServiceResult> Recovery([FromBody] List<long> ids)
|
|
{
|
|
bool result = await _service.UpdateStatus(ids, "Recycled");
|
|
if (result)
|
|
return ServiceResult.OprateSuccess("回收成功!");
|
|
return ServiceResult.OprateFailed("回收失败!");
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 加入黑名单
|
|
/// <summary>
|
|
/// 加入黑名单
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("JoinBlacklist")]
|
|
public async Task<ServiceResult> JoinBlacklist([FromBody] List<long> ids)
|
|
{
|
|
bool result = await _service.UpdateStatus(ids, "Blacklist");
|
|
if (result)
|
|
return ServiceResult.OprateSuccess("加入成功!");
|
|
return ServiceResult.OprateFailed("加入失败!");
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 加入人才库
|
|
/// <summary>
|
|
/// 加入人才库
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("JoinTalentPool")]
|
|
public async Task<ServiceResult> JoinTalentPool([FromBody] List<long> ids)
|
|
{
|
|
bool result = await _service.UpdateStatus(ids, "Talent_Pool");
|
|
if (result)
|
|
return ServiceResult.OprateSuccess("加入成功!");
|
|
return ServiceResult.OprateFailed("加入失败!");
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 添加标签
|
|
/// <summary>
|
|
/// 添加标签
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("MarkTags")]
|
|
public async Task<ServiceResult> MarkTags([FromBody] ResumeMarkTag markTag)
|
|
{
|
|
bool result = await _service.MarkTags(markTag.Ids, markTag.Tags);
|
|
if (result)
|
|
return ServiceResult.OprateSuccess("添加成功!");
|
|
return ServiceResult.OprateFailed("添加失败!");
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 查询简历是否存在
|
|
/// <summary>
|
|
/// 查询简历是否存在
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("CheckIsExist"), AllowAnonymous]
|
|
public async Task<ServiceResult<dynamic>> CheckIsExist([FromBody] EditGhrh_ResumeInput input)
|
|
{
|
|
return await _service.CheckIsExist(input);
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 查询公司配置信息
|
|
/// <summary>
|
|
/// 查询简历是否存在
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("QueryCompanyInfo/{companySpecCode}/{langId}"), AllowAnonymous]
|
|
public async Task<ServiceResult<Dictionary<string, string>>> QueryCompanyInfo(string companySpecCode, int langId)
|
|
{
|
|
return await _service.QueryCompanyInfo(companySpecCode);
|
|
}
|
|
#endregion
|
|
|
|
#region 查询招聘表单信息接口
|
|
/// <summary>
|
|
/// 查询招聘表单信息接口
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("Query/{id}/{langId}"), AllowAnonymous]
|
|
public async Task<ServiceResult<dynamic>> Query(long id, int langId) => await _service.Query(id, langId);
|
|
|
|
#endregion
|
|
|
|
#region 简历提交接口
|
|
/// <summary>
|
|
/// 简历提交接口
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <param name="status"></param>
|
|
/// <param name="resume"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("Update/{id}/{status}"), AllowAnonymous]
|
|
public async Task<ServiceResult> Submit(long id, string status, [FromBody] ResumeFormColumnSubmit resume) => await _service.Submit(id, status, resume);
|
|
|
|
#endregion
|
|
|
|
#region 查询招聘表单信息提交结果接口
|
|
/// <summary>
|
|
/// 查询招聘表单信息提交结果接口
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost("QueryResult/{id}/{langId}"), AllowAnonymous]
|
|
public async Task<ServiceResult<dynamic>> QueryResult(long id, int langId) => await _service.QueryResult(id, langId);
|
|
|
|
#endregion
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 根据条件查询数据
|
|
/// </summary>
|
|
/// <param name="body">条件</param>
|
|
/// <param name="status">status</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("Export/{status}")]
|
|
public async Task<ServiceResult<string>> ExportByStatus([FromBody] QueryBody body, string status)
|
|
{
|
|
return await _service.Export(body, $"Status ='{status}'");
|
|
}
|
|
#endregion
|
|
} |