using Tiobon.Core.Model.ViewModels.Extend; using static Tiobon.Core.Model.Consts; namespace Tiobon.Core.Api.Controllers; /// /// 个人简历(Controller) /// [Route("api/[controller]")] [ApiController, GlobalActionFilter] [Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghrh)] public class Ghrh_ResumeController : BaseController { public Ghrh_ResumeController(IGhrh_ResumeServices service) : base(service) { } #region 获取简历Tabs接口 /// /// 获取简历Tabs接口 /// /// [HttpPost("QueryViewTab")] public ServiceResult> QueryViewTab() => _service.QueryViewTab(); #endregion #region 查询 /// /// 根据条件查询数据 /// /// 条件 /// status /// [HttpPost, Route("QueryList/{status}")] public async Task> 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 获取查询条件 /// /// 获取简历Tabs接口 /// /// [HttpPost("QueryConditions/{menuName}")] public async Task>> QueryConditions() => await _service.QueryConditions(); #endregion #region 推荐简历 /// /// 推荐简历 /// /// [HttpPost("Recommend")] public async Task Recommend([FromBody] List ids) => await _service.SwitchIsRecommend(ids, true); #endregion #region 取消推荐简历 /// /// 取消推荐简历 /// /// [HttpPost("CancelRecommend")] public async Task CancelRecommend([FromBody] List ids) => await _service.SwitchIsRecommend(ids, false); #endregion #region 回收简历 /// /// 回收简历 /// /// [HttpPost("Recovery")] public async Task Recovery([FromBody] List ids) { bool result = await _service.UpdateStatus(ids, "Recycled"); if (result) return ServiceResult.OprateSuccess("回收成功!"); return ServiceResult.OprateFailed("回收失败!"); } #endregion #region 加入黑名单 /// /// 加入黑名单 /// /// [HttpPost("JoinBlacklist")] public async Task JoinBlacklist([FromBody] List ids) { bool result = await _service.UpdateStatus(ids, "Blacklist"); if (result) return ServiceResult.OprateSuccess("加入成功!"); return ServiceResult.OprateFailed("加入失败!"); } #endregion #region 加入人才库 /// /// 加入人才库 /// /// [HttpPost("JoinTalentPool")] public async Task JoinTalentPool([FromBody] List ids) { bool result = await _service.UpdateStatus(ids, "Talent_Pool"); if (result) return ServiceResult.OprateSuccess("加入成功!"); return ServiceResult.OprateFailed("加入失败!"); } #endregion #region 添加标签 /// /// 添加标签 /// /// [HttpPost("MarkTags")] public async Task MarkTags([FromBody] ResumeMarkTag markTag) { bool result = await _service.MarkTags(markTag.Ids, markTag.Tags); if (result) return ServiceResult.OprateSuccess("添加成功!"); return ServiceResult.OprateFailed("添加失败!"); } #endregion #region 查询简历是否存在 /// /// 查询简历是否存在 /// /// [HttpPost("CheckIsExist"), AllowAnonymous] public async Task> CheckIsExist([FromBody] EditGhrh_ResumeInput input) { return await _service.CheckIsExist(input); } #endregion #region 查询公司配置信息 /// /// 查询简历是否存在 /// /// [HttpPost("QueryCompanyInfo/{companySpecCode}/{langId}"), AllowAnonymous] public async Task>> QueryCompanyInfo(string companySpecCode, int langId) { return await _service.QueryCompanyInfo(companySpecCode); } #endregion #region 查询招聘表单信息接口 /// /// 查询招聘表单信息接口 /// /// [HttpPost("Query/{id}/{langId}"), AllowAnonymous] public async Task> Query(long id, int langId) => await _service.Query(id, langId); #endregion #region 简历提交接口 /// /// 简历提交接口 /// /// /// /// /// [HttpPost("Update/{id}/{status}"), AllowAnonymous] public async Task Submit(long id, string status, [FromBody] ResumeFormColumnSubmit resume) => await _service.Submit(id, status, resume); #endregion #region 查询招聘表单信息提交结果接口 /// /// 查询招聘表单信息提交结果接口 /// /// [HttpPost("QueryResult/{id}/{langId}"), AllowAnonymous] public async Task> QueryResult(long id, int langId) => await _service.QueryResult(id, langId); #endregion #region 查询 /// /// 根据条件查询数据 /// /// 条件 /// status /// [HttpPost, Route("Export/{status}")] public async Task> ExportByStatus([FromBody] QueryBody body, string status) { return await _service.Export(body, $"Status ='{status}'"); } #endregion #region 推荐 /// /// 推荐 /// /// 信息 /// 简历Id /// [HttpPost, Route("Recommend/{id}")] public async Task Recommend([FromBody] ResumeRecommendForm body, long id) { return await _service.Recommend(id, body); } #endregion #region 简历库已推荐提醒 /// /// 简历库已推荐提醒 /// /// 简历Id /// [HttpPost, Route("RemindHasRecommend/{id}")] public async Task RemindHasRecommend(long id) { return await _service.RemindHasRecommend(id); } #endregion #region 面试官约面 /// /// 面试官约面 /// /// 简历Id /// 时间段列表,["2024/10/12 10:00~2024/10/12 11:00"],最多三个,超过三个取前三 /// [HttpPost, Route("SubscribeInterview/{id}")] public async Task SubscribeInterview(long id, [FromBody] List times) => await _service.SubscribeInterview(id, times); #endregion #region 安排面试 /// /// 面试官约面 /// /// 简历Id /// 时间段,2024/10/12 10:00~2024/10/12 11:00 /// [HttpPost, Route("ScheduleInterview/{id}")] public async Task ScheduleInterview(long id, [FromBody] string time) => await _service.ScheduleInterview(id, time); #endregion #region 变更面试时间 /// /// 变更面试时间 /// /// 简历Id /// 时间段,2024/10/12 10:00~2024/10/12 11:00 /// [HttpPost, Route("ModifyInterviewTime/{id}")] public async Task ModifyInterviewTime(long id, [FromBody] string time) => await _service.ModifyInterviewTime(id, time); #endregion #region 待面试提醒 /// /// 待面试提醒 /// /// 简历Id /// [HttpPost, Route("RemindWaitInterview/{id}")] public async Task RemindWaitInterview(long id) => await _service.RemindWaitInterview(id); #endregion #region 重新安排面试-直接发起 /// /// 重新安排面试-直接发起 /// /// 简历Id /// input /// [HttpPost, Route("RescheduleInterview/{id}")] public async Task RescheduleInterview(long id, [FromBody] ResumeRescheduleInterviewForm input) => await _service.RescheduleInterview(id, input, "Reschedule"); #endregion #region 重新预约面试-预约再发起下一轮面试 /// /// 重新预约安排面试-预约再发起下一轮面试 /// /// 简历Id /// input /// [HttpPost, Route("ResubscribeScheduleInterview/{id}")] public async Task ResubscribeScheduleInterview(long id, [FromBody] ResumeRescheduleInterviewForm1 input) { return await _service.RescheduleInterview(id, new ResumeRescheduleInterviewForm { InterviewStaffs = input.InterviewStaffs }, "ResubscribeSchedule"); } #endregion #region 面试评估(主管填写) /// /// 面试评估(主管填写) /// /// 简历Id /// input /// [HttpPost, Route("AssessInterview/{id}")] public async Task AssessInterview(long id, [FromBody] ResumeAssessInterviewForm input) { return await _service.AssessInterview(id, input); } #endregion #region 变更面试官 /// /// 变更面试官 /// /// 简历Id /// 面试官列表 /// [HttpPost, Route("ModifyInterviewer/{id}")] public async Task ModifyInterviewer(long id, [FromBody] List InterviewStaffs) { return await _service.ModifyInterviewer(id, InterviewStaffs); } #endregion #region 发offer /// /// 发offer /// /// 简历Id /// [HttpPost, Route("SendOffer/{id}")] public async Task SendOffer(long id) { return await _service.SendOffer(id); } #endregion #region 已发offer提醒 /// /// 已发offer提醒 /// /// 简历Id /// [HttpPost, Route("RemindHasOffer/{id}")] public async Task RemindHasOffer(long id) { return await _service.SendOffer(id); } #endregion #region 已报到/未报道接口 /// /// 已报到/未报道接口 /// /// 简历Id /// 已报到传true,未报到传false /// [HttpPost, Route("ModifyIsOffer/{id}/{value}")] public async Task ModifyIsOffer(long id, bool value) { return await _service.ModifyIsOffer(id, value); } #endregion }