...
|
...
|
@@ -80,7 +80,7 @@ type SummaryEvaluationRepository interface { |
|
|
RemoveByCycleId(id int64) error
|
|
|
}
|
|
|
|
|
|
// 计算总分。TotalScore 保留1位小数
|
|
|
// 计算总分。TotalScore 保留2位小数
|
|
|
func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEvaluationValue) error {
|
|
|
//重置计数
|
|
|
evaluation.TotalScore = "0"
|
...
|
...
|
@@ -94,7 +94,7 @@ func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEv |
|
|
totalScore += score
|
|
|
}
|
|
|
|
|
|
evaluation.TotalScore = fmt.Sprintf("%.1f", totalScore)
|
|
|
evaluation.TotalScore = fmt.Sprintf("%.2f", totalScore)
|
|
|
return nil
|
|
|
}
|
|
|
|
...
|
...
|
|