diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_TemplateController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_TemplateController.cs index 80e8ce60..a00257a4 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_TemplateController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_TemplateController.cs @@ -38,6 +38,6 @@ public class Ghrh_TemplateController : BaseController /// [HttpPost("Preview/{resumeId}")] - public async Task> Preview(string resumeId) => await _service.Preview(resumeId); + public async Task> Preview(long resumeId) => await _service.Preview(resumeId); #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index ea34056f..6f9bfaf4 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -25805,6 +25805,11 @@ 身份证号码 + + + 姓名 + + 修改信息 黄一名 于 2024-05-10 15:02 最后修改 diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index c72ef119..4672c805 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1672,7 +1672,7 @@ - + Offer支持的字段 diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_TemplateServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_TemplateServices.cs index 685f81c0..79ce4168 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_TemplateServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_TemplateServices.cs @@ -13,5 +13,5 @@ public interface IGhrh_TemplateServices : IBaseServices>> QueryOfferTags(); - Task> Preview(string resumeId); + Task> Preview(long resumeId); } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/CustomFieldView.cs b/Tiobon.Core.Model/ViewModels/Extend/CustomFieldView.cs index b739583c..c479d174 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/CustomFieldView.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/CustomFieldView.cs @@ -54,4 +54,14 @@ public class OfferTemplate [Description("身份证号码")] public string IdCardNo { get; set; } +} + +public class OfferTemplate1 +{ + /// + /// 姓名 + /// + [Description("姓名")] + public string StaffName { get; set; } + } \ 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 067a87d2..2a101f1e 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1892,6 +1892,9 @@ END"; if (entity == null) return ServiceResult.OprateFailed("无效的简历ID!"); + if (entity.Email.IsNullOrEmpty()) + return ServiceResult.OprateFailed("简历中尚未设置邮箱,暂不可发送!"); + 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); diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_TemplateServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_TemplateServices.cs index ced70a8e..5769cbc2 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_TemplateServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_TemplateServices.cs @@ -48,20 +48,26 @@ public class Ghrh_TemplateServices : BaseServices() { new CustomFieldView { GroupName = "中文", Fields = StringHelper.GetFieldDesc().Select(o => new ModelTagView2Item { Name=o.Key,Code=o.Key}).ToList() }, - new CustomFieldView { GroupName = "英文", Fields = StringHelper.GetFieldDesc().Select(o => new ModelTagView2Item { Name=o.Value+"_EN",Code=o.Value+"_EN"}).ToList() }, + new CustomFieldView { GroupName = "英文", Fields = StringHelper.GetFieldDesc().Select(o => new ModelTagView2Item { Name=o.Value+"_EN",Code=o.Value+"_EN"}).ToList() }, }; return await Task.FromResult(ServiceResult>.OprateSuccess("查询成功!", list)); } #endregion #region 预览Offer简历 - public async Task> Preview(string resumeId) + public async Task> Preview(long resumeId) { + var resume = await Db.Queryable().Where(x => x.Id == resumeId).SingleAsync(); var result = string.Empty; var template = await base.QuerySingle(x => x.IsPublish == 1); if (template != null) { result = template.TemplateContent; + result = result.Replace("[姓名]", resume.StaffName); + result = result.Replace("[电话]", resume.Mobile); + result = result.Replace("[邮箱]", resume.Email); + result = result.Replace("[身份证号码]", resume.IdCardNo); + result = result.Replace("[StaffName_EN]", resume.StaffEname); } return await Task.FromResult(ServiceResult.OprateSuccess("查询成功!", result)); } diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index ea34056f..6f9bfaf4 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -25805,6 +25805,11 @@ 身份证号码 + + + 姓名 + + 修改信息 黄一名 于 2024-05-10 15:02 最后修改 diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index c72ef119..4672c805 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1672,7 +1672,7 @@ - + Offer支持的字段