|
@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.dto.StudentExercisesSituationDto;
|
|
|
import com.ym.mec.biz.dal.dto.StudentServiceDetailDto;
|
|
|
import com.ym.mec.biz.dal.entity.StudentExtracurricularExercisesSituation;
|
|
|
+import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
import com.ym.mec.biz.dal.page.StudentExercisesSituationQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentServiceDetailQueryInfo;
|
|
|
import com.ym.mec.biz.service.StudentExtracurricularExercisesSituationService;
|
|
@@ -51,15 +52,15 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
dataList = studentExtracurricularExercisesSituationDao.findExercisesSituations(params);
|
|
|
if(Objects.isNull(queryInfo.getExistVipCourse())){
|
|
|
List<Integer> studentIds = dataList.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toList());
|
|
|
- List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday());
|
|
|
+ List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday(), GroupType.VIP);
|
|
|
+ List<Map<Integer, Long>> studentPracticeCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday(), GroupType.PRACTICE);
|
|
|
Map<Integer, Long> studentVipCourseMap = MapUtil.convertIntegerMap(studentVipCoursesMaps);
|
|
|
+ Map<Integer, Long> studentPracticeCourseMap = MapUtil.convertIntegerMap(studentPracticeCoursesMaps);
|
|
|
for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
|
|
|
Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
|
|
|
- if(Objects.isNull(vipCourses)||vipCourses<=0){
|
|
|
- exercisesSituationDto.setExistVipCourse(0);
|
|
|
- }else{
|
|
|
- exercisesSituationDto.setExistVipCourse(1);
|
|
|
- }
|
|
|
+ Long practiceCourses=studentPracticeCourseMap.get(exercisesSituationDto.getStudentId());
|
|
|
+ exercisesSituationDto.setExistVipCourse(Objects.isNull(vipCourses)?0:vipCourses.intValue());
|
|
|
+ exercisesSituationDto.setExistPracticeCourse(Objects.isNull(practiceCourses)?0:practiceCourses.intValue());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -84,7 +85,7 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
dataList = studentExtracurricularExercisesSituationDao.findExercisesSituations(params);
|
|
|
if(Objects.isNull(queryInfo.getExistVipCourse())){
|
|
|
List<Integer> studentIds = dataList.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toList());
|
|
|
- List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday());
|
|
|
+ List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday(),GroupType.VIP);
|
|
|
Map<Integer, Long> studentVipCourseMap = MapUtil.convertIntegerMap(studentVipCoursesMaps);
|
|
|
for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
|
|
|
Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
|