From 7913673e6e5e1f2ee4bb6b5c9e2d7cfff5eef420 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 14 Nov 2024 15:39:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=B2=E5=8F=91offer?= =?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 | 13 ++++++++ .../Ghrh/IGhrh_ResumeServices.cs | 2 ++ .../Ghrh/Ghrh_ResumeServices.cs | 33 +++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index fd36efcc..aec5c35a 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -342,4 +342,17 @@ public class Ghrh_ResumeController : BaseController + /// 已发offer提醒 + /// + /// 简历Id + /// + [HttpPost, Route("RemindHasOffer/{id}")] + public async Task RemindHasOffer(long id) + { + return await _service.SendOffer(id); + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 05e04901..7da69395 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -51,4 +51,6 @@ public interface IGhrh_ResumeServices : IBaseServices ModifyInterviewer(long id, List InterviewStaffs); Task SendOffer(long id); + + Task RemindHasOffer(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 f0032782..dc748216 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1630,4 +1630,37 @@ END"; return ServiceResult.OprateSuccess(); } #endregion + + #region 已发offer提醒 + public async Task RemindHasOffer(long id) + { + var entity = await base.QueryById(id); + if (entity == null) + return ServiceResult.OprateFailed("无效的简历ID!"); + + if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.HasSendOffer) + return ServiceResult.OprateFailed("非【已发offer】状态下简历不可发送提醒!"); + + 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()}】发送待已发offer提醒!" + }); + } + + return ServiceResult.OprateSuccess(); + } + #endregion } \ No newline at end of file