| 
					
				 | 
			
			
				@@ -302,10 +302,10 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int weekServiceNum = studentExtracurricularExercisesSituationDao.countWeekServiceNum(monDayDate.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(weekServiceNum>0&&CollectionUtils.isEmpty(studentIds)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        int weekServiceNum = studentExtracurricularExercisesSituationDao.countWeekServiceNum(monDayDate.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        if(weekServiceNum>0&&CollectionUtils.isEmpty(studentIds)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<StudentServeCourseDto> studentFutureCourseInfo = studentDao.getStudentFutureCourseInfo(monDayDate.toString(), studentIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<Integer, List<StudentServeCourseDto>> studentCourseMap = studentFutureCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getStudentId)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -319,11 +319,15 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentServeCourseDto> futureCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.SINGLE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentServeCourseDto> weekCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.SINGLE).stream().filter(c -> c.getCourseStartTime().compareTo(nextMonday) < 0).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(CollectionUtils.isEmpty(weekCourseInfo)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            futureCourseInfo.get(0).getActualTeacherId(),nowDate.get(DateUtil.weekFields.weekOfYear()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            "EXERCISE", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    results.add(studentExtracurricularExercisesSituation); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Map<String, List<StudentServeCourseDto>> groupCourseInfo = futureCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getMusicGroupId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (Map.Entry<String, List<StudentServeCourseDto>> groupCourseInfoEntry : groupCourseInfo.entrySet()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        StudentServeCourseDto courseInfo = groupCourseInfoEntry.getValue().stream().min(Comparator.comparing(StudentServeCourseDto::getCourseStartTime)).get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                courseInfo.getActualTeacherId(),nowDate.get(DateUtil.weekFields.weekOfYear()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "EXERCISE", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        results.add(studentExtracurricularExercisesSituation); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     Map<String, List<StudentServeCourseDto>> groupCourseInfo = weekCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getMusicGroupId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     Map<Integer, Set<Long>> teacherServiceCourseIdMap = new HashMap<>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -347,11 +351,14 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentServeCourseDto> futureCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.VIP); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentServeCourseDto> weekCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.VIP).stream().filter(c -> c.getCourseStartTime().compareTo(nextMonday) < 0).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(CollectionUtils.isEmpty(weekCourseInfo)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            futureCourseInfo.get(0).getActualTeacherId(),nowDate.get(DateUtil.weekFields.weekOfYear()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            "EXERCISE", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    results.add(studentExtracurricularExercisesSituation); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Map<Integer, List<StudentServeCourseDto>> teacherCourseMap = futureCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getActualTeacherId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (Integer teacherId : teacherCourseMap.keySet()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                teacherId,nowDate.get(DateUtil.weekFields.weekOfYear()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "EXERCISE", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        results.add(studentExtracurricularExercisesSituation); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     Map<Integer, List<StudentServeCourseDto>> teacherCourseMap = weekCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getActualTeacherId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     for (Map.Entry<Integer, List<StudentServeCourseDto>> teacherCourseMapEntry : teacherCourseMap.entrySet()) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -386,11 +393,14 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentServeCourseDto> futureCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.PRACTICE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentServeCourseDto> weekCourseInfo = typeCourseMap.get(CourseSchedule.CourseScheduleType.PRACTICE).stream().filter(c -> c.getCourseStartTime().compareTo(nextMonday) < 0).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(CollectionUtils.isEmpty(weekCourseInfo)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            futureCourseInfo.get(0).getActualTeacherId(),nowDate.get(DateUtil.weekFields.weekOfYear()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            "EXERCISE", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    results.add(studentExtracurricularExercisesSituation); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Set<Integer> teacherIds = weekCourseInfo.stream().map(StudentServeCourseDto::getActualTeacherId).collect(Collectors.toSet()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (Integer teacherId : teacherIds) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        StudentExtracurricularExercisesSituation studentExtracurricularExercisesSituation=new StudentExtracurricularExercisesSituation(studentCourseMapEntry.getKey(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                teacherId,nowDate.get(DateUtil.weekFields.weekOfYear()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(sunDayDate.toString(), "yyyy-MM-dd"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "EXERCISE", null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        results.add(studentExtracurricularExercisesSituation); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     Map<Integer, List<StudentServeCourseDto>> teacherCourseMap = weekCourseInfo.stream().collect(Collectors.groupingBy(StudentServeCourseDto::getActualTeacherId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     Map<Integer, Set<Long>> teacherServiceCourseIdMap = new HashMap<>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -413,7 +423,7 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(CollectionUtils.isEmpty(studentIds)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(!CollectionUtils.isEmpty(results)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             studentExtracurricularExercisesSituationDao.deleteByMonday(monDayDate.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BigDecimal currentPage1=BigDecimal.ONE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     pageSize1=new BigDecimal(10000), 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -422,55 +432,56 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             while (currentPage1.compareTo(totalPage1)<=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<StudentExtracurricularExercisesSituation> rows=results.stream().skip(pageSize1.multiply(currentPage1.subtract(BigDecimal.ONE)).longValue()).limit(pageSize1.longValue()).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                studentExtracurricularExercisesSituationDao.batchInsert(rows); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                currentPage1=currentPage1.add(BigDecimal.ONE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<StudentExtracurricularExercisesSituation> weekServiceWithStudents = studentExtracurricularExercisesSituationDao.findWeekServiceWithStudents(monDayDate.toString(), null, studentIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Map<String, StudentExtracurricularExercisesSituation> codeServeMap = weekServiceWithStudents.stream().collect(Collectors.toMap(StudentExtracurricularExercisesSituation::getStuAndTeaCode, s -> s, (s1, s2) -> s1)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<Integer> updateStudentIds = rows.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Set<String> newCodes = results.stream().map(StudentExtracurricularExercisesSituation::getStuAndTeaCode).collect(Collectors.toSet()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (StudentExtracurricularExercisesSituation weekServiceWithStudent : weekServiceWithStudents) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(weekServiceWithStudent.getActualExercisesNum()>0||newCodes.contains(weekServiceWithStudent.getStuAndTeaCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            studentExtracurricularExercisesSituationDao.delete(weekServiceWithStudent.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<StudentExtracurricularExercisesSituation> weekServiceWithStudents = studentExtracurricularExercisesSituationDao.findWeekServiceWithStudents(monDayDate.toString(), null, updateStudentIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Map<String, StudentExtracurricularExercisesSituation> codeServeMap = weekServiceWithStudents.stream().collect(Collectors.toMap(StudentExtracurricularExercisesSituation::getStuAndTeaCode, s -> s, (s1, s2) -> s1)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<StudentExtracurricularExercisesSituation> newService = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<StudentExtracurricularExercisesSituation> updateService = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (StudentExtracurricularExercisesSituation result : results) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(codeServeMap.containsKey(result.getStuAndTeaCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                StudentExtracurricularExercisesSituation s = codeServeMap.get(result.getStuAndTeaCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Set<Long> courseIds = new HashSet<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(StringUtils.isNotBlank(s.getCourseIds())&&s.getActualExercisesNum()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    courseIds = Arrays.stream(s.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toSet()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(StringUtils.isNotBlank(result.getCourseIds())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    courseIds.addAll(Arrays.stream(result.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toSet())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                s.setServeType(result.getServeType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(s.getServeType().equals("HOMEWORK")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    s.setCourseIds(StringUtils.join(courseIds, ",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    s.setCourseIds(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Set<String> newCodes = rows.stream().map(StudentExtracurricularExercisesSituation::getStuAndTeaCode).collect(Collectors.toSet()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (StudentExtracurricularExercisesSituation weekServiceWithStudent : weekServiceWithStudents) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(weekServiceWithStudent.getActualExercisesNum()>0||newCodes.contains(weekServiceWithStudent.getStuAndTeaCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    studentExtracurricularExercisesSituationDao.delete(weekServiceWithStudent.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(StringUtils.isBlank(s.getCourseIds())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    s.setExpectExercisesNum(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    s.setExpectExercisesNum(courseIds.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<StudentExtracurricularExercisesSituation> newService = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<StudentExtracurricularExercisesSituation> updateService = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (StudentExtracurricularExercisesSituation result : rows) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(codeServeMap.containsKey(result.getStuAndTeaCode())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        StudentExtracurricularExercisesSituation s = codeServeMap.get(result.getStuAndTeaCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        Set<Long> courseIds = new HashSet<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if(StringUtils.isNotBlank(s.getCourseIds())&&s.getActualExercisesNum()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            courseIds = Arrays.stream(s.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toSet()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if(StringUtils.isNotBlank(result.getCourseIds())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            courseIds.addAll(Arrays.stream(result.getCourseIds().split(",")).map(id->Long.valueOf(id)).collect(Collectors.toSet())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        s.setServeType(result.getServeType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if(s.getServeType().equals("HOMEWORK")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            s.setCourseIds(StringUtils.join(courseIds, ",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            s.setCourseIds(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if(StringUtils.isBlank(s.getCourseIds())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            s.setExpectExercisesNum(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            s.setExpectExercisesNum(courseIds.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        updateService.add(s); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        newService.add(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                updateService.add(s); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                newService.add(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(!CollectionUtils.isEmpty(updateService)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    studentExtracurricularExercisesSituationDao.batchUpdate(updateService); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(!CollectionUtils.isEmpty(newService)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    studentExtracurricularExercisesSituationDao.batchInsert(newService); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                currentPage1=currentPage1.add(BigDecimal.ONE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(!CollectionUtils.isEmpty(updateService)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            studentExtracurricularExercisesSituationDao.batchUpdate(updateService); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(!CollectionUtils.isEmpty(newService)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            studentExtracurricularExercisesSituationDao.batchInsert(newService); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -655,4 +666,20 @@ public class StudentServeServiceImpl implements StudentServeService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return courseIds; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Set<Integer> getStudentWithCourse(Long courseId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        CourseSchedule courseSchedule = courseScheduleDao.get(courseId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(Objects.isNull(courseSchedule)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new HashSet<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LocalDate nowDate = LocalDateTime.ofInstant(courseSchedule.getClassDate().toInstant(), DateUtil.zoneId).toLocalDate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<StudentExtracurricularExercisesSituation> serviceWithCourse = studentExtracurricularExercisesSituationDao.findServiceWithCourse(monDayDate.toString(), courseId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(CollectionUtils.isEmpty(serviceWithCourse)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new HashSet<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return serviceWithCourse.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toSet()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |