转入待发Offer 新增是否存在录用审批校验

master
xiaochanghai 6 months ago
parent 03ec46c24f
commit 8f810618a8
  1. 4
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 11
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs

@ -440,9 +440,9 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
}
#endregion
#region 发起录用审批
#region 转入待发Offer
/// <summary>
/// 发起录用审批
/// 转入待发Offer
/// </summary>
/// <param name="ids">简历ID</param>
/// <returns></returns>

@ -2415,7 +2415,7 @@ END";
}
#endregion
#region 发起录用审批-作废
#region 转入待发Offer
public async Task<ServiceResult> ApplyOfferApproval(List<long> ids)
{
for (int i = 0; i < ids.Count; i++)
@ -2425,15 +2425,18 @@ END";
if (entity == null)
return ServiceResult.OprateFailed("无效的简历ID!");
if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.HasInterview)
return ServiceResult.OprateFailed("暂不可发起录用审批!");
if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.HasInterview || entity.Status != DIC_INTERVIEW_ORDER_STATUS.WaitRecommended)
return ServiceResult.OprateFailed("只有在【已面试】、【待推荐】状态下,才能转入待发Offer!");
if (await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.WorkState == 0 && x.ResumeId == id).AnyAsync())
return ServiceResult.OprateFailed("当前简历录用审批处于审批中,不可转入待发Offer!");
await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer);
var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id);
await UpdateInterviewOrderStatus(order, DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer);
await UpdateInterviewRecordStatus(order, DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer);
await LogRecord(order.Id, "发起录用审批!", id, null, "ApplyOffer");
await LogRecord(order.Id, "转入待发Offer!", id, null, "TransferWaitSendOffer");
}
return ServiceResult.OprateSuccess();

Loading…
Cancel
Save