|
@@ -1731,10 +1731,12 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi |
|
@@ -1731,10 +1731,12 @@ func (srv *SummaryEvaluationService) ConfirmScoreEvaluation(param *command.Confi |
1731
|
for i := range itemList {
|
1731
|
for i := range itemList {
|
1732
|
result.ResetTotalRating(itemList[i])
|
1732
|
result.ResetTotalRating(itemList[i])
|
1733
|
}
|
1733
|
}
|
1734
|
- if err := result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
1735
|
- return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
1734
|
+ //存在 超级管理员直接修改填写 总分的情况,此时不重新计算总分
|
|
|
1735
|
+ if result.TotalScore == "0" || result.TotalScore == "" {
|
|
|
1736
|
+ if err := result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
1737
|
+ return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
1738
|
+ }
|
1736
|
}
|
1739
|
}
|
1737
|
-
|
|
|
1738
|
result.CheckResult = domain.EvaluationCheckCompleted
|
1740
|
result.CheckResult = domain.EvaluationCheckCompleted
|
1739
|
if err := evaluationRepo.Save(result); err != nil {
|
1741
|
if err := evaluationRepo.Save(result); err != nil {
|
1740
|
return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
1742
|
return application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -1817,9 +1819,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
@@ -1817,9 +1819,6 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
1817
|
if err != nil {
|
1819
|
if err != nil {
|
1818
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
1820
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
1819
|
}
|
1821
|
}
|
1820
|
- // if err := transactionContext.StartTransaction(); err != nil {
|
|
|
1821
|
- // return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
1822
|
- // }
|
|
|
1823
|
defer func() {
|
1822
|
defer func() {
|
1824
|
_ = transactionContext.RollbackTransaction()
|
1823
|
_ = transactionContext.RollbackTransaction()
|
1825
|
}()
|
1824
|
}()
|
|
@@ -1907,8 +1906,11 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
|
@@ -1907,8 +1906,11 @@ func (srv *SummaryEvaluationService) GetTargetEvaluationResult(param *command.Qu |
1907
|
for i := range itemList {
|
1906
|
for i := range itemList {
|
1908
|
result.ResetTotalRating(itemList[i])
|
1907
|
result.ResetTotalRating(itemList[i])
|
1909
|
}
|
1908
|
}
|
1910
|
- if err = result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
1911
|
- return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
1909
|
+ //存在 超级管理员直接修改填写 总分的情况,此时不重新计算总分
|
|
|
1910
|
+ if result.TotalScore == "0" || result.TotalScore == "" {
|
|
|
1911
|
+ if err = result.EvaluationTotalScore(itemValues); err != nil {
|
|
|
1912
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
1913
|
+ }
|
1912
|
}
|
1914
|
}
|
1913
|
}
|
1915
|
}
|
1914
|
|
1916
|
|