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.
388 lines
13 KiB
388 lines
13 KiB
using Tiobon.Core.Model.ViewModels.Extend;
|
|
using static Tiobon.Core.Model.Consts;
|
|
|
|
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)
|
|
{
|
|
var condition = "1!=1";
|
|
switch (status)
|
|
{
|
|
case "All":
|
|
|
|
condition = $"(Status ='{status}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.WaitRecommended}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.HasRecommended}')";
|
|
break;
|
|
case "Process":
|
|
condition = $"(Status ='{status}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.WaitAppointment}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.WaitInterview}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.HasInterview}')";
|
|
break;
|
|
case "Hire":
|
|
condition = $"(Status ='{status}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.HasSendOffer}' OR Status ='{DIC_INTERVIEW_ORDER_STATUS.HasOffer}')";
|
|
break;
|
|
default:
|
|
condition = $"Status ='{status}'";
|
|
break;
|
|
}
|
|
return await _service.QueryFilterPage(body, condition);
|
|
}
|
|
#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
|
|
|
|
#region 推荐
|
|
/// <summary>
|
|
/// 推荐
|
|
/// </summary>
|
|
/// <param name="body">信息</param>
|
|
/// <param name="id">简历Id</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("Recommend/{id}")]
|
|
public async Task<ServiceResult> Recommend([FromBody] ResumeRecommendForm body, long id)
|
|
{
|
|
return await _service.Recommend(id, body);
|
|
}
|
|
#endregion
|
|
|
|
#region 简历库已推荐提醒
|
|
/// <summary>
|
|
/// 简历库已推荐提醒
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("RemindHasRecommend/{id}")]
|
|
public async Task<ServiceResult> RemindHasRecommend(long id)
|
|
{
|
|
return await _service.RemindHasRecommend(id);
|
|
}
|
|
#endregion
|
|
|
|
#region 面试官约面
|
|
/// <summary>
|
|
/// 面试官约面
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="times">时间段列表,["2024/10/12 10:00~2024/10/12 11:00"],最多三个,超过三个取前三</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("SubscribeInterview/{id}")]
|
|
public async Task<ServiceResult> SubscribeInterview(long id, [FromBody] List<string> times) => await _service.SubscribeInterview(id, times);
|
|
|
|
#endregion
|
|
|
|
#region 安排面试
|
|
/// <summary>
|
|
/// 面试官约面
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="time">时间段,2024/10/12 10:00~2024/10/12 11:00</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("ScheduleInterview/{id}")]
|
|
public async Task<ServiceResult> ScheduleInterview(long id, [FromBody] string time) => await _service.ScheduleInterview(id, time);
|
|
|
|
#endregion
|
|
|
|
#region 变更面试时间
|
|
/// <summary>
|
|
/// 变更面试时间
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="time">时间段,2024/10/12 10:00~2024/10/12 11:00</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("ModifyInterviewTime/{id}")]
|
|
public async Task<ServiceResult> ModifyInterviewTime(long id, [FromBody] string time) => await _service.ModifyInterviewTime(id, time);
|
|
#endregion
|
|
|
|
#region 待面试提醒
|
|
/// <summary>
|
|
/// 待面试提醒
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("RemindWaitInterview/{id}")]
|
|
public async Task<ServiceResult> RemindWaitInterview(long id) => await _service.RemindWaitInterview(id);
|
|
#endregion
|
|
|
|
#region 重新安排面试-直接发起
|
|
/// <summary>
|
|
/// 重新安排面试-直接发起
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="input">input</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("RescheduleInterview/{id}")]
|
|
public async Task<ServiceResult> RescheduleInterview(long id, [FromBody] ResumeRescheduleInterviewForm input) => await _service.RescheduleInterview(id, input, "Reschedule");
|
|
#endregion
|
|
|
|
#region 重新预约面试-预约再发起下一轮面试
|
|
/// <summary>
|
|
/// 重新预约安排面试-预约再发起下一轮面试
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="input">input</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("ResubscribeScheduleInterview/{id}")]
|
|
public async Task<ServiceResult> ResubscribeScheduleInterview(long id, [FromBody] ResumeRescheduleInterviewForm1 input)
|
|
{
|
|
return await _service.RescheduleInterview(id, new ResumeRescheduleInterviewForm { InterviewStaffs = input.InterviewStaffs }, "ResubscribeSchedule");
|
|
}
|
|
#endregion
|
|
|
|
#region 面试评估(主管填写)
|
|
/// <summary>
|
|
/// 面试评估(主管填写)
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="input">input</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("AssessInterview/{id}")]
|
|
public async Task<ServiceResult> AssessInterview(long id, [FromBody] ResumeAssessInterviewForm input)
|
|
{
|
|
return await _service.AssessInterview(id, input);
|
|
}
|
|
#endregion
|
|
|
|
#region 变更面试官
|
|
/// <summary>
|
|
/// 变更面试官
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="InterviewStaffs">面试官列表</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("ModifyInterviewer/{id}")]
|
|
public async Task<ServiceResult> ModifyInterviewer(long id, [FromBody] List<ResumeRecommendFormStaff> InterviewStaffs)
|
|
{
|
|
return await _service.ModifyInterviewer(id, InterviewStaffs);
|
|
}
|
|
#endregion
|
|
|
|
#region 发offer
|
|
/// <summary>
|
|
/// 发offer
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("SendOffer/{id}")]
|
|
public async Task<ServiceResult> SendOffer(long id)
|
|
{
|
|
return await _service.SendOffer(id);
|
|
}
|
|
#endregion
|
|
|
|
#region 已发offer提醒
|
|
/// <summary>
|
|
/// 已发offer提醒
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("RemindHasOffer/{id}")]
|
|
public async Task<ServiceResult> RemindHasOffer(long id)
|
|
{
|
|
return await _service.SendOffer(id);
|
|
}
|
|
#endregion
|
|
|
|
#region 已报到/未报道接口
|
|
/// <summary>
|
|
/// 已报到/未报道接口
|
|
/// </summary>
|
|
/// <param name="id">简历Id</param>
|
|
/// <param name="value">已报到传true,未报到传false</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("ModifyIsOffer/{id}/{value}")]
|
|
public async Task<ServiceResult> ModifyIsOffer(long id, bool value)
|
|
{
|
|
return await _service.ModifyIsOffer(id, value);
|
|
}
|
|
#endregion
|
|
|
|
|
|
} |