| 
														
															@@ -116,11 +116,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (Objects.isNull(currentCourseDetail)) { 
														 | 
														
														 | 
														
															         if (Objects.isNull(currentCourseDetail)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             throw new BizException("课程不存在"); 
														 | 
														
														 | 
														
															             throw new BizException("课程不存在"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        YesOrNoEnum yesOrNoEnum = enableOnlyNormalAttendance(currentCourseDetail.getStartClassTime(), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                user.getId().longValue(), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                true, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                currentCourseDetail.getSchoolId().intValue()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        currentCourseDetail.setOnlyNormal(yesOrNoEnum); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(Objects.nonNull(currentCourseDetail.getSchoolId())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            YesOrNoEnum yesOrNoEnum = enableOnlyNormalAttendance(currentCourseDetail.getStartClassTime(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    user.getId().longValue(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    true, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    currentCourseDetail.getSchoolId().intValue()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            currentCourseDetail.setOnlyNormal(yesOrNoEnum); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        }else{ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            currentCourseDetail.setOnlyNormal(YesOrNoEnum.NO); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         currentCourseDetail.setCurrentClassTimes(courseScheduleDao.countClassGroupOverCourseNum(currentCourseDetail.getClassId())); 
														 | 
														
														 | 
														
															         currentCourseDetail.setCurrentClassTimes(courseScheduleDao.countClassGroupOverCourseNum(currentCourseDetail.getClassId())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE); 
														 | 
														
														 | 
														
															         SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         currentCourseDetail.setEnableStudentAttendanceTimeRange(sysConfig.getParanValue(Integer.class)); 
														 | 
														
														 | 
														
															         currentCourseDetail.setEnableStudentAttendanceTimeRange(sysConfig.getParanValue(Integer.class)); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -143,7 +148,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Integer classGroupId = null; 
														 | 
														
														 | 
														
															         Integer classGroupId = null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (!CollectionUtils.isEmpty(courseScheduleIds)) { 
														 | 
														
														 | 
														
															         if (!CollectionUtils.isEmpty(courseScheduleIds)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleIds.get(0)); 
														 | 
														
														 | 
														
															             CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleIds.get(0)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            classGroupId = courseSchedule.getClassGroupId(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(Objects.nonNull(courseSchedule)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                classGroupId = courseSchedule.getClassGroupId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<Long> enableDeleteIds = courseScheduleDao.filterNotStartCourseIdsWithIds(courseScheduleIds); 
														 | 
														
														 | 
														
															         List<Long> enableDeleteIds = courseScheduleDao.filterNotStartCourseIdsWithIds(courseScheduleIds); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (!CollectionUtils.isEmpty(enableDeleteIds)) { 
														 | 
														
														 | 
														
															         if (!CollectionUtils.isEmpty(enableDeleteIds)) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -212,13 +219,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Transactional(rollbackFor = Exception.class) 
														 | 
														
														 | 
														
															     @Transactional(rollbackFor = Exception.class) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public void createCourseSchedules(CreateCourseScheduleDto createCourseScheduleDto) { 
														 | 
														
														 | 
														
															     public void createCourseSchedules(CreateCourseScheduleDto createCourseScheduleDto) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<CourseSchedule> courseSchedules = createCourseScheduleDto.getCourseSchedules(); 
														 | 
														
														 | 
														
															         List<CourseSchedule> courseSchedules = createCourseScheduleDto.getCourseSchedules(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //添加课程计划 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        batchAddCourseSchedule(courseSchedules); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //更新课次 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        List<Integer> classGroupIds = courseSchedules.stream().map(CourseSchedule::getClassGroupId).collect(Collectors.toList()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        classGroupService.batchUpdateClassCourseTimes(classGroupIds); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //创建学生单节课的缴费记录,乐团课的缴费为0 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        courseScheduleStudentPaymentService.createCourseScheduleStudentPaymentByCourseSchedules(courseSchedules); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(!CollectionUtils.isEmpty(courseSchedules)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //添加课程计划 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            batchAddCourseSchedule(courseSchedules); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //更新课次 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            List<Integer> classGroupIds = courseSchedules.stream().map(CourseSchedule::getClassGroupId).collect(Collectors.toList()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            classGroupService.batchUpdateClassCourseTimes(classGroupIds); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //创建学生单节课的缴费记录,乐团课的缴费为0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            courseScheduleStudentPaymentService.createCourseScheduleStudentPaymentByCourseSchedules(courseSchedules); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         MusicGroup musicGroup = musicGroupService.get(createCourseScheduleDto.getMusicGroupID()); 
														 | 
														
														 | 
														
															         MusicGroup musicGroup = musicGroupService.get(createCourseScheduleDto.getMusicGroupID()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -993,9 +1003,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if (vipGroupCourseAdjustInfo.isHoliday()) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            holidayDays = holiday.get(calendar.get(Calendar.YEAR)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (vipGroupCourseAdjustInfo.isHoliday()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                holidayDays = holiday.get(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } catch (DecodeException e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LOGGER.error("节假日解析错误"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            vipGroupCourseAdjustInfo.setHoliday(false); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         while (true) { 
														 | 
														
														 | 
														
															         while (true) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1079,6 +1094,59 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Override 
														 | 
														
														 | 
														
															     @Override 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Transactional(rollbackFor = Exception.class) 
														 | 
														
														 | 
														
															     @Transactional(rollbackFor = Exception.class) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public void coursePostpone(CoursePostponeDto coursePostPoneInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(StringUtils.isBlank(coursePostPoneInfo.getClassGroupIds())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            throw new BizException("请指定班级"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(Objects.isNull(coursePostPoneInfo.getPauseDate())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            throw new BizException("请指定课程暂停时间"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(Objects.isNull(coursePostPoneInfo.getRecoveryDate())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            throw new BizException("请指定课程恢复时间"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        //间隔天数 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        int betweenDays = DateUtil.daysBetween(coursePostPoneInfo.getPauseDate(), coursePostPoneInfo.getRecoveryDate()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<CourseSchedule> classGroupCourseSchedulesWithDate = courseScheduleDao.findClassGroupCourseSchedulesWithDate(coursePostPoneInfo.getClassGroupIds(), coursePostPoneInfo.getPauseDate()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(CollectionUtils.isEmpty(classGroupCourseSchedulesWithDate)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            throw new BizException("选择的班级上在指定日期之后不存在需要调整的课程"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Calendar calendar = Calendar.getInstance(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        calendar.setTime(coursePostPoneInfo.getRecoveryDate()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        classGroupCourseSchedulesWithDate.sort(Comparator.comparing(CourseSchedule::getStartClassTime)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        for (int i=0;i<classGroupCourseSchedulesWithDate.size();i++) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            CourseSchedule courseSchedule=classGroupCourseSchedulesWithDate.get(i); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            calendar.setTime(courseSchedule.getClassDate()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            calendar.add(Calendar.DATE, betweenDays); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (coursePostPoneInfo.isSkipHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    holidayDays = holiday.get(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } catch (Exception e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                LOGGER.error("节假日解析错误"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                coursePostPoneInfo.setSkipHoliday(false); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (coursePostPoneInfo.isSkipHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                betweenDays=betweenDays+7; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                calendar.add(Calendar.DATE, betweenDays); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                i=i-1; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            classGroupCourseSchedulesWithDate.get(i).setClassDate(calendar.getTime()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        checkNewCourseSchedules(classGroupCourseSchedulesWithDate,false); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        courseScheduleDao.batchUpdate(classGroupCourseSchedulesWithDate); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Override 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Transactional(rollbackFor = Exception.class) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public void batchAppendVipGroupCourses(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo) { 
														 | 
														
														 | 
														
															     public void batchAppendVipGroupCourses(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (Objects.isNull(vipGroupCourseAdjustInfo.getVipGroupId())) { 
														 | 
														
														 | 
														
															         if (Objects.isNull(vipGroupCourseAdjustInfo.getVipGroupId())) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             throw new BizException("请指定小课"); 
														 | 
														
														 | 
														
															             throw new BizException("请指定小课"); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1122,7 +1190,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         try { 
														 | 
														
														 | 
														
															         try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (vipGroupCourseAdjustInfo.isHoliday()) { 
														 | 
														
														 | 
														
															             if (vipGroupCourseAdjustInfo.isHoliday()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
														
														 | 
														
															                 holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1130,7 +1198,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } catch (DecodeException e) { 
														 | 
														
														 | 
														
															         } catch (DecodeException e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             LOGGER.error("节假日解析错误"); 
														 | 
														
														 | 
														
															             LOGGER.error("节假日解析错误"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        } finally { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             vipGroupCourseAdjustInfo.setHoliday(false); 
														 | 
														
														 | 
														
															             vipGroupCourseAdjustInfo.setHoliday(false); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1215,19 +1282,13 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (Objects.nonNull(isSettlement) && isSettlement > 0) { 
														 | 
														
														 | 
														
															             if (Objects.nonNull(isSettlement) && isSettlement > 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 throw new BizException("调整的课程中存在已结算的课程"); 
														 | 
														
														 | 
														
															                 throw new BizException("调整的课程中存在已结算的课程"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            CourseSchedule oldCourseSchedule = null; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            List<CourseSchedule> oldCourseSchedules = oldCourseScheduleMap.get(newCourseSchedule.getId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            oldCourseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime).reversed()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            CourseSchedule oldCourseSchedule = oldCourseSchedules.get(0); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (Objects.isNull(newCourseSchedule.getActualTeacherId())) { 
														 | 
														
														 | 
														
															             if (Objects.isNull(newCourseSchedule.getActualTeacherId())) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                List<CourseSchedule> oldCourseSchedules = oldCourseScheduleMap.get(newCourseSchedule.getId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                oldCourseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime).reversed()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                oldCourseSchedule = oldCourseSchedules.get(0); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 newCourseSchedule.setActualTeacherId(oldCourseSchedule.getActualTeacherId()); 
														 | 
														
														 | 
														
															                 newCourseSchedule.setActualTeacherId(oldCourseSchedule.getActualTeacherId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (Objects.isNull(newCourseSchedule.getSchoolId())) { 
														 | 
														
														 | 
														
															             if (Objects.isNull(newCourseSchedule.getSchoolId())) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                if (Objects.isNull(oldCourseSchedule)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    List<CourseSchedule> oldCourseSchedules = oldCourseScheduleMap.get(newCourseSchedule.getId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    oldCourseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime).reversed()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    oldCourseSchedule = oldCourseSchedules.get(0); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 newCourseSchedule.setSchoolId(oldCourseSchedule.getSchoolId()); 
														 | 
														
														 | 
														
															                 newCourseSchedule.setSchoolId(oldCourseSchedule.getSchoolId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (oldCourseSchedule.getType().equals(CourseSchedule.CourseScheduleType.VIP)) { 
														 | 
														
														 | 
														
															             if (oldCourseSchedule.getType().equals(CourseSchedule.CourseScheduleType.VIP)) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2029,10 +2090,15 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<String, Integer> holidayDays = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
														
														 | 
														
															         Map<Integer, Map<String, Integer>> holiday = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if (courseGenerateInfo.isSkipHoliday()) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            holidayDays = holiday.get(calendar.get(Calendar.YEAR)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (courseGenerateInfo.isSkipHoliday()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                holidayDays = holiday.get(calendar.get(Calendar.YEAR)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } catch (DecodeException e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LOGGER.error("节假日解析错误"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            courseGenerateInfo.setSkipHoliday(false); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<CourseSchedule> courseSchedules = new ArrayList<>(); 
														 | 
														
														 | 
														
															         List<CourseSchedule> courseSchedules = new ArrayList<>(); 
														 |