|
@@ -144,6 +144,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
|
|
|
@Autowired
|
|
|
private StudentAttendanceService studentAttendanceService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TeacherAttendanceService teacherAttendanceService;
|
|
|
@Autowired
|
|
|
private SubjectService subjectService;
|
|
|
|
|
@@ -2834,7 +2837,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
}
|
|
|
if(query.getAttendanceStatus() != null){
|
|
|
List<Long> courseIds = courseSchedules.stream().map(CourseSchedule::getId).collect(Collectors.toList());
|
|
|
- List<StudentAttendance> list = studentAttendanceService.lambdaQuery().in(StudentAttendance::getCourseScheduleId, courseIds).list();
|
|
|
+ List<TeacherAttendance> list = teacherAttendanceService.lambdaQuery().in(TeacherAttendance::getCourseScheduleId, courseIds).list();
|
|
|
if(query.getAttendanceStatus()){
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return Lists.newArrayList();
|
|
@@ -2861,9 +2864,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
}
|
|
|
//获取所有学生信息
|
|
|
List<Long> studentIds = studentPayments.stream().map(CourseScheduleStudentPayment::getUserId).collect(Collectors.toList());
|
|
|
- List<StudentAttendance> attendanceList = Lists.newArrayList();
|
|
|
+ List<TeacherAttendance> attendanceList = Lists.newArrayList();
|
|
|
if(query.getAttendanceStatus() == null){
|
|
|
- attendanceList = studentAttendanceService.lambdaQuery().in(StudentAttendance::getCourseScheduleId, courseScheduleIds).list();
|
|
|
+ attendanceList = teacherAttendanceService.lambdaQuery().in(TeacherAttendance::getCourseScheduleId, courseScheduleIds).list();
|
|
|
}
|
|
|
Map<Long, com.yonge.cooleshow.biz.dal.entity.SysUser> userMap = sysUserService.getMapByIds(studentIds);
|
|
|
List<CourseScheduleWrapper.MyCourseVo> courseVos = Lists.newArrayList();
|
|
@@ -2918,7 +2921,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
}
|
|
|
|
|
|
if(query.getAttendanceStatus() != null){
|
|
|
- List<StudentAttendance> list = studentAttendanceService.lambdaQuery().in(StudentAttendance::getCourseScheduleId, courseIds).list();
|
|
|
+ List<StudentAttendance> list = studentAttendanceService.lambdaQuery()
|
|
|
+ .eq(StudentAttendance::getStudentId, query.getStudentId())
|
|
|
+ .in(StudentAttendance::getCourseScheduleId, courseIds).list();
|
|
|
if(query.getAttendanceStatus()){
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return Lists.newArrayList();
|
|
@@ -2953,7 +2958,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
|
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(CourseSchedule::getId).collect(Collectors.toList());
|
|
|
Map<Long,Boolean> attendanceMap = new HashMap<>();
|
|
|
if(query.getAttendanceStatus() == null){
|
|
|
- List<StudentAttendance> attendanceList = studentAttendanceService.lambdaQuery().in(StudentAttendance::getCourseScheduleId, courseScheduleIds).list();
|
|
|
+ List<StudentAttendance> attendanceList = studentAttendanceService.lambdaQuery()
|
|
|
+ .eq(StudentAttendance::getStudentId, query.getStudentId())
|
|
|
+ .in(StudentAttendance::getCourseScheduleId, courseScheduleIds).list();
|
|
|
attendanceMap = attendanceList.stream().collect(Collectors.toMap(StudentAttendance::getCourseScheduleId,studentAttendance -> true));
|
|
|
}
|
|
|
//获取所有老师
|