|
@@ -47,6 +47,7 @@ import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
+import static com.ym.mec.biz.dal.enums.GroupType.PRACTICE;
|
|
|
import static com.ym.mec.biz.dal.enums.PracticeGroupType.*;
|
|
|
import static com.ym.mec.biz.dal.enums.SignInStatusEnum.*;
|
|
|
|
|
@@ -2040,7 +2041,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
checkNewCourseSchedules(courseSchedules, false);
|
|
|
//如果是陪练课,调整时间不允许超过有效期
|
|
|
- if(groupType == GroupType.PRACTICE){
|
|
|
+ if(groupType == PRACTICE){
|
|
|
for (CourseSchedule e:courseSchedules) {
|
|
|
//已点名的不允许调整
|
|
|
List<StudentAttendance> studentAttendances = studentAttendanceDao.findByCourseId(e.getId());
|
|
@@ -2658,7 +2659,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
ts.setExpectSalary(oldTS.getExpectSalary());
|
|
|
}
|
|
|
}
|
|
|
- } else if (newCourseSchedule.getGroupType() == GroupType.PRACTICE) {
|
|
|
+ } else if (newCourseSchedule.getGroupType() == PRACTICE) {
|
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaryList = teacherDefaultPracticeGroupSalaryDao
|
|
|
.queryByUserId(teacherId);
|
|
|
if (teacherDefaultPracticeGroupSalaryList != null && teacherDefaultPracticeGroupSalaryList.size() > 0) {
|
|
@@ -3713,7 +3714,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(Objects.isNull(oldCourseSchedule)){
|
|
|
throw new BizException("课程不存在");
|
|
|
}
|
|
|
- if(!oldCourseSchedule.getGroupType().equals(GroupType.PRACTICE)){
|
|
|
+ if(!oldCourseSchedule.getGroupType().equals(PRACTICE)){
|
|
|
throw new BizException("请选择网管课");
|
|
|
}
|
|
|
//已点名的不允许调整
|
|
@@ -3787,6 +3788,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
courseScheduleComplaintsDao.delByCourseScheduleId(courseScheduleId);
|
|
|
courseScheduleDao.update(oldCourseSchedule);
|
|
|
courseScheduleModifyLogDao.insert(scheduleModifyLog);
|
|
|
+ if(practiceGroup.getType() == TRIAL){
|
|
|
+ practiceGroup.setCoursesStartDate(courseScheduleDao.getFirstTime(practiceGroup.getId(),PRACTICE.getCode()));
|
|
|
+ practiceGroup.setCoursesExpireDate(courseScheduleDao.getLastTime(practiceGroup.getId(),PRACTICE.getCode()));
|
|
|
+ practiceGroup.setUpdateTime(date);
|
|
|
+ practiceGroupDao.update(practiceGroup);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -3806,7 +3813,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(Objects.isNull(oldCourseSchedule)){
|
|
|
throw new BizException("调整失败: 课程已结束");
|
|
|
}
|
|
|
- if(!oldCourseSchedule.getGroupType().equals(GroupType.PRACTICE)){
|
|
|
+ if(!oldCourseSchedule.getGroupType().equals(PRACTICE)){
|
|
|
throw new BizException("请选择网管课");
|
|
|
}
|
|
|
if(teacherId.equals(oldCourseSchedule.getActualTeacherId())){
|
|
@@ -3876,12 +3883,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(Objects.isNull(teacherId)){
|
|
|
throw new BizException("请指定上课老师");
|
|
|
}
|
|
|
- List<CourseSchedule> courseSchedules = courseScheduleDao.findSurplusCourseWithGroup(GroupType.PRACTICE,practiceGroupId);
|
|
|
+ List<CourseSchedule> courseSchedules = courseScheduleDao.findSurplusCourseWithGroup(PRACTICE,practiceGroupId);
|
|
|
if(courseSchedules != null && courseSchedules.size() > 0){
|
|
|
courseSchedules = courseSchedules.stream().filter(courseSchedule -> !courseSchedule.getActualTeacherId().equals(teacherId)).collect(Collectors.toList());
|
|
|
}
|
|
|
PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(practiceGroupId));
|
|
|
- ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(practiceGroupId, GroupType.PRACTICE.getCode());
|
|
|
+ ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(practiceGroupId, PRACTICE.getCode());
|
|
|
if(Objects.nonNull(educationalTeacherId)&&!educationalTeacherId.equals(practiceGroup.getEducationalTeacherId())){
|
|
|
if(Objects.nonNull(practiceGroup.getEducationalTeacherId())){
|
|
|
ImGroupMember[] imGroupMembers = new ImGroupMember[]{new ImGroupMember(practiceGroup.getEducationalTeacherId().toString())};
|
|
@@ -3903,11 +3910,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
classGroup.setName(groupName);
|
|
|
classGroup.setSubjectIdList(subjectId.toString());
|
|
|
classGroupDao.update(classGroup);
|
|
|
- courseScheduleDao.updateCourseNameByGroup(practiceGroupId,GroupType.PRACTICE,groupName);
|
|
|
+ courseScheduleDao.updateCourseNameByGroup(practiceGroupId, PRACTICE,groupName);
|
|
|
}
|
|
|
practiceGroupDao.update(practiceGroup);
|
|
|
- classGroupTeacherMapperService.updateTeacher(practiceGroupId,teacherId,GroupType.PRACTICE.getCode());
|
|
|
- classGroupTeacherSalaryDao.updateTeacher(practiceGroupId,teacherId,GroupType.PRACTICE.getCode());
|
|
|
+ classGroupTeacherMapperService.updateTeacher(practiceGroupId,teacherId, PRACTICE.getCode());
|
|
|
+ classGroupTeacherSalaryDao.updateTeacher(practiceGroupId,teacherId, PRACTICE.getCode());
|
|
|
practiceGroupDao.updateUserId(practiceGroupId,teacherId);
|
|
|
if(courseSchedules == null || courseSchedules.size() == 0){
|
|
|
return;
|
|
@@ -3941,7 +3948,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
|
|
|
}else{
|
|
|
- List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(practiceGroupId, GroupType.PRACTICE);
|
|
|
+ List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(practiceGroupId, PRACTICE);
|
|
|
if(!CollectionUtils.isEmpty(groupNotStartCourses)){
|
|
|
SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
|
|
|
BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
|