From 0605012fa6654be73eb3cbc961fa50a31f93dc77 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Sun, 15 Dec 2024 09:27:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghrh/Ghrh_ResumeController.cs | 2 +- Tiobon.Core.Api/Tiobon.Core.Model.xml | 12 ++- Tiobon.Core.Model/Consts.cs | 12 ++- .../Ghrh/Ghrh_ResumeServices.cs | 77 ++++++++++++++----- .../Ghrh/Ghrh_YearHumanSettingsServices.cs | 2 +- Tiobon.Core/Tiobon.Core.Model.xml | 22 +++++- 6 files changed, 103 insertions(+), 24 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index 18782d31..aa7906dc 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -42,7 +42,7 @@ public class Ghrh_ResumeController : BaseController - 面试不合适 + 面试不通过 @@ -28642,6 +28642,16 @@ 黑名单 + + + 已改期 + + + + + 取消 + + 无任何权限 diff --git a/Tiobon.Core.Model/Consts.cs b/Tiobon.Core.Model/Consts.cs index a9c02935..8c9b3c35 100644 --- a/Tiobon.Core.Model/Consts.cs +++ b/Tiobon.Core.Model/Consts.cs @@ -384,7 +384,7 @@ public class Consts /// public const string Fail = "Fail"; /// - /// 面试不合适 + /// 面试不通过 /// public const string InterviewFail = "InterviewFail"; @@ -403,6 +403,16 @@ public class Consts /// public const string Blacklist = "Blacklist"; + /// + /// 已改期 + /// + public const string HasChangeDate = "HasChangeDate"; + + /// + /// 取消 + /// + public const string Cancel = "Cancel"; + } #endregion diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index c728bf76..55675fde 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1,6 +1,7 @@ using Amazon.Auth.AccessControlPolicy; using DinkToPdf; using DinkToPdf.Contracts; +using DnsClient.Protocol; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using NPOI.HSSF.Record; @@ -193,6 +194,14 @@ public class Ghrh_ResumeServices : BaseServices x.Status == DIC_INTERVIEW_ORDER_STATUS.HasOffer); break; + case "Cancel": + if (jsonParam.columnValue.ObjToInt() == 1) + whereExpression.And(x => x.Status == DIC_INTERVIEW_ORDER_STATUS.Cancel); + break; + case "HasChangeDate": + if (jsonParam.columnValue.ObjToInt() == 1) + whereExpression.And(x => x.Status == DIC_INTERVIEW_ORDER_STATUS.HasChangeDate); + break; case "SalaryPeriod": case "EduDegree": @@ -467,6 +476,11 @@ public class Ghrh_ResumeServices : BaseServices record.PlanInterviewTime3 = time); } + order.Status = DIC_INTERVIEW_ORDER_STATUS.WaitAppointment; if (isChangeInterviewTime) - order.WaitInterviewStatus = "HasChangeInterviewTime"; + order.Status = DIC_INTERVIEW_ORDER_STATUS.HasChangeDate; - order.Status = DIC_INTERVIEW_ORDER_STATUS.WaitAppointment; order.AppointmentFeedback = form.Remark; await _ghrh_InterviewOrderServices.Update(order, ["Status", "AppointmentFeedback"]); await _ghrh_InterviewRecordServices.Update(records[0], ["PlanInterviewTime1", "PlanInterviewTime2", "PlanInterviewTime3", "Status"]); #region 日志 - await LogRecord(order.Id, $"预约面试,面试时间:{string.Join("、", form.Times)},约面反馈:{order.AppointmentFeedback ?? "无"}", id, null, "SubscribeInterview"); + if (!isChangeInterviewTime) + await LogRecord(order.Id, $"预约面试,面试时间:{string.Join("、", form.Times)},约面反馈:{order.AppointmentFeedback ?? "无"}", id, null, "SubscribeInterview"); + else + await LogRecord(order.Id, $"修改面试时间,面试时间:{string.Join("、", form.Times)},备注:{(form.Remark ?? "无")}", id, null, "ChangeInterviewDate"); + #endregion - await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.WaitAppointment); + if (!isChangeInterviewTime) + await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.WaitAppointment); + else + await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.HasChangeDate); } return ServiceResult.OprateSuccess(); @@ -1813,7 +1839,7 @@ END"; await _ghrh_InterviewRecordServices.Update(records, ["InterviewTime", "InterviewBeginTime", "InterviewEndTime", "Status", "UpdateTime", "UpdateBy"]); await _ghrh_InterviewOrderServices.Update(order, ["InterviewStepName", "UpdateTime", "UpdateBy"]); - await LogRecord(order.Id, $"安排面试,面试时间:{body.Time},面试地点:{body.InterviewAddress},面试备注:{body.Remark ?? "无"}", id, records[0].Id, "ScheduleInterview", true); + await LogRecord(order.Id, $"安排面试,面试时间:{body.Time},面试地点:{body.InterviewAddress},面试备注:{body.Remark ?? "无"}", id, records[0].Id, "ScheduleInterview", true); entity.Status = DIC_INTERVIEW_ORDER_STATUS.WaitInterview; await Update(entity, ["Status", "UpdateTime", "UpdateBy"]); @@ -1878,7 +1904,7 @@ END"; var records = await _ghrh_InterviewRecordServices.Query(x => x.Round == order.Round && x.OrderId == order.Id); records.ForEach(record => { - record.Status = DIC_INTERVIEW_ORDER_STATUS.WaitAppointment; + record.Status = DIC_INTERVIEW_ORDER_STATUS.HasChangeDate; record.RemarkSz = form.Remark; if (record.PlanInterviewTime1.IsNotEmptyOrNull() || record.PlanInterviewTime2.IsNotEmptyOrNull() || record.PlanInterviewTime3.IsNotEmptyOrNull()) isChangeInterviewTime = true; @@ -1889,25 +1915,32 @@ END"; for (int i = 0; i < form.Times.Count; i++) { + var time = form.Times[i]; + if (time.IsNotEmptyOrNull()) + { + var time1 = time.Split('~'); + + time = DateTimeHelper.ConvertToMiniuteString(time1[0]) + "~" + DateTimeHelper.ConvertToOnlyHourMinuteString(time1[1]); + } if (i == 0) - records.ForEach(record => record.PlanInterviewTime1 = form.Times[i]); + records.ForEach(record => record.PlanInterviewTime1 = time); else if (i == 1) - records.ForEach(record => record.PlanInterviewTime2 = form.Times[i]); + records.ForEach(record => record.PlanInterviewTime2 = time); else if (i == 2) - records.ForEach(record => record.PlanInterviewTime3 = form.Times[i]); + records.ForEach(record => record.PlanInterviewTime3 = time); } if (isChangeInterviewTime) order.WaitInterviewStatus = "HasChangeInterviewTime"; - order.Status = DIC_INTERVIEW_ORDER_STATUS.WaitAppointment; + order.Status = DIC_INTERVIEW_ORDER_STATUS.HasChangeDate; order.AppointmentFeedback = form.Remark; await _ghrh_InterviewOrderServices.Update(order, ["Status", "AppointmentFeedback"]); await _ghrh_InterviewRecordServices.Update(records[0], ["PlanInterviewTime1", "PlanInterviewTime2", "PlanInterviewTime3", "Status"]); - await LogRecord(order.Id, $"预约面试,面试时间:{string.Join("、", form.Times)}"); + await LogRecord(order.Id, $"修改面试时间,面试时间:{string.Join("、", form.Times)},备注:{(form.Remark ?? "无")}"); - await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.WaitAppointment); + await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.HasChangeDate); } return ServiceResult.OprateSuccess(); @@ -1991,7 +2024,7 @@ END"; if (records[i].FirstViewTime.IsNotEmptyOrNull()) await SendMessage([records[i].StaffId.Value], "简历提醒", "您有个简历【待面试】,请及时查看面试时间!", "/M_ESS_Recruit/F_ESS_Interview"); } - await LogRecord(order.Id, $"发送待面试提醒"); + await LogRecord(order.Id, $"发送待面试提醒", id, null, "RemindWaitInterview"); } } @@ -2331,7 +2364,7 @@ END"; order.Status = DIC_INTERVIEW_ORDER_STATUS.Fail; order.InterviewResult = "不合适"; order.FilterFeedback = input.Content; - await _ghrh_InterviewOrderServices.Update(order, ["Status", "InterviewResult", "FilterFeedback"]); + await _ghrh_InterviewOrderServices.Update(order, ["Status", "InterviewResult", "FilterFeedback", "UpdateTime"]); var records = await _ghrh_InterviewRecordServices.Query(x => x.Round == order.Round && x.OrderId == order.Id); records.ForEach(record => @@ -2340,8 +2373,8 @@ END"; record.InterviewResult = "不合适"; record.FilterFeedback = input.Content; }); - await _ghrh_InterviewRecordServices.Update(records, ["Status", "InterviewResult", "FilterFeedback"]); - await LogRecord(order.Id, "变更状态为:不合适!"); + await _ghrh_InterviewRecordServices.Update(records, ["Status", "InterviewResult", "FilterFeedback", "UpdateTime"]); + await LogRecord(order.Id, $"变更状态为:不合适,不合适原因:{input.Content ?? "无"}", id, null, "Fail"); } return ServiceResult.OprateSuccess(); } @@ -2359,10 +2392,16 @@ END"; var record = await _ghrh_InterviewRecordServices.QuerySingle(x => x.Round == order.Round && x.OrderId == order.Id && x.StaffId == GetStaffId()); - record.WaitInterviewStatus = "Cancel"; + record.Status = DIC_INTERVIEW_ORDER_STATUS.Cancel; record.CancelReason = input.CancelReason; + await _ghrh_InterviewRecordServices.Update(record, ["Status", "CancelReason", "UpdateTime"]); + + order.Status = DIC_INTERVIEW_ORDER_STATUS.Cancel; + await _ghrh_InterviewOrderServices.Update(order, ["Status", "UpdateTime"]); + + await LogRecord(order.Id, $"取消面试,取消原因:{record.CancelReason ?? "无"}", id, null, "Cancel"); - await LogRecord(order.Id, "取消面试!"); + await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.Cancel); return ServiceResult.OprateSuccess(); } diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs index 5b5c9493..0159723a 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs @@ -130,7 +130,7 @@ public class Ghrh_YearHumanSettingsServices : BaseServices - 面试不合适 + 面试不通过 @@ -28642,6 +28642,16 @@ 黑名单 + + + 已改期 + + + + + 取消 + + 无任何权限 @@ -29432,6 +29442,16 @@ 人力需求单Id + + + FlowSignID + + + + + workId + + 附件