|  | @@ -2825,6 +2825,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  			return BaseController.succeed();
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +		List<CourseScheduleTeacherSalary> oldCourseScheduleTeacherSalaryList = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseAdjustInfo.getCourseScheduleIds());
 | 
	
		
			
				|  |  | +		Map<Long, List<CourseScheduleTeacherSalary>> courseSalaryListMap = new HashMap<>();
 | 
	
		
			
				|  |  | +		if(!CollectionUtils.isEmpty(oldCourseScheduleTeacherSalaryList)){
 | 
	
		
			
				|  |  | +			courseSalaryListMap = oldCourseScheduleTeacherSalaryList.stream().collect(Collectors.groupingBy(CourseScheduleTeacherSalary::getCourseScheduleId));
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		//需要变更课酬的教师类型
 | 
	
		
			
				|  |  |  		Set<TeachTypeEnum> changeSalaryTeachTypes = new HashSet<>();
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2837,12 +2843,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  			courseScheduleTeacherSalaryDao.deleteWithCourseAndTeachRole(courseAdjustInfo.getCourseScheduleIds(), TeachTypeEnum.TEACHING);
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		List<CourseScheduleTeacherSalary> oldCourseScheduleTeacherSalaryList = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseAdjustInfo.getCourseScheduleIds());
 | 
	
		
			
				|  |  | -		Map<Long, List<CourseScheduleTeacherSalary>> courseSalaryListMap = new HashMap<>();
 | 
	
		
			
				|  |  | -		if(!CollectionUtils.isEmpty(oldCourseScheduleTeacherSalaryList)){
 | 
	
		
			
				|  |  | -			courseSalaryListMap = oldCourseScheduleTeacherSalaryList.stream().collect(Collectors.groupingBy(CourseScheduleTeacherSalary::getCourseScheduleId));
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  		if(CollectionUtils.isEmpty(courseAdjustInfo.getClassGroupTeacherMapperList())){
 | 
	
		
			
				|  |  |  			courseAdjustInfo.setClassGroupTeacherMapperList(Collections.EMPTY_LIST);
 | 
	
		
			
				|  |  |  		}
 | 
	
	
		
			
				|  | @@ -2858,7 +2858,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		//上课日期变更
 | 
	
		
			
				|  |  |  		//间隔天数
 | 
	
		
			
				|  |  | -		int betweenDays = 0;
 | 
	
		
			
				|  |  | +		int betweenDays = 0, initBetweenDays = 0;
 | 
	
		
			
				|  |  |  		//节假日
 | 
	
		
			
				|  |  |  		Set<String> holidayDays = new HashSet<>();
 | 
	
		
			
				|  |  |  		if(Objects.nonNull(courseAdjustInfo.getPauseDate())&&Objects.nonNull(courseAdjustInfo.getRecoveryDate())){
 | 
	
	
		
			
				|  | @@ -2873,6 +2873,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  			LocalDate recoveryDate = LocalDate.parse(courseAdjustInfo.getRecoveryDate(), DateUtil.dateFormatter);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			betweenDays = (int) (recoveryDate.toEpochDay()-pauseDate.toEpochDay());
 | 
	
		
			
				|  |  | +			initBetweenDays = betweenDays;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		//上课时间变更
 | 
	
	
		
			
				|  | @@ -2894,11 +2895,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  				throw new BizException("选择的课程中存在进行中或已结束的课程,无法进行调整");
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			//上课日期变更
 | 
	
		
			
				|  |  | -			if(betweenDays>0){
 | 
	
		
			
				|  |  | +			if(betweenDays!=0){
 | 
	
		
			
				|  |  |  				LocalDate classDate = LocalDateTime.ofInstant(oldCourses.get(i).getClassDate().toInstant(), DateUtil.zoneId).toLocalDate();
 | 
	
		
			
				|  |  |  				classDate = classDate.plusDays(betweenDays);
 | 
	
		
			
				|  |  |  				if (courseAdjustInfo.getHoliday() && holidayDays.contains(classDate.toString())) {
 | 
	
		
			
				|  |  | -					betweenDays=betweenDays+7;
 | 
	
		
			
				|  |  | +					betweenDays=betweenDays+initBetweenDays;
 | 
	
		
			
				|  |  |  					i=i-1;
 | 
	
		
			
				|  |  |  					continue;
 | 
	
		
			
				|  |  |  				}
 |