|
@@ -1,5 +1,7 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
@@ -65,6 +67,8 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
private StudentAttendanceDao studentAttendanceDao;
|
|
|
@Autowired
|
|
|
private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, StudentExtracurricularExercisesSituation> getDAO() {
|
|
@@ -531,12 +535,16 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public int countWaitCreateHomeworkNum(TeacherServeHomeworkQueryInfo queryInfo) {
|
|
|
- List<StudentExtracurricularExercisesSituation> weekServiceWithStudents = studentExtracurricularExercisesSituationDao.findWeekServiceWithStudents(null, queryInfo.getTeacherId(), null);
|
|
|
+ public int countWaitCreateHomeworkNum() {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ 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 -> e.getCourseIds().contains(",")).collect(Collectors.toList());
|
|
|
+ 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) {
|
|
@@ -546,7 +554,7 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- List<StudentExtracurricularExercisesSituation> situationList = weekServiceWithStudents.stream().filter(e -> !e.getCourseIds().contains(",") && e.getNotOverCourseNum() == 0).collect(Collectors.toList());
|
|
|
+ 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;
|
|
|
}
|