...
|
...
|
@@ -192,6 +192,10 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
|
|
evaluationFinish.BeginTime = nowTime
|
|
|
}
|
|
|
evaluationFinish.Status = domain.EvaluationCompleted
|
|
|
err = evaluationRepo.Save(evaluationFinish)
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
}
|
|
|
//添加确认绩效成绩提醒短信提醒
|
|
|
err = notify.AddNotifyConfirmEvaluationScore(evaluationFinish)
|
|
|
if err != nil {
|
...
|
...
|
@@ -199,45 +203,45 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
_ = noSuper
|
|
|
// if noSuper && evaluationFinish != nil {
|
|
|
//没有上级评估 同步数据到考核结果
|
|
|
|
|
|
if noSuper && evaluationFinish != nil {
|
|
|
//没有上级评估 同步数据到考核结果
|
|
|
|
|
|
// itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
// })
|
|
|
// _, itemList, err := itemUsedRepo.Find(map[string]interface{}{
|
|
|
// "evaluationProjectId": evaluationData.EvaluationProjectId,
|
|
|
// "nodeType": domain.LinkNodeSelfAssessment,
|
|
|
// })
|
|
|
// if err != nil {
|
|
|
// return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
// }
|
|
|
// //提取非360,hrbp 的评估项
|
|
|
// updateValue := []*domain.SummaryEvaluationValue{}
|
|
|
// for _, val := range itemList {
|
|
|
// if val.EvaluatorId != 0 {
|
|
|
// continue
|
|
|
// }
|
|
|
// for _, val2 := range evaluationValue {
|
|
|
// if val.Id == val2.EvaluationItemId {
|
|
|
// updateValue = append(updateValue, val2)
|
|
|
// break
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// //同步数据
|
|
|
// err = srv.syncEvaluationFinishValue(transactionContext, evaluationFinish, updateValue)
|
|
|
// if err != nil {
|
|
|
// return err
|
|
|
// }
|
|
|
// itemUsedRepo := factory.CreateEvaluationItemUsedRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
// })
|
|
|
// _, itemList, err := itemUsedRepo.Find(map[string]interface{}{
|
|
|
// "evaluationProjectId": evaluationData.EvaluationProjectId,
|
|
|
// "nodeType": domain.LinkNodeSelfAssessment,
|
|
|
// })
|
|
|
// if err != nil {
|
|
|
// return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
// }
|
|
|
// //提取非360,hrbp 的评估项
|
|
|
// updateValue := []*domain.SummaryEvaluationValue{}
|
|
|
// for _, val := range itemList {
|
|
|
// if val.EvaluatorId != 0 {
|
|
|
// continue
|
|
|
// }
|
|
|
// for _, val2 := range evaluationValue {
|
|
|
// if val.Id == val2.EvaluationItemId {
|
|
|
// updateValue = append(updateValue, val2)
|
|
|
// break
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// //同步数据
|
|
|
// err = srv.syncEvaluationFinishValue(transactionContext, evaluationFinish, updateValue)
|
|
|
// if err != nil {
|
|
|
// return err
|
|
|
// }
|
|
|
|
|
|
} else if len(targetEvaluation) == 0 && evaluationFinish != nil {
|
|
|
err = evaluationRepo.Save(evaluationFinish)
|
|
|
if err != nil {
|
|
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
}
|
|
|
}
|
|
|
// } else if len(targetEvaluation) == 0 && evaluationFinish != nil {
|
|
|
// err = evaluationRepo.Save(evaluationFinish)
|
|
|
// if err != nil {
|
|
|
// return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
return nil
|
|
|
} |
...
|
...
|
|