|
@@ -540,22 +540,6 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- List<StudentExtracurricularExercisesSituation> weekServiceWithStudents = studentExtracurricularExercisesSituationDao.findWeekServiceWithStudents(null, sysUser.getId(), null);
|
|
|
- if(weekServiceWithStudents == null || weekServiceWithStudents.size() == 0){
|
|
|
- return 0;
|
|
|
- }
|
|
|
- List<StudentExtracurricularExercisesSituation> containsList = weekServiceWithStudents.stream().filter(e -> StringUtils.isNotEmpty(e.getCourseIds()) && e.getCourseIds().contains(",")).collect(Collectors.toList());
|
|
|
- int num = 0;
|
|
|
- if(containsList != null && containsList.size() > 0){
|
|
|
- for (StudentExtracurricularExercisesSituation e : containsList) {
|
|
|
- String[] split = e.getCourseIds().split(",");
|
|
|
- if(e.getNotOverCourseNum() == 0){
|
|
|
- num = num + split.length - e.getNotOverCourseNum();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- List<StudentExtracurricularExercisesSituation> situationList = weekServiceWithStudents.stream().filter(e -> StringUtils.isEmpty(e.getCourseIds()) || !e.getCourseIds().contains(",") && e.getNotOverCourseNum() == 0).collect(Collectors.toList());
|
|
|
- num += situationList.size();
|
|
|
- return num;
|
|
|
+ return studentExtracurricularExercisesSituationDao.countWaitCreateHomeworkNum(sysUser.getId());
|
|
|
}
|
|
|
}
|