|  | @@ -248,7 +248,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |  	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -	public boolean batchAddCourseSchedule(Integer classGroupId, int coursesTimes, Date startDate, List<CourseTimeDto> teachingArrangementList,
 | 
	
		
			
				|  |  | +	public boolean batchAddCourseSchedule(Integer classGroupId, int coursesTimes, Date startDate, Date endDate, List<CourseTimeDto> teachingArrangementList,
 | 
	
		
			
				|  |  |  			TeachModeEnum teachMode, CourseScheduleType type, Integer schoolId, boolean isJumpHoliday) {
 | 
	
		
			
				|  |  |  		ClassGroup classGroup = classGroupService.get(classGroupId);
 | 
	
		
			
				|  |  |  		if (classGroup == null) {
 | 
	
	
		
			
				|  | @@ -418,6 +418,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  					} else {
 | 
	
		
			
				|  |  |  						courseSchedule.setName(type.getMsg());
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  | +					
 | 
	
		
			
				|  |  | +					// 判断课程时间是否超过排课结束时间
 | 
	
		
			
				|  |  | +					if (endDate != null) {
 | 
	
		
			
				|  |  | +						if (calendar.getTime().after(endDate)) {
 | 
	
		
			
				|  |  | +							throw new BizException("排课时间超出排课截止日期({})", endDate);
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					
 | 
	
		
			
				|  |  |  					courseScheduleDao.insert(courseSchedule);
 | 
	
		
			
				|  |  |  					courseScheduleList.add(courseSchedule);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -430,7 +438,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  						courseScheduleTeacherSalary.setTeacherRole(cgtm.getTeacherRole());
 | 
	
		
			
				|  |  |  						courseScheduleTeacherSalary.setUserId(cgtm.getUserId());
 | 
	
		
			
				|  |  |  						if (type == CourseScheduleType.PRACTICE) {
 | 
	
		
			
				|  |  | -							courseScheduleTeacherSalary.setExpectSalary(teacherPracticeSalaryMap.get(cgtm.getUserId()));
 | 
	
		
			
				|  |  | +							BigDecimal salary = teacherPracticeSalaryMap.get(cgtm.getUserId());
 | 
	
		
			
				|  |  | +							if (salary == null) {
 | 
	
		
			
				|  |  | +								throw new BizException("请设置老师陪练课课酬");
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +							courseScheduleTeacherSalary.setExpectSalary(teacherPracticeSalaryMap.get(salary));
 | 
	
		
			
				|  |  |  						} else if (type == CourseScheduleType.VIP) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  						} else {
 | 
	
	
		
			
				|  | @@ -572,12 +584,22 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		Integer classGroupId = classGroupList.get(0);
 | 
	
		
			
				|  |  | +		String musicGroupId = courseScheduleList.get(0).getMusicGroupId();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		// 批量上课
 | 
	
		
			
				|  |  |  		batchDeleteCourseSchedules(batchInsertCoursesDto.getCourseScheduleIdList());
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		Date endDate = null;
 | 
	
		
			
				|  |  | +		if(batchInsertCoursesDto.getType() == CourseScheduleType.PRACTICE){
 | 
	
		
			
				|  |  | +			PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(musicGroupId));
 | 
	
		
			
				|  |  | +			if(practiceGroup == null){
 | 
	
		
			
				|  |  | +				throw new BizException("找不到课程组[{}]信息",musicGroupId);
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			endDate = practiceGroup.getCoursesExpireDate();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		// 批量加课
 | 
	
		
			
				|  |  | -		batchAddCourseSchedule(classGroupId, batchInsertCoursesDto.getCourseScheduleIdList().size(), batchInsertCoursesDto.getStartDate(),
 | 
	
		
			
				|  |  | +		batchAddCourseSchedule(classGroupId, batchInsertCoursesDto.getCourseScheduleIdList().size(), batchInsertCoursesDto.getStartDate(), endDate,
 | 
	
		
			
				|  |  |  				batchInsertCoursesDto.getTeachingArrangementList(), batchInsertCoursesDto.getTeachMode(), batchInsertCoursesDto.getType(),
 | 
	
		
			
				|  |  |  				batchInsertCoursesDto.getSchoolId(), batchInsertCoursesDto.getIsJumpHoliday());
 | 
	
		
			
				|  |  |  		return true;
 |