...
|
...
|
@@ -203,34 +203,34 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf( |
|
|
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)
|
...
|
...
|
|