|  | @@ -56,34 +56,19 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 | 
	
		
			
				|  |  |  			params.put("offset", pageInfo.getOffset());
 | 
	
		
			
				|  |  |  			dataList = studentExtracurricularExercisesSituationDao.findExercisesSituations(params);
 | 
	
		
			
				|  |  |  			long until = LocalDateTime.ofInstant(queryInfo.getMonday().toInstant(), DateUtil.zoneId).until(LocalDateTime.ofInstant(queryInfo.getSunday().toInstant(), DateUtil.zoneId), ChronoUnit.WEEKS);
 | 
	
		
			
				|  |  | -			if(Objects.isNull(queryInfo.getExistVipCourse())||Objects.isNull(queryInfo.getExistPracticeCourse())){
 | 
	
		
			
				|  |  | -				List<Integer> studentIds = dataList.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -				Map<Integer, Long> studentVipCourseMap=new HashMap<>();
 | 
	
		
			
				|  |  | -				if(Objects.isNull(queryInfo.getExistVipCourse())){
 | 
	
		
			
				|  |  | -					List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday(), GroupType.VIP);
 | 
	
		
			
				|  |  | -					studentVipCourseMap = MapUtil.convertIntegerMap(studentVipCoursesMaps);
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -				Map<Integer, Long> studentPracticeCourseMap=new HashMap<>();
 | 
	
		
			
				|  |  | -				if(Objects.isNull(queryInfo.getExistPracticeCourse())){
 | 
	
		
			
				|  |  | -					List<Map<Integer, Long>> studentPracticeCoursesMaps = courseScheduleDao.countStudentPayPracticeCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday());
 | 
	
		
			
				|  |  | -					studentPracticeCourseMap = MapUtil.convertIntegerMap(studentPracticeCoursesMaps);
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -				for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
 | 
	
		
			
				|  |  | -					if(Objects.isNull(queryInfo.getExistVipCourse())){
 | 
	
		
			
				|  |  | -						Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
 | 
	
		
			
				|  |  | -						exercisesSituationDto.setExistVipCourse(Objects.isNull(vipCourses)?0:vipCourses.intValue());
 | 
	
		
			
				|  |  | -					}
 | 
	
		
			
				|  |  | -					if(Objects.isNull(queryInfo.getExistPracticeCourse())){
 | 
	
		
			
				|  |  | -						Long practiceCourses=studentPracticeCourseMap.get(exercisesSituationDto.getStudentId());
 | 
	
		
			
				|  |  | -						exercisesSituationDto.setExistPracticeCourse(Objects.isNull(practiceCourses)?0:practiceCourses.intValue());
 | 
	
		
			
				|  |  | -					}
 | 
	
		
			
				|  |  | -					exercisesSituationDto.setExpectExercisesNum((int) until+1);
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -			}else{
 | 
	
		
			
				|  |  | -				for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
 | 
	
		
			
				|  |  | -					exercisesSituationDto.setExpectExercisesNum((int) until+1);
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | +			List<Integer> studentIds = dataList.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +			List<Map<Integer, Long>> studentVipCoursesMaps = courseScheduleDao.countStudentVipCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday(), GroupType.VIP);
 | 
	
		
			
				|  |  | +			Map<Integer, Long> studentVipCourseMap = MapUtil.convertIntegerMap(studentVipCoursesMaps);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			List<Map<Integer, Long>> studentPracticeCoursesMaps = courseScheduleDao.countStudentPayPracticeCoursesWithDate(studentIds, queryInfo.getMonday(), queryInfo.getSunday());
 | 
	
		
			
				|  |  | +			Map<Integer, Long> studentPracticeCourseMap = MapUtil.convertIntegerMap(studentPracticeCoursesMaps);
 | 
	
		
			
				|  |  | +			for (StudentExercisesSituationDto exercisesSituationDto : dataList) {
 | 
	
		
			
				|  |  | +				Long vipCourses=studentVipCourseMap.get(exercisesSituationDto.getStudentId());
 | 
	
		
			
				|  |  | +				exercisesSituationDto.setExistVipCourse(Objects.isNull(vipCourses)?0:vipCourses.intValue());
 | 
	
		
			
				|  |  | +				Long practiceCourses=studentPracticeCourseMap.get(exercisesSituationDto.getStudentId());
 | 
	
		
			
				|  |  | +				exercisesSituationDto.setExistPracticeCourse(Objects.isNull(practiceCourses)?0:practiceCourses.intValue());
 | 
	
		
			
				|  |  | +				exercisesSituationDto.setExpectExercisesNum((int) until+1);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if (count == 0) {
 |