卡通过率通过标题判断是否精英班
This commit is contained in:
@@ -475,7 +475,6 @@ public class ClassController {
|
|||||||
//结班后给合格学员发放证书
|
//结班后给合格学员发放证书
|
||||||
if ("0".equals(r.get("code").toString())){
|
if ("0".equals(r.get("code").toString())){
|
||||||
ClassEntity classEntity = classEntityService.getById(params.get("classId").toString());
|
ClassEntity classEntity = classEntityService.getById(params.get("classId").toString());
|
||||||
ClassModel classModel = classModelService.getById(classEntity.getModelId());
|
|
||||||
List<Map<String,Object>> userScoreList = classEntityService.userScoreList(params);
|
List<Map<String,Object>> userScoreList = classEntityService.userScoreList(params);
|
||||||
if (userScoreList.size() > 0){
|
if (userScoreList.size() > 0){
|
||||||
for (int i=0;i<userScoreList.size(); i++) {
|
for (int i=0;i<userScoreList.size(); i++) {
|
||||||
@@ -487,7 +486,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&&
|
||||||
"2".equals(classModel.getType())?i<=(Math.floor(userScoreList.size()*0.20)):i<=(Math.floor(userScoreList.size()*0.10))){
|
classEntity.getTitle().contains("精英")?((i+1)<=(Math.floor(userScoreList.size()*0.20))):(i+1)<=(Math.floor(userScoreList.size()*0.10))){
|
||||||
type = "A";
|
type = "A";
|
||||||
}
|
}
|
||||||
userCertificate.setType(type);
|
userCertificate.setType(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user