小班卡证书通过率得时候四舍五入

This commit is contained in:
wuchunlei
2025-07-10 09:35:08 +08:00
parent 6468a2e046
commit d5f7e6ba86

View File

@@ -494,7 +494,7 @@ public class ClassController {
String type = "B"; String type = "B";
//卡一下A证率普通小班A证率为的10%精英班A证率为20% //卡一下A证率普通小班A证率为的10%精英班A证率为20%
if (new BigDecimal(userScoreMap.get("userScore").toString()).compareTo(new BigDecimal(70))>=0&& if (new BigDecimal(userScoreMap.get("userScore").toString()).compareTo(new BigDecimal(70))>=0&&
(classEntity.getTitle().contains("精英")?((i+1)<=(Math.floor(userScoreList.size()*0.20))):(i+1)<=(Math.floor(userScoreList.size()*0.10)))){ (classEntity.getTitle().contains("精英")?((i+1)<=(Math.round(userScoreList.size()*0.20))):(i+1)<=(Math.round(userScoreList.size()*0.10)))){
type = "A"; type = "A";
} }
userCertificate.setType(type); userCertificate.setType(type);