作者 tangxvhui

日常保存

... ... @@ -673,10 +673,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf(param *domain.
// 进入考核结果阶段
if evaluationList[0].BeginTime.After(nowTime) {
evaluationList[0].BeginTime = nowTime
err = evaluationRepo.Save(evaluationList[0])
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
}
evaluationList[0].Status = domain.EvaluationCompleted
err = evaluationRepo.Save(evaluationList[0])
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
}
}
... ... @@ -735,7 +736,7 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluation360Hrbp(param *doma
"targetUserId": param.TargetUser.UserId,
"typesList": []int{int(domain.EvaluationSuper)},
"cycleId": param.CycleId,
"limit": 10,
"limit": 1,
})
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -771,10 +772,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluation360Hrbp(param *doma
if len(evaluationList) > 0 {
if evaluationList[0].BeginTime.After(nowTime) {
evaluationList[0].BeginTime = nowTime
err = evaluationRepo.Save(evaluationList[0])
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
}
evaluationList[0].Status = domain.EvaluationCompleted
err = evaluationRepo.Save(evaluationList[0])
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
}
}
... ... @@ -824,10 +826,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSuper(param *domain
if len(evaluationList) > 0 {
if evaluationList[0].BeginTime.After(nowTime) {
evaluationList[0].BeginTime = nowTime
err = evaluationRepo.Save(evaluationList[0])
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
}
evaluationList[0].Status = domain.EvaluationCompleted
err = evaluationRepo.Save(evaluationList[0])
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
}
if err := transactionContext.CommitTransaction(); err != nil {
... ...