...
|
...
|
@@ -648,7 +648,7 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf(param *domain. |
|
|
if len(evaluationList) == 0 {
|
|
|
//没有上级评估、360评估、hrbp 评估
|
|
|
//直接进入考核结果阶段
|
|
|
_, evaluationList, err = evaluationRepo.Find(map[string]interface{}{
|
|
|
_, evaluationFinishList, err := evaluationRepo.Find(map[string]interface{}{
|
|
|
"targetUserId": param.TargetUser.UserId,
|
|
|
"typesList": []int{int(domain.EvaluationFinish)},
|
|
|
"cycleId": param.CycleId,
|
...
|
...
|
@@ -657,12 +657,14 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf(param *domain. |
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if len(evaluationList) > 0 {
|
|
|
if len(evaluationFinishList) > 0 {
|
|
|
//进入考核结果
|
|
|
//自评的结束时间
|
|
|
evaluationList[0].BeginTime = param.EndTime
|
|
|
evaluationList[0].Status = domain.EvaluationCompleted
|
|
|
err = evaluationRepo.Save(evaluationList[0])
|
|
|
if evaluationFinishList[0].BeginTime.After(nowTime) {
|
|
|
evaluationFinishList[0].BeginTime = nowTime
|
|
|
}
|
|
|
evaluationFinishList[0].Status = domain.EvaluationCompleted
|
|
|
err = evaluationRepo.Save(evaluationFinishList[0])
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
}
|
...
|
...
|
@@ -747,7 +749,7 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluation360Hrbp(param *doma |
|
|
if len(evaluationList) == 0 {
|
|
|
//没有上级评估
|
|
|
//直接进入考核结果阶段
|
|
|
_, evaluationList, err = evaluationRepo.Find(map[string]interface{}{
|
|
|
_, evaluationFinishList, err := evaluationRepo.Find(map[string]interface{}{
|
|
|
"targetUserId": param.TargetUser.UserId,
|
|
|
"typesList": []int{int(domain.EvaluationFinish)},
|
|
|
"cycleId": param.CycleId,
|
...
|
...
|
@@ -756,11 +758,12 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluation360Hrbp(param *doma |
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if len(evaluationList) > 0 {
|
|
|
//360评估的结束时间
|
|
|
evaluationList[0].BeginTime = param.EndTime
|
|
|
evaluationList[0].Status = domain.EvaluationCompleted
|
|
|
err = evaluationRepo.Save(evaluationList[0])
|
|
|
if len(evaluationFinishList) > 0 {
|
|
|
if evaluationFinishList[0].BeginTime.After(nowTime) {
|
|
|
evaluationFinishList[0].BeginTime = nowTime
|
|
|
}
|
|
|
evaluationFinishList[0].Status = domain.EvaluationCompleted
|
|
|
err = evaluationRepo.Save(evaluationFinishList[0])
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
}
|
...
|
...
|
|