@ -1,6 +1,7 @@
using Amazon.Auth.AccessControlPolicy ;
using DinkToPdf ;
using DinkToPdf.Contracts ;
using DnsClient.Protocol ;
using Microsoft.AspNetCore.Hosting ;
using Microsoft.Extensions.Hosting ;
using NPOI.HSSF.Record ;
@ -193,6 +194,14 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
if ( jsonParam . columnValue . ObjToInt ( ) = = 1 )
whereExpression . And ( x = > x . Status = = DIC_INTERVIEW_ORDER_STATUS . HasOffer ) ;
break ;
case "Cancel" :
if ( jsonParam . columnValue . ObjToInt ( ) = = 1 )
whereExpression . And ( x = > x . Status = = DIC_INTERVIEW_ORDER_STATUS . Cancel ) ;
break ;
case "HasChangeDate" :
if ( jsonParam . columnValue . ObjToInt ( ) = = 1 )
whereExpression . And ( x = > x . Status = = DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ) ;
break ;
case "SalaryPeriod" :
case "EduDegree" :
@ -467,6 +476,11 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
"" Key "" : "" WaitAppointment "" ,
"" Count "" : 0
} ,
{
"" ItemName "" : "" 已 改 期 "" ,
"" Key "" : "" HasChangeDate "" ,
"" Count "" : 0
} ,
{
"" ItemName "" : "" 待 面 试 "" ,
"" Key "" : "" WaitInterview "" ,
@ -476,6 +490,11 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
"" ItemName "" : "" 已 面 试 "" ,
"" Key "" : "" HasInterview "" ,
"" Count "" : 0
} ,
{
"" ItemName "" : "" 已 取 消 "" ,
"" Key "" : "" Cancel "" ,
"" Count "" : 0
}
]
} ,
@ -1729,7 +1748,7 @@ END";
if ( record . PlanInterviewTime1 . IsNotEmptyOrNull ( ) | | record . PlanInterviewTime2 . IsNotEmptyOrNull ( ) | | record . PlanInterviewTime3 . IsNotEmptyOrNull ( ) )
isChangeInterviewTime = true ;
if ( isChangeInterviewTime )
record . WaitInterview Status = "HasChangeInterviewTime" ;
record . Status = DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ;
} ) ;
@ -1751,20 +1770,27 @@ END";
else if ( i = = 2 )
records . ForEach ( record = > record . PlanInterviewTime3 = time ) ;
}
order . Status = DIC_INTERVIEW_ORDER_STATUS . WaitAppointment ;
if ( isChangeInterviewTime )
order . WaitInterview Status = "HasChangeInterviewTime" ;
order . Status = DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ;
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" ] ) ;
#region 日志
await LogRecord ( order . Id , $"预约面试,面试时间:{string.Join(" 、 ", form.Times)},约面反馈:{order.AppointmentFeedback ?? " 无 "}" , id , null , "SubscribeInterview" ) ;
if ( ! isChangeInterviewTime )
await LogRecord ( order . Id , $"预约面试,面试时间:{string.Join(" 、 ", form.Times)},约面反馈:{order.AppointmentFeedback ?? " 无 "}" , id , null , "SubscribeInterview" ) ;
else
await LogRecord ( order . Id , $"修改面试时间,面试时间:{string.Join(" 、 ", form.Times)},备注:{(form.Remark ?? " 无 ")}" , id , null , "ChangeInterviewDate" ) ;
# endregion
await UpdateResumeStatus ( entity , DIC_INTERVIEW_ORDER_STATUS . WaitAppointment ) ;
if ( ! isChangeInterviewTime )
await UpdateResumeStatus ( entity , DIC_INTERVIEW_ORDER_STATUS . WaitAppointment ) ;
else
await UpdateResumeStatus ( entity , DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ) ;
}
return ServiceResult . OprateSuccess ( ) ;
@ -1813,7 +1839,7 @@ END";
await _ ghrh_InterviewRecordServices . Update ( records , [ "InterviewTime" , "InterviewBeginTime" , "InterviewEndTime" , "Status" , "UpdateTime" , "UpdateBy" ] ) ;
await _ ghrh_InterviewOrderServices . Update ( order , [ "InterviewStepName" , "UpdateTime" , "UpdateBy" ] ) ;
await LogRecord ( order . Id , $"安排面试,面试时间:{body.Time},面试地点:{body.InterviewAddress}, 面试备注:{body.Remark ?? " 无 "}" , id , records [ 0 ] . Id , "ScheduleInterview" , true ) ;
await LogRecord ( order . Id , $"安排面试,面试时间:{body.Time},面试地点:{body.InterviewAddress}, 面试备注:{body.Remark ?? " 无 "}" , id , records [ 0 ] . Id , "ScheduleInterview" , true ) ;
entity . Status = DIC_INTERVIEW_ORDER_STATUS . WaitInterview ;
await Update ( entity , [ "Status" , "UpdateTime" , "UpdateBy" ] ) ;
@ -1878,7 +1904,7 @@ END";
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 . Status = DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ;
record . RemarkSz = form . Remark ;
if ( record . PlanInterviewTime1 . IsNotEmptyOrNull ( ) | | record . PlanInterviewTime2 . IsNotEmptyOrNull ( ) | | record . PlanInterviewTime3 . IsNotEmptyOrNull ( ) )
isChangeInterviewTime = true ;
@ -1889,25 +1915,32 @@ END";
for ( int i = 0 ; i < form . Times . Count ; i + + )
{
var time = form . Times [ i ] ;
if ( time . IsNotEmptyOrNull ( ) )
{
var time1 = time . Split ( '~' ) ;
time = DateTimeHelper . ConvertToMiniuteString ( time1 [ 0 ] ) + "~" + DateTimeHelper . ConvertToOnlyHourMinuteString ( time1 [ 1 ] ) ;
}
if ( i = = 0 )
records . ForEach ( record = > record . PlanInterviewTime1 = form . Times [ i ] ) ;
records . ForEach ( record = > record . PlanInterviewTime1 = time ) ;
else if ( i = = 1 )
records . ForEach ( record = > record . PlanInterviewTime2 = form . Times [ i ] ) ;
records . ForEach ( record = > record . PlanInterviewTime2 = time ) ;
else if ( i = = 2 )
records . ForEach ( record = > record . PlanInterviewTime3 = form . Times [ i ] ) ;
records . ForEach ( record = > record . PlanInterviewTime3 = time ) ;
}
if ( isChangeInterviewTime )
order . WaitInterviewStatus = "HasChangeInterviewTime" ;
order . Status = DIC_INTERVIEW_ORDER_STATUS . WaitAppointment ;
order . Status = DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ;
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 LogRecord ( order . Id , $"修改面试时间 ,面试时间:{string.Join(" 、 ", form.Times)},备注:{(form.Remark ?? " 无 " )}" ) ;
await UpdateResumeStatus ( entity , DIC_INTERVIEW_ORDER_STATUS . WaitAppointment ) ;
await UpdateResumeStatus ( entity , DIC_INTERVIEW_ORDER_STATUS . HasChangeDate ) ;
}
return ServiceResult . OprateSuccess ( ) ;
@ -1991,7 +2024,7 @@ END";
if ( records [ i ] . FirstViewTime . IsNotEmptyOrNull ( ) )
await SendMessage ( [ records [ i ] . StaffId . Value ] , "简历提醒" , "您有个简历【待面试】,请及时查看面试时间!" , "/M_ESS_Recruit/F_ESS_Interview" ) ;
}
await LogRecord ( order . Id , $"发送待面试提醒" ) ;
await LogRecord ( order . Id , $"发送待面试提醒" , id , null , "RemindWaitInterview" ) ;
}
}
@ -2331,7 +2364,7 @@ END";
order . Status = DIC_INTERVIEW_ORDER_STATUS . Fail ;
order . InterviewResult = "不合适" ;
order . FilterFeedback = input . Content ;
await _ ghrh_InterviewOrderServices . Update ( order , [ "Status" , "InterviewResult" , "FilterFeedback" ] ) ;
await _ ghrh_InterviewOrderServices . Update ( order , [ "Status" , "InterviewResult" , "FilterFeedback" , "UpdateTime" ] ) ;
var records = await _ ghrh_InterviewRecordServices . Query ( x = > x . Round = = order . Round & & x . OrderId = = order . Id ) ;
records . ForEach ( record = >
@ -2340,8 +2373,8 @@ END";
record . InterviewResult = "不合适" ;
record . FilterFeedback = input . Content ;
} ) ;
await _ ghrh_InterviewRecordServices . Update ( records , [ "Status" , "InterviewResult" , "FilterFeedback" ] ) ;
await LogRecord ( order . Id , "变更状态为:不合适! ") ;
await _ ghrh_InterviewRecordServices . Update ( records , [ "Status" , "InterviewResult" , "FilterFeedback" , "UpdateTime" ] ) ;
await LogRecord ( order . Id , $"变更状态为:不合适,不合适原因:{input.Content ?? " 无 "}" , id , null , "Fail ") ;
}
return ServiceResult . OprateSuccess ( ) ;
}
@ -2359,10 +2392,16 @@ END";
var record = await _ ghrh_InterviewRecordServices . QuerySingle ( x = > x . Round = = order . Round & & x . OrderId = = order . Id & & x . StaffId = = GetStaffId ( ) ) ;
record . WaitInterview Status = "Cancel" ;
record . Status = DIC_INTERVIEW_ORDER_STATUS . Cancel ;
record . CancelReason = input . CancelReason ;
await _ ghrh_InterviewRecordServices . Update ( record , [ "Status" , "CancelReason" , "UpdateTime" ] ) ;
order . Status = DIC_INTERVIEW_ORDER_STATUS . Cancel ;
await _ ghrh_InterviewOrderServices . Update ( order , [ "Status" , "UpdateTime" ] ) ;
await LogRecord ( order . Id , $"取消面试,取消原因:{record.CancelReason ?? " 无 "}" , id , null , "Cancel" ) ;
await LogRecord ( order . Id , "取消面试!" ) ;
await UpdateResumeStatus ( entity , DIC_INTERVIEW_ORDER_STATUS . Cancel ) ;
return ServiceResult . OprateSuccess ( ) ;
}