作者 郑周

Merge branch 'dev-zhengzhou' into test

@@ -1376,7 +1376,7 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi @@ -1376,7 +1376,7 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi
1376 if err != nil { 1376 if err != nil {
1377 return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 1377 return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
1378 } 1378 }
1379 - // 如果已经存在考核结果分数,不再进行分数计算(如.超管多次修改员工多次确认 1379 + // 如果已经存在考核结果分数,不再进行分数计算(如.超管可以多次修改,员工多次确认成绩
1380 if len(itemValues) > 0 { 1380 if len(itemValues) > 0 {
1381 // do nothing... 1381 // do nothing...
1382 } else { 1382 } else {
@@ -1573,9 +1573,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu @@ -1573,9 +1573,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu
1573 continue 1573 continue
1574 } 1574 }
1575 } 1575 }
1576 - // if result == nil {  
1577 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有找到符合条件的数据")  
1578 - // }  
1579 if result == nil { 1576 if result == nil {
1580 return &adapter.EvaluationInfoSuperAdapter{}, nil 1577 return &adapter.EvaluationInfoSuperAdapter{}, nil
1581 } 1578 }
@@ -1589,13 +1586,14 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu @@ -1589,13 +1586,14 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu
1589 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 1586 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
1590 } 1587 }
1591 1588
1592 - // 按评估项优先级顺序(已确认考核结果 ->上级评估 ->HR或360评估或自评)  
1593 - if result.CheckResult == domain.EvaluationCheckCompleted { /* 已完成考核*/  
1594 - _, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id}) // 获取已填写的评估内容  
1595 - if err != nil {  
1596 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
1597 - }  
1598 - } else { 1589 + // 获取考核结果评分
  1590 + _, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": result.Id})
  1591 + if err != nil {
  1592 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  1593 + }
  1594 +
  1595 + // 不存在考核结果评分时(考核评分 -> 上级评分 -> 360+HR+自评)
  1596 + if len(itemValues) == 0 {
1599 if super != nil { 1597 if super != nil {
1600 _, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": super.Id}) // 获取已填写的评估内容 1598 _, itemValues, err = itemValueRepo.Find(map[string]interface{}{"summaryEvaluationId": super.Id}) // 获取已填写的评估内容
1601 if err != nil { 1599 if err != nil {