|
@@ -62,6 +62,8 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
@Autowired
|
|
|
private ClassGroupDao classGroupDao;
|
|
|
@Autowired
|
|
|
+ private StudentAttendanceDao studentAttendanceDao;
|
|
|
+ @Autowired
|
|
|
private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
|
|
|
|
@Override
|
|
@@ -418,15 +420,16 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
params.put("courseIds", courseIds);
|
|
|
|
|
|
- Map<Long,Long> memberNumMap = MapUtil.convertIntegerMap(studentDao.countCourseStudentMemberNum(courseIds));
|
|
|
- Map<Long,String> studentSubjectMap = MapUtil.convertMybatisMap(studentDao.countCourseStudentSubjectName(courseIds));
|
|
|
- Map<Long, Long> studentNumMap = MapUtil.convertIntegerMap(courseScheduleStudentPaymentDao.countCourseStudentNum(courseIds));
|
|
|
-
|
|
|
List<CourseHomework> courseHomeworks = courseHomeworkDao.findByCourseSchedules(new ArrayList<>(courseIds));
|
|
|
if(!CollectionUtils.isEmpty(courseHomeworks)){
|
|
|
Set<Long> collect = courseHomeworks.stream().map(e -> e.getCourseScheduleId()).collect(Collectors.toSet());
|
|
|
courseIds.removeAll(collect);
|
|
|
}
|
|
|
+ Map<Long,Long> memberNumMap = MapUtil.convertIntegerMap(studentDao.countCourseStudentMemberNum(courseIds));
|
|
|
+ Map<Long,String> studentSubjectMap = MapUtil.convertMybatisMap(studentDao.countCourseStudentSubjectName(courseIds));
|
|
|
+ Map<Long, Long> studentNumMap = MapUtil.convertIntegerMap(courseScheduleStudentPaymentDao.countCourseStudentNum(courseIds));
|
|
|
+ Map<Integer, Long> studentNumCourseMap = MapUtil.convertIntegerMap(studentAttendanceDao.countStudentAttendancesByCourses(courseIds));
|
|
|
+
|
|
|
if(courseIds.size() == 0){
|
|
|
return pageInfo;
|
|
|
}
|
|
@@ -438,6 +441,12 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
homeworkPojos = courseScheduleDao.queryHomeworkPojoByCourseScheduleIds(params);
|
|
|
pageInfo.setRows(homeworkPojos);
|
|
|
for (TeacherServeHomeworkPojo homeworkPojo : homeworkPojos) {
|
|
|
+ Long studentNum = studentNumCourseMap.get(homeworkPojo.getCourseScheduleId().intValue());
|
|
|
+ if (Objects.nonNull(studentNum)) {
|
|
|
+ homeworkPojo.setStudentAttendanceIsFirstTime(studentNum > 0 ? 0 : 1);
|
|
|
+ } else {
|
|
|
+ homeworkPojo.setStudentAttendanceIsFirstTime(1);
|
|
|
+ }
|
|
|
Long aLong = memberNumMap.get(homeworkPojo.getCourseScheduleId());
|
|
|
homeworkPojo.setMemberNum(aLong==null?0:aLong.intValue());
|
|
|
Long aLong1 = studentNumMap.get(homeworkPojo.getCourseScheduleId());
|
|
@@ -520,4 +529,9 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
pageInfo.setRows(dataList);
|
|
|
return pageInfo;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int countWaitCreateHomeworkNum(TeacherServeHomeworkQueryInfo queryInfo) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
}
|