|
@@ -243,8 +243,34 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //二建/二造继教班级过滤
|
|
|
|
+ String businessName = iGoodsService.getGoodsBusinessName(item.getGoodsId());
|
|
|
|
+ if (businessName.contains("继续教育二级建造师") || businessName.contains("继续教育二级造价师")){
|
|
|
|
+ if (gradeVo.getClassStatus() == 1 &&
|
|
|
|
+ (gradeVo.getClassStartTime() > DateUtils.getNowTime() || gradeVo.getClassEndTime() < DateUtils.getNowTime())){
|
|
|
|
+ //过期班级
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ //班级人数
|
|
|
|
+ Goods goods = iGoodsService.getById(item.getGoodsId());
|
|
|
|
+ SysTenant tenant = iSysTenantService.getById(goods.getTenantId());
|
|
|
|
+ if (tenant.getSevenClass() == 1){
|
|
|
|
+ Integer numAll = getClassUserNumAll(gradeVo.getGradeId());
|
|
|
|
+ if (gradeVo.getStudentUpper() <= numAll){
|
|
|
|
+ //班级人数已满
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ Long num = baseMapper.getClassUserNumByTenant(gradeVo.getGradeId());
|
|
|
|
+ if (gradeVo.getStudentUpper() <= num){
|
|
|
|
+ //班级人数已满
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return true;
|
|
return true;
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
|
+ }).sorted(Comparator.comparing(ClassGradeVo::getCreateTime).reversed()).collect(Collectors.toList());
|
|
item.setGradeList(collect);
|
|
item.setGradeList(collect);
|
|
}
|
|
}
|
|
});
|
|
});
|