diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index 2e03c99f..e023e740 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -334,16 +334,16 @@ public class Ghrh_ResumeController : BaseController - /// 发offer + /// 转入已发Offer /// /// 简历Id,列表 /// - [HttpPost, Route("SendOffer")] - public async Task SendOffer([FromBody] List ids) + [HttpPost, Route("TransferHasSendOffer")] + public async Task TransferHasSendOffer([FromBody] List ids) { - return await _service.SendOffer(ids); + return await _service.TransferHasSendOffer(ids); } #endregion diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 1c820449..931afc53 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1514,9 +1514,9 @@ 面试官列表 - + - 发offer + 转入已发Offer 简历Id,列表 diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index c60a80cb..c2fa667b 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -52,7 +52,7 @@ public interface IGhrh_ResumeServices : IBaseServices ModifyInterviewer(long id, List InterviewStaffs); - Task SendOffer(List ids); + Task TransferHasSendOffer(List ids); Task SendOffer(long id, long templateId, Dictionary extFields); Task RemindHasOffer(List ids); diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index baf6ba2d..58e05256 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -2173,8 +2173,8 @@ END"; } #endregion - #region 发offer - public async Task SendOffer(List ids) + #region 转入已发Offer + public async Task TransferHasSendOffer(List ids) { for (int i = 0; i < ids.Count; i++) { @@ -2184,11 +2184,18 @@ END"; return ServiceResult.OprateFailed("无效的简历ID!"); await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.HasSendOffer); + var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id); - await UpdateInterviewOrderStatus(order, DIC_INTERVIEW_ORDER_STATUS.HasSendOffer); - await UpdateInterviewRecordStatus(order, DIC_INTERVIEW_ORDER_STATUS.HasSendOffer); + if (order != null) + { + + await UpdateInterviewOrderStatus(order, DIC_INTERVIEW_ORDER_STATUS.HasSendOffer); + await UpdateInterviewRecordStatus(order, DIC_INTERVIEW_ORDER_STATUS.HasSendOffer); - await LogRecord(order.Id, "变更状态为:已发offer!"); + await LogRecord(order.Id, "变更状态为:已发offer!", id, null, "TransferHasSendOffer"); + } + else + await LogRecord(null, "变更状态为:已发offer!", id, null, "TransferHasSendOffer"); } return ServiceResult.OprateSuccess(); } @@ -3751,7 +3758,7 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; /// 面试单ID /// 内容 /// - public async Task LogRecord(long orderId, string content, long? resumeId = null, long? recordId = null, string source = null, bool? hasAttachment = null) + public async Task LogRecord(long? orderId, string content, long? resumeId = null, long? recordId = null, string source = null, bool? hasAttachment = null) { await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput() { @@ -3874,12 +3881,14 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; for (int i = 0; i < familys.Count; i++) { var family = familys[i]; - Dictionary staffFamily = new(); - staffFamily.Add("StaffID", staffId); - staffFamily.Add("CreateBy", App.User.ID); - staffFamily.Add("CreateTime", DateTime.Now); - staffFamily.Add("CreateProg", null); - staffFamily.Add("CreateIP", null); + Dictionary staffFamily = new() + { + { "StaffID", staffId }, + { "CreateBy", App.User.ID }, + { "CreateTime", DateTime.Now }, + { "CreateProg", null }, + { "CreateIP", null } + }; formColumns.Where(x => x.GroupType == "Family" && x.ColumnName != "AttachmentIDs").ToList() .ForEach(x => { @@ -3924,12 +3933,14 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; // IsGraduate = education.IsGraduate == true ? 1 : 0, // RemarkSz = education.RemarkSz //}; - Dictionary staffEduBG = new(); - staffEduBG.Add("StaffID", staffId); - staffEduBG.Add("CreateBy", App.User.ID); - staffEduBG.Add("CreateTime", DateTime.Now); - staffEduBG.Add("CreateProg", null); - staffEduBG.Add("CreateIP", null); + Dictionary staffEduBG = new() + { + { "StaffID", staffId }, + { "CreateBy", App.User.ID }, + { "CreateTime", DateTime.Now }, + { "CreateProg", null }, + { "CreateIP", null } + }; formColumns.Where(x => x.GroupType == "Education" && x.ColumnName != "AttachmentIDs").ToList() .ForEach(x => { @@ -3964,12 +3975,14 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; for (int i = 0; i < workExps.Count; i++) { var workExp = workExps[i]; - Dictionary staffWorkExp = new(); - staffWorkExp.Add("StaffID", staffId); - staffWorkExp.Add("CreateBy", App.User.ID); - staffWorkExp.Add("CreateTime", DateTime.Now); - staffWorkExp.Add("CreateProg", null); - staffWorkExp.Add("CreateIP", null); + Dictionary staffWorkExp = new() + { + { "StaffID", staffId }, + { "CreateBy", App.User.ID }, + { "CreateTime", DateTime.Now }, + { "CreateProg", null }, + { "CreateIP", null } + }; formColumns.Where(x => x.GroupType == "WorkExp" && x.ColumnName != "AttachmentIDs").ToList() .ForEach(x => { @@ -4001,12 +4014,14 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; { var licence = Licences[i]; - Dictionary staffLicences = new(); - staffLicences.Add("StaffID", staffId); - staffLicences.Add("CreateBy", App.User.ID); - staffLicences.Add("CreateTime", DateTime.Now); - staffLicences.Add("CreateProg", null); - staffLicences.Add("CreateIP", null); + Dictionary staffLicences = new() + { + { "StaffID", staffId }, + { "CreateBy", App.User.ID }, + { "CreateTime", DateTime.Now }, + { "CreateProg", null }, + { "CreateIP", null } + }; formColumns.Where(x => x.GroupType == "Licence" && x.ColumnName != "AttachmentIDs").ToList() .ForEach(x => { @@ -4053,12 +4068,14 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; // RemarkSz = training.RemarkSz //}; - Dictionary staffTraining = new(); - staffTraining.Add("StaffID", staffId); - staffTraining.Add("CreateBy", App.User.ID); - staffTraining.Add("CreateTime", DateTime.Now); - staffTraining.Add("CreateProg", null); - staffTraining.Add("CreateIP", null); + Dictionary staffTraining = new() + { + { "StaffID", staffId }, + { "CreateBy", App.User.ID }, + { "CreateTime", DateTime.Now }, + { "CreateProg", null }, + { "CreateIP", null } + }; formColumns.Where(x => x.GroupType == "Training" && x.ColumnName != "AttachmentIDs").ToList() .ForEach(x => {