Offer发送 新增可选择模板

master
xiaochanghai 6 months ago
parent 9601e8e27b
commit 6bc67a0dea
  1. 7
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 9
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_TemplateController.cs
  3. 10
      Tiobon.Core.Api/Tiobon.Core.xml
  4. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  5. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_TemplateServices.cs
  6. 6
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
  7. 26
      Tiobon.Core.Services/Ghrh/Ghrh_TemplateServices.cs
  8. 10
      Tiobon.Core/Tiobon.Core.xml

@ -353,11 +353,12 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
/// </summary>
/// <param name="id">简历Id</param>
/// <param name="extFields">扩展栏位</param>
/// <param name="templateId">扩展栏位</param>
/// <returns></returns>
[HttpPost, Route("SendOffer/{id}")]
public async Task<ServiceResult> SendOffer(long id, [FromBody] Dictionary<string, string> extFields)
[HttpPost, Route("SendOffer/{id}/{templateId}")]
public async Task<ServiceResult> SendOffer(long id, long templateId, [FromBody] Dictionary<string, string> extFields)
{
return await _service.SendOffer(id, extFields);
return await _service.SendOffer(id, templateId, extFields);
}
#endregion

@ -34,10 +34,13 @@ public class Ghrh_TemplateController : BaseController<IGhrh_TemplateServices, Gh
#region 预览
/// <summary>
/// Offer支持的字段
/// 预览Offer
/// </summary>
/// <param name="resumeId">简历Id</param>
/// <param name="templateId">模板ID</param>
/// <param name="extFields">扩展字段</param>
/// <returns></returns>
[HttpPost("Preview/{resumeId}")]
public async Task<ServiceResult<string>> Preview(long resumeId, Dictionary<string, string> extFields) => await _service.Preview(resumeId, extFields);
[HttpPost("Preview/{resumeId}/{templateId}")]
public async Task<ServiceResult<string>> Preview(long resumeId, long templateId, Dictionary<string, string> extFields) => await _service.Preview(resumeId, templateId, extFields);
#endregion
}

@ -1498,12 +1498,13 @@
<param name="ids">简历Id,列表</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.SendOffer(System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.SendOffer(System.Int64,System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<summary>
发offer
</summary>
<param name="id">简历Id</param>
<param name="extFields">扩展栏位</param>
<param name="templateId">扩展栏位</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.RemindHasOffer(System.Collections.Generic.List{System.Int64})">
@ -1710,10 +1711,13 @@
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_TemplateController.Preview(System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_TemplateController.Preview(System.Int64,System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<summary>
Offer支持的字段
预览Offer
</summary>
<param name="resumeId">简历Id</param>
<param name="templateId">模板ID</param>
<param name="extFields">扩展字段</param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_YearHumanSettingsController">

@ -53,7 +53,7 @@ public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDt
Task<ServiceResult> ModifyInterviewer(long id, List<ResumeRecommendFormStaff> InterviewStaffs);
Task<ServiceResult> SendOffer(List<long> ids);
Task<ServiceResult> SendOffer(long id, Dictionary<string, string> extFields);
Task<ServiceResult> SendOffer(long id, long templateId, Dictionary<string, string> extFields);
Task<ServiceResult> RemindHasOffer(List<long> ids);

@ -13,5 +13,5 @@ public interface IGhrh_TemplateServices : IBaseServices<Ghrh_Template, Ghrh_Temp
Task<ServiceResult<List<CustomFieldView>>> QueryOfferTags();
Task<ServiceResult<string>> Preview(long resumeId, Dictionary<string, string> extFields);
Task<ServiceResult<string>> Preview(long resumeId, long templateId, Dictionary<string, string> extFields);
}

@ -353,7 +353,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
//x.InterviewResult = "推荐中";
x.OfferApplyType = offerApplyConfig?.ConfigValue ?? "System";
if (applyOrders.Any(x => x.ResumeId == x.ResumeId))
if (applyOrders.Any(o => o.ResumeId == x.ResumeId))
x.OfferApplyExist = true;
}
if (x.Status == DIC_INTERVIEW_ORDER_STATUS.HasSendOffer)
@ -2073,7 +2073,7 @@ END";
return ServiceResult.OprateSuccess();
}
public async Task<ServiceResult> SendOffer(long id, Dictionary<string, string> extFields)
public async Task<ServiceResult> SendOffer(long id, long templateId, Dictionary<string, string> extFields)
{
var entity = await base.QueryById(id);
if (entity == null)
@ -2089,7 +2089,7 @@ END";
await LogRecord(order.Id, "变更状态为:已发offer!");
var content = (await _ghrh_TemplateServices.Preview(id, extFields)).Data;
var content = (await _ghrh_TemplateServices.Preview(id, templateId, extFields)).Data;
#region 发送邮件
var mailOutbox = new Ghrs_MailOutbox();
mailOutbox.TOMail = entity.Email;

@ -18,19 +18,15 @@ public class Ghrh_TemplateServices : BaseServices<Ghrh_Template, Ghrh_TemplateDt
#region 是否开启
public async Task<ServiceResult> SwitchPublish(long id, int? isPublish)
{
if (isPublish == 0)
return ServiceResult.OprateFailed("当前已开启状态 不可以取消!");
await Db.Updateable<Ghrh_Template>()
.SetColumns(it => new Ghrh_Template()
{
IsPublish = 0,
UpdateBy = App.User.ID,
UpdateTime = DateTime.Now
})
.Where(it => it.IsPublish == 1)
.ExecuteCommandAsync();
//await Db.Updateable<Ghrh_Template>()
// .SetColumns(it => new Ghrh_Template()
// {
// IsPublish = 0,
// UpdateBy = App.User.ID,
// UpdateTime = DateTime.Now
// })
// .Where(it => it.IsPublish == 1)
// .ExecuteCommandAsync();
await Db.Updateable<Ghrh_Template>()
.SetColumns(it => new Ghrh_Template()
{
@ -95,11 +91,11 @@ public class Ghrh_TemplateServices : BaseServices<Ghrh_Template, Ghrh_TemplateDt
#endregion
#region 预览Offer简历
public async Task<ServiceResult<string>> Preview(long resumeId, Dictionary<string, string> extFields)
public async Task<ServiceResult<string>> Preview(long resumeId, long templateId, Dictionary<string, string> extFields)
{
var resume = await Db.Queryable<Ghrh_Resume>().Where(x => x.Id == resumeId).SingleAsync();
var result = string.Empty;
var template = await base.QuerySingle(x => x.IsPublish == 1);
var template = await base.QuerySingle(x => x.Id == templateId);
if (template != null)
{
result = template.TemplateContent;

@ -1498,12 +1498,13 @@
<param name="ids">简历Id,列表</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.SendOffer(System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.SendOffer(System.Int64,System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<summary>
发offer
</summary>
<param name="id">简历Id</param>
<param name="extFields">扩展栏位</param>
<param name="templateId">扩展栏位</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.RemindHasOffer(System.Collections.Generic.List{System.Int64})">
@ -1710,10 +1711,13 @@
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_TemplateController.Preview(System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_TemplateController.Preview(System.Int64,System.Int64,System.Collections.Generic.Dictionary{System.String,System.String})">
<summary>
Offer支持的字段
预览Offer
</summary>
<param name="resumeId">简历Id</param>
<param name="templateId">模板ID</param>
<param name="extFields">扩展字段</param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_YearHumanSettingsController">

Loading…
Cancel
Save