From 788db200f4c6a359f3944cdf6116a818ddcae031 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 14 Nov 2024 11:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BE=85=E9=9D=A2=E8=AF=95?= =?UTF-8?q?=E6=8F=90=E9=86=92=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghrh/Ghrh_ResumeController.cs | 9 ++++ Tiobon.Core.Api/Tiobon.Core.xml | 15 ++++++ .../Ghrh/IGhrh_ResumeServices.cs | 2 + .../Ghrh/Ghrh_ResumeServices.cs | 48 ++++++++++++++++++- 4 files changed, 73 insertions(+), 1 deletion(-) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index 699b6c0f..2f7fd084 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -265,6 +265,15 @@ public class Ghrh_ResumeController : BaseController [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 } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 4b42958b..a5a7d571 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1380,6 +1380,21 @@ 时间段,2024/10/12 10:00~2024/10/12 11:00 + + + 变更面试时间 + + 简历Id + 时间段,2024/10/12 10:00~2024/10/12 11:00 + + + + + 待面试提醒 + + 简历Id + + 教育背景(Controller) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 4f3c3e77..d1a0c91b 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -41,4 +41,6 @@ public interface IGhrh_ResumeServices : IBaseServices ScheduleInterview(long id, string time); Task ModifyInterviewTime(long id, string time); + + Task RemindWaitInterview(long id); } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 59c656e3..69875417 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1245,7 +1245,7 @@ END"; } #endregion - #region 简历库已推荐提醒 + #region 已推荐提醒 public async Task RemindHasRecommend(long id) { var entity = await base.QueryById(id); @@ -1268,6 +1268,13 @@ END"; var staffs = JsonHelper.JsonToObj>(record.ReceiverIds); await SendMessage(staffs.Select(x => x.StaffId).ToList(), "简历提醒", "您有个简历推荐,请及时查看!"); } + + var usser = await GetUser(); + await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput() + { + OrderId = order.Id, + RemarkSz = $"用户【{usser?.UserName ?? App.User.ID.ToString()}】发送简历推荐提醒!" + }); } return ServiceResult.OprateSuccess(); @@ -1415,6 +1422,12 @@ END"; await _ghrh_InterviewRecordServices.Update(record, ["InterviewTime", "InterviewBeginTime", "InterviewEndTime", "Status"]); + //if (record.ReceiverIds.IsNotEmptyOrNull()) + //{ + // var staffs = JsonHelper.JsonToObj>(record.ReceiverIds); + // await SendMessage(staffs.Select(x => x.StaffId).ToList(), "简历提醒", "您有个简历【待面试】,请及时查看面试时间!"); + //} + var usser = await GetUser(); await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput() { @@ -1429,4 +1442,37 @@ END"; return ServiceResult.OprateSuccess(); } #endregion + + #region 待面试提醒 + public async Task RemindWaitInterview(long id) + { + var entity = await base.QueryById(id); + if (entity == null) + return ServiceResult.OprateFailed("无效的简历ID!"); + + if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.WaitInterview) + return ServiceResult.OprateFailed("非【待面试】状态下简历不可发送提醒!"); + + var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id); + if (order != null) + { + var record = await _ghrh_InterviewRecordServices.QuerySingle(x => x.Round == order.Round && x.OrderId == order.Id); + + if (record.ReceiverIds.IsNotEmptyOrNull()) + { + var staffs = JsonHelper.JsonToObj>(record.ReceiverIds); + await SendMessage(staffs.Select(x => x.StaffId).ToList(), "简历提醒", "您有个简历【待面试】,请及时查看面试时间!"); + } + + var usser = await GetUser(); + await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput() + { + OrderId = order.Id, + RemarkSz = $"用户【{usser?.UserName ?? App.User.ID.ToString()}】发送待面试提醒!" + }); + } + + return ServiceResult.OprateSuccess(); + } + #endregion } \ No newline at end of file