master
xiaochanghai 7 months ago
parent fbfc707f03
commit c57cd97d0e
  1. 6
      Tiobon.Core.Services/Ghrh/Ghrh_OfferApplyOrderServices.cs
  2. 80
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs

@ -235,6 +235,12 @@ public class Ghrh_OfferApplyOrderServices : BaseServices<Ghrh_OfferApplyOrder, G
obj.InterviewRecord = columns;
}
var applyOrder = await base.QuerySingle(x => x.ResumeId == resumeId);
if (applyOrder != null)
{
obj.Items = await Db.Queryable<Ghrh_OfferApplyOrderSalary>().Where(x => x.OrderId == applyOrder.Id).ToListAsync();
}
return ServiceResult<dynamic>.OprateSuccess("查询成功", obj);
}

@ -295,7 +295,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
//【简历库-录用-已发offer】配置按钮
var sendOfferConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Transfer_Staff").FirstAsync();
var applyOrders = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId != null && ids.Contains(x.ResumeId.Value)).ToListAsync();
var applyOrders = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId != null && ids.Contains(x.ResumeId.Value) && x.WorkState == 0).ToListAsync();
#endregion
list.ForEach(async x =>
@ -1613,8 +1613,8 @@ END";
if (entity == null)
return ServiceResult.OprateFailed("无效的简历ID!");
if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.HasRecommended)
return ServiceResult.OprateFailed("【已推荐】状态下才能约面!");
//if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.HasRecommended)
// return ServiceResult.OprateFailed("【已推荐】状态下才能约面!");
form.Times.ForEach(x =>
{
@ -1635,9 +1635,6 @@ END";
var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id);
if (order != null)
{
bool isChangeInterviewTime = false;
var records = await _ghrh_InterviewRecordServices.Query(x => x.Round == order.Round && x.OrderId == order.Id);
@ -1731,6 +1728,77 @@ END";
}
#endregion
#region 改期
public async Task<ServiceResult> ChangeSubscribeInterview(long id, ResumeSubscribeInterviewForm form)
{
var entity = await base.QueryById(id);
if (entity == null)
return ServiceResult.OprateFailed("无效的简历ID!");
if (entity.Status != DIC_INTERVIEW_ORDER_STATUS.HasRecommended)
return ServiceResult.OprateFailed("【已推荐】状态下才能约面!");
form.Times.ForEach(x =>
{
if (x.IndexOf("~") < 0)
throw new Exception($"传入时间【{x}】无效,请检查格式!");
var array = x.Split('~');
try
{
Convert.ToDateTime(array[0]);
Convert.ToDateTime(array[1]);
}
catch (Exception)
{
throw new Exception($"传入时间【{x}】无效,请检查格式!");
}
});
var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id);
if (order != null)
{
bool isChangeInterviewTime = false;
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.RemarkSz = form.Remark;
if (record.PlanInterviewTime1.IsNotEmptyOrNull() || record.PlanInterviewTime2.IsNotEmptyOrNull() || record.PlanInterviewTime3.IsNotEmptyOrNull())
isChangeInterviewTime = true;
if (isChangeInterviewTime)
record.WaitInterviewStatus = "HasChangeInterviewTime";
});
for (int i = 0; i < form.Times.Count; i++)
{
if (i == 0)
records.ForEach(record => record.PlanInterviewTime1 = form.Times[i]);
else if (i == 1)
records.ForEach(record => record.PlanInterviewTime2 = form.Times[i]);
else if (i == 2)
records.ForEach(record => record.PlanInterviewTime3 = form.Times[i]);
}
if (isChangeInterviewTime)
order.WaitInterviewStatus = "HasChangeInterviewTime";
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"]);
await LogRecord(order.Id, $"预约面试,面试时间:{string.Join("", form.Times)}");
await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.WaitAppointment);
}
return ServiceResult.OprateSuccess();
}
#endregion
#region 变更面试时间
public async Task<ServiceResult> ModifyInterviewTime(long id, string time)
{

Loading…
Cancel
Save