...
|
...
|
@@ -1575,9 +1575,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
continue
|
|
|
}
|
|
|
}
|
|
|
// if result == nil {
|
|
|
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有找到符合条件的数据")
|
|
|
// }
|
|
|
if result == nil {
|
|
|
return &adapter.EvaluationInfoSuperAdapter{}, nil
|
|
|
}
|
...
|
...
|
@@ -1591,13 +1588,14 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 按评估项优先级顺序(已确认考核结果 ->上级评估 ->HR或360评估或自评)
|
|
|
if result.CheckResult == domain.EvaluationCheckCompleted { /* 已完成考核*/
|
|
|
_, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id}) // 获取已填写的评估内容
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
} else {
|
|
|
// 获取考核结果评分
|
|
|
_, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 不存在考核结果评分时(考核评分 -> 上级评分 -> 360+HR+自评)
|
|
|
if len(itemValues) == 0 {
|
|
|
if super != nil {
|
|
|
_, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": super.Id}) // 获取已填写的评估内容
|
|
|
if err != nil {
|
...
|
...
|
|