From 05fb27247f383c6b1aeaf10999c392b6af4aac7e Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 20 Nov 2024 15:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E6=8E=92=E9=9D=A2?= =?UTF-8?q?=E8=AF=95=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 | 4 ++-- .../Ghrh/IGhrh_ResumeServices.cs | 2 +- .../ViewModels/Extend/ResumeViewTab.cs | 20 +++++++++++++++---- .../Ghrh/Ghrh_ResumeServices.cs | 17 +++++++++------- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index 26d0dc81..6399ae8a 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -252,10 +252,10 @@ public class Ghrh_ResumeController : BaseController /// 简历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); + public async Task ScheduleInterview(long id, [FromBody] ResumeScheduleInterviewForm body) => await _service.ScheduleInterview(id, time); #endregion diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 9802a4ca..78ed4d9d 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -38,7 +38,7 @@ public interface IGhrh_ResumeServices : IBaseServices RemindHasRecommend(List id); Task SubscribeInterview(long id, List times); - Task ScheduleInterview(long id, string time); + Task ScheduleInterview(long id, ResumeScheduleInterviewForm body); Task ModifyInterviewTime(long id, string time); diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs index 5f19f8f1..7e0d4232 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs @@ -95,14 +95,26 @@ public class ResumeRecommendForm public class ResumeScheduleInterviewForm { /// - /// 人力需求维护ID + /// 时间段,2024/10/12 10:00~2024/10/12 11:00 /// - public long RequestId { get; set; } + public string Time { get; set; } /// - /// 面试官列表 + /// 面试地点 /// - public List InterviewStaffs { get; set; } + public string InterviewAddress { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + + /// + /// 附件 + /// + public List Attachments { get; set; } + + } public class ResumeRecommendFormStaff { diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 8655038c..2e93f0c1 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1,4 +1,5 @@ using MySqlX.XDevAPI.Common; +using NPOI.XWPF.UserModel; using Tiobon.Core.Common.DB.Dapper.Extensions; using static Tiobon.Core.Model.Consts; @@ -1375,7 +1376,7 @@ END"; #endregion #region 安排面试 - public async Task ScheduleInterview(long id, string time) + public async Task ScheduleInterview(long id, ResumeScheduleInterviewForm body) { var entity = await base.QueryById(id); if (entity == null) @@ -1384,9 +1385,9 @@ END"; if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.WaitAppointment) return ServiceResult.OprateFailed("【待预约】状态下才能安排面试!"); - if (time.IndexOf("~") < 0) - throw new Exception($"传入时间【{time}】无效,请检查格式!"); - var array = time.Split('~'); + if (body.Time.IndexOf("~") < 0) + throw new Exception($"传入时间【{body.Time}】无效,请检查格式!"); + var array = body.Time.Split('~'); try { Convert.ToDateTime(array[0]); @@ -1394,7 +1395,7 @@ END"; } catch (Exception) { - throw new Exception($"传入时间【{time}】无效,请检查格式!"); + throw new Exception($"传入时间【{body.Time}】无效,请检查格式!"); } var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id); if (order != null) @@ -1403,10 +1404,12 @@ END"; records.ForEach(record => { - record.InterviewTime = time; + record.InterviewTime = body.Time; record.InterviewBeginTime = Convert.ToDateTime(array[0]); record.InterviewEndTime = Convert.ToDateTime(array[1]); record.Status = DIC_INTERVIEW_ORDER_STATUS.WaitInterview; + record.RemarkSz = body.Remark; + record.InterviewAddress = body.InterviewAddress; }); await _ghrh_InterviewRecordServices.Update(records, ["InterviewTime", "InterviewBeginTime", "InterviewEndTime", "Status"]); @@ -1415,7 +1418,7 @@ END"; await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput() { OrderId = order.Id, - RemarkSz = $"用户【{usser?.UserName ?? App.User.ID.ToString()}】安排面试,面试时间:{time}!" + RemarkSz = $"用户【{usser?.UserName ?? App.User.ID.ToString()}】安排面试,面试时间:{body.Time}!" }); entity.Status = DIC_INTERVIEW_ORDER_STATUS.WaitInterview;