| 
					
				 | 
			
			
				@@ -52,6 +52,7 @@ import com.ym.mec.biz.dal.dao.SysConfigDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dao.TeacherAttendanceDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dao.TeacherDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dao.TeacherDefaultMusicGroupSalaryDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.dal.dao.TeacherDefaultPracticeGroupSalaryDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dao.TeacherDefaultVipGroupSalaryDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dao.VipGroupDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.dto.ClassDateAdjustDto; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -90,6 +91,7 @@ import com.ym.mec.biz.dal.entity.SysConfig; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.Teacher; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.TeacherAttendance; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.dal.entity.TeacherDefaultPracticeGroupSalary; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.entity.VipGroup; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.enums.AuditStatusEnum; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -112,6 +114,7 @@ import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.dal.page.VipGroupQueryInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.ClassGroupService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.ClassGroupTeacherMapperService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ym.mec.biz.service.CourseHomeworkService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.CourseScheduleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.CourseScheduleStudentPaymentService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -151,6 +154,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private StudentAttendanceDao studentAttendanceDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ClassGroupStudentMapperDao classGroupStudentMapperDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private TeacherDefaultPracticeGroupSalaryDao teacherDefaultPracticeGroupSalaryDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private SysMessageService sysMessageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -189,6 +196,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private MusicGroupService musicGroupService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private SysConfigService sysConfigService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private CourseHomeworkService courseHomeworkService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private GroupDao groupDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1786,6 +1797,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Date entryDate = DateUtil.stringToDate(sysConfigDao.findByParamName(SysConfigService.TEACHER_ENTRY_DATE).getParanValue(), "yyyy-MM-dd"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		List<CourseScheduleModifyLog> insertCourseScheduleModifyLogList = new ArrayList<CourseScheduleModifyLog>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		List<CourseScheduleStudentPayment> insertCourseScheduleStudentPaymentList = new ArrayList<CourseScheduleStudentPayment>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		for (CourseSchedule newCourseSchedule : newCourseSchedules) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			courseScheduleId = newCourseSchedule.getId(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1817,9 +1830,33 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			//如果已结束修改成了未开始,需要更新学生考勤记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			if ((newCourseSchedule.getStatus() != oldCourseSchedule.getStatus() && newCourseSchedule.getStatus() == CourseStatusEnum.NOT_START)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				//如果已结束修改成了未开始,需要更新学生考勤记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				studentAttendanceDao.deleteStudentAttendancesByCourse(courseScheduleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if(newCourseSchedule.getGroupType() == GroupType.MUSIC){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					//查询新生(之前排课没有这个人,后来新进来的学生) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					List<ClassGroupStudentMapper> newStudentList = classGroupStudentMapperDao.queryNewStudentListByCourseScheduleId(courseScheduleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					if(newStudentList.size() > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						//生成courseScheduleStudentPayment记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						for(ClassGroupStudentMapper cgsm : newStudentList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							CourseScheduleStudentPayment sp = new CourseScheduleStudentPayment(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setClassGroupId(newCourseSchedule.getClassGroupId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setCourseScheduleId(courseScheduleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setCreateTime(date); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setExpectPrice(new BigDecimal(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setGroupType(GroupType.MUSIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setMusicGroupId(newCourseSchedule.getMusicGroupId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setUpdateTime(date); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							sp.setUserId(cgsm.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							insertCourseScheduleStudentPaymentList.add(sp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					//清理课程作业 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					courseHomeworkService.delHomwworkByCourseScheduleId(courseScheduleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// 计算课程时长 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1928,7 +1965,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					} else if (newCourseSchedule.getGroupType() == GroupType.PRACTICE) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						ts.setExpectSalary(new BigDecimal(30)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaryList = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						if (teacherDefaultPracticeGroupSalaryList != null && teacherDefaultPracticeGroupSalaryList.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							ts.setExpectSalary(teacherDefaultPracticeGroupSalaryList.get(0).getMainTeacherSalary()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							ts.setExpectSalary(new BigDecimal(30)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					insertCourseScheduleTeacherSalaryList.add(ts); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1966,6 +2008,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if(newCourseSchedules.size() > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			courseScheduleDao.batchUpdate(newCourseSchedules); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if(insertCourseScheduleStudentPaymentList.size() > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			courseScheduleStudentPaymentDao.batchInsert(insertCourseScheduleStudentPaymentList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 推送 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		try { 
			 |