正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -80,7 +80,7 @@ type SummaryEvaluationRepository interface { | @@ -80,7 +80,7 @@ type SummaryEvaluationRepository interface { | ||
80 | RemoveByCycleId(id int64) error | 80 | RemoveByCycleId(id int64) error |
81 | } | 81 | } |
82 | 82 | ||
83 | -// 计算总分。TotalScore 保留1位小数 | 83 | +// 计算总分。TotalScore 保留2位小数 |
84 | func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEvaluationValue) error { | 84 | func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEvaluationValue) error { |
85 | //重置计数 | 85 | //重置计数 |
86 | evaluation.TotalScore = "0" | 86 | evaluation.TotalScore = "0" |
@@ -94,7 +94,7 @@ func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEv | @@ -94,7 +94,7 @@ func (evaluation *SummaryEvaluation) EvaluationTotalScore(valueList []*SummaryEv | ||
94 | totalScore += score | 94 | totalScore += score |
95 | } | 95 | } |
96 | 96 | ||
97 | - evaluation.TotalScore = fmt.Sprintf("%.1f", totalScore) | 97 | + evaluation.TotalScore = fmt.Sprintf("%.2f", totalScore) |
98 | return nil | 98 | return nil |
99 | } | 99 | } |
100 | 100 |
-
请 注册 或 登录 后发表评论