|  | @@ -76,6 +76,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private MusicGroupSchoolTermCourseDetailDao musicGroupSchoolTermCourseDetailDao;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	@Autowired
 | 
	
		
			
				|  |  | +	private MusicGroupSchoolTermStudentCourseDetailDao musicGroupSchoolTermStudentCourseDetailDao;
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	@Autowired
 | 
	
		
			
				|  |  |  	private IdGeneratorService idGeneratorService;
 | 
	
	
		
			
				|  | @@ -960,11 +963,26 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 | 
	
		
			
				|  |  |  					totalPrice = totalPrice.add(musicGroupPaymentCalenderCourseSettings.getCourseCurrentPrice());
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | +			//当前乐团是否有预排课计划
 | 
	
		
			
				|  |  | +			MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.findByCourseDateAndMusicGroupId(musicGroup.getId(), null, 0);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			List<MusicGroupPaymentStudentCourseDetail> musicGroupPaymentStudentCourseDetailList = new ArrayList<MusicGroupPaymentStudentCourseDetail>();
 | 
	
		
			
				|  |  |  			MusicGroupPaymentStudentCourseDetail musicGroupPaymentStudentCourseDetail = null;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			for (String studentId : studentIdStr.split(",")) {
 | 
	
		
			
				|  |  | +				if(termCourseDetail != null){
 | 
	
		
			
				|  |  | +					//是否已经预排部分课程
 | 
	
		
			
				|  |  | +					List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByMusicGroupId(musicGroup.getId());
 | 
	
		
			
				|  |  | +					if(courseSchedules.size() > 0){
 | 
	
		
			
				|  |  | +						throw new BizException("操作失败:该乐团存在预排课课程,请优先完成预排课");
 | 
	
		
			
				|  |  | +					}else {
 | 
	
		
			
				|  |  | +						MusicGroupSchoolTermStudentCourseDetail studentCourseDetail = new MusicGroupSchoolTermStudentCourseDetail();
 | 
	
		
			
				|  |  | +						studentCourseDetail.setMusicGroupSchoolTermCourseDetailId(termCourseDetail.getId());
 | 
	
		
			
				|  |  | +						studentCourseDetail.setUserId(Integer.parseInt(studentId));
 | 
	
		
			
				|  |  | +						studentCourseDetail.setMemberCourseMinutes(termCourseDetail.getTotalCourseTime());
 | 
	
		
			
				|  |  | +						musicGroupSchoolTermStudentCourseDetailDao.insert(studentCourseDetail);
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |  				// 学生加到calenderDetail
 | 
	
		
			
				|  |  |  				MusicGroupPaymentCalenderDetail musicGroupPaymentCalenderDetail = new MusicGroupPaymentCalenderDetail();
 | 
	
		
			
				|  |  |  				musicGroupPaymentCalenderDetail.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
 |