|
@@ -946,15 +946,25 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public HashMap<String, Object> getPlush(ClassGradeUserQueryBo bo) {
|
|
public HashMap<String, Object> getPlush(ClassGradeUserQueryBo bo) {
|
|
- List<ClassGradeStudentVo> classGradeStudentVos = this.baseMapper.listGradeAll(bo);
|
|
|
|
- bo.setPeriodPlush(1);
|
|
|
|
- Integer plush = this.baseMapper.getPlush(bo);
|
|
|
|
HashMap<String, Object> stringObjectHashMap = new HashMap<>();
|
|
HashMap<String, Object> stringObjectHashMap = new HashMap<>();
|
|
- stringObjectHashMap.put("plush",plush);
|
|
|
|
- if (classGradeStudentVos.size()<=plush){
|
|
|
|
- stringObjectHashMap.put("notPlush",0);
|
|
|
|
|
|
+ if(ObjectUtils.isNotEmpty(bo.getPeriodPlush())&&bo.getPeriodPlush()!=1){
|
|
|
|
+ List<ClassGradeStudentVo> classGradeStudentVos = this.baseMapper.listGradeAll(bo);
|
|
|
|
+ stringObjectHashMap.put("notPlush",classGradeStudentVos.size());
|
|
|
|
+ stringObjectHashMap.put("plush",0);
|
|
}else {
|
|
}else {
|
|
- stringObjectHashMap.put("notPlush",classGradeStudentVos.size()-plush);
|
|
|
|
|
|
+ List<ClassGradeStudentVo> classGradeStudentVos= this.baseMapper.listGradeAll(bo);
|
|
|
|
+ if (!classGradeStudentVos.isEmpty()){
|
|
|
|
+ int plush = classGradeStudentVos.stream().filter(s -> s.getPeriodPlush().equals(1)).collect(Collectors.toList()).size();
|
|
|
|
+ stringObjectHashMap.put("plush",plush);
|
|
|
|
+ if (classGradeStudentVos.size()<=plush){
|
|
|
|
+ stringObjectHashMap.put("notPlush",0);
|
|
|
|
+ }else {
|
|
|
|
+ stringObjectHashMap.put("notPlush",classGradeStudentVos.size()-plush);
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ stringObjectHashMap.put("notPlush",0);
|
|
|
|
+ stringObjectHashMap.put("plush",0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return stringObjectHashMap;
|
|
return stringObjectHashMap;
|
|
}
|
|
}
|