@ -66,11 +66,11 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
{
case "WaitRecommend" :
if ( jsonParam . columnValue . ObjToInt ( ) = = 1 )
whereExpression . And ( x = > x . IsRecommend = = false | | x . IsRecommend = = null ) ;
whereExpression . And ( x = > x . Status = = DIC_INTERVIEW_ORDER_STATUS . WaitRecommended ) ;
break ;
case "HasRecommend" :
if ( jsonParam . columnValue . ObjToInt ( ) = = 1 )
whereExpression . And ( x = > x . IsRecommend = = true ) ;
whereExpression . And ( x = > x . Status = = DIC_INTERVIEW_ORDER_STATUS . HasRecommended ) ;
break ;
case "SalaryPeriod" :
case "Education" :
@ -891,7 +891,7 @@ END";
resume . Base . ApplicationStatus = status ;
resume . Base . ApplicationTime = DateTime . Now ;
if ( status = = "Submit" )
resume . Base . Status = "All" ;
resume . Base . Status = DIC_INTERVIEW_ORDER_STATUS . WaitRecommended ;
if ( resume . Base . PhotoUrls ! = null & & resume . Base . PhotoUrls . Any ( ) )
resume . Base . PhotoUrl = resume . Base . PhotoUrls [ 0 ] . RelativePath ;
@ -1193,6 +1193,11 @@ END";
#region 简历推荐
public async Task < ServiceResult > Recommend ( long id , ResumeRecommendForm recommend )
{
await Db . Updateable < Ghrh_InterviewOrder > ( )
. SetColumns ( it = > it . IsEnable = = 0 )
. Where ( it = > it . ResumeId = = id )
. ExecuteCommandAsync ( ) ;
await _ ghrh_InterviewOrderServices . Add ( new InsertGhrh_InterviewOrderInput ( )
{
ResumeId = id ,
@ -1206,4 +1211,27 @@ END";
return ServiceResult . OprateSuccess ( ) ;
}
# endregion
#region 简历库已推荐提醒
public async Task < ServiceResult > HasRecommendRemind ( long id )
{
var entity = await base . QueryById ( id ) ;
if ( entity = = null )
return ServiceResult . OprateFailed ( "无效的简历ID!" ) ;
if ( entity . Status ! = DIC_INTERVIEW_ORDER_STATUS . HasRecommended )
return ServiceResult . OprateFailed ( "只有在已推荐状态下简历才能发送提醒!" ) ;
var order = await Db . Queryable < Ghrh_InterviewOrder > ( ) . FirstAsync ( x = > x . ResumeId = = id ) ;
if ( order ! = null )
{
if ( order . FirstViewTime . IsNotEmptyOrNull ( ) )
return ServiceResult . OprateFailed ( "面试官已查看简历,暂不可发送提醒!" ) ;
}
return ServiceResult . OprateSuccess ( ) ;
}
# endregion
}