...
|
...
|
@@ -1731,10 +1731,12 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi |
|
|
for i := range itemList {
|
|
|
result.ResetTotalRating(itemList[i])
|
|
|
}
|
|
|
//存在 超级管理员直接修改填写 总分的情况,此时不重新计算总分
|
|
|
if result.TotalScore == "0" || result.TotalScore == "" {
|
|
|
if err := result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
}
|
|
|
result.CheckResult = domain.EvaluationCheckCompleted
|
|
|
if err := evaluationRepo.Save(result); err != nil {
|
|
|
return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
...
|
...
|
@@ -1817,9 +1819,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
// if err := transactionContext.StartTransaction(); err != nil {
|
|
|
// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
// }
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
...
|
...
|
@@ -1907,10 +1906,13 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
|
for i := range itemList {
|
|
|
result.ResetTotalRating(itemList[i])
|
|
|
}
|
|
|
//存在 超级管理员直接修改填写 总分的情况,此时不重新计算总分
|
|
|
if result.TotalScore == "0" || result.TotalScore == "" {
|
|
|
if err = result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 基础数据
|
|
|
evaluationBase := srv.getSummaryEvaluation(transactionContext, result)
|
...
|
...
|
|