|
@@ -266,8 +266,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
MusicGroup musicGroup = musicGroupDao.get(highClassGroupList.get(0).getMusicGroupId());
|
|
|
|
|
|
int highClassGroupNum = studentRegistrationDao.findMusicGroupStudentNum(musicGroup.getId()) / 5;
|
|
|
- if(highClassGroupList.size() > highClassGroupNum){
|
|
|
- throw new BizException("班数不能大于"+highClassGroupNum);
|
|
|
+ if (highClassGroupList.size() > highClassGroupNum) {
|
|
|
+ throw new BizException("班数不能大于" + highClassGroupNum);
|
|
|
}
|
|
|
|
|
|
List<ClassGroup> classGroups = classGroupDao.findClassGroupByMusicGroupIdAndType(musicGroup.getId(), ClassGroupTypeEnum.HIGH);
|
|
@@ -832,9 +832,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
ClassGroup classGroup = classGorupIdMap.get(teacherClassGroupDto.getClassGroupId().intValue());
|
|
|
|
|
|
- teacherClassGroupDto.setSurplusClassTimes(classGroup.getTotalClassTimes()-classGroup.getCurrentClassTimes());
|
|
|
- Long studentNum=classGroupStudentNumMap.get(teacherClassGroupDto.getClassGroupId().intValue());
|
|
|
- teacherClassGroupDto.setStudentNum(Objects.isNull(studentNum)?0:studentNum.intValue());
|
|
|
+ teacherClassGroupDto.setSurplusClassTimes(classGroup.getTotalClassTimes() - classGroup.getCurrentClassTimes());
|
|
|
+ Long studentNum = classGroupStudentNumMap.get(teacherClassGroupDto.getClassGroupId().intValue());
|
|
|
+ teacherClassGroupDto.setStudentNum(Objects.isNull(studentNum) ? 0 : studentNum.intValue());
|
|
|
|
|
|
String subjectIdList = teacherClassGroupDto.getSubjectIdList();
|
|
|
if (StringUtils.isNotEmpty(subjectIdList)) {
|
|
@@ -1132,29 +1132,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
//老师结算表
|
|
|
courseScheduleTeacherSalaryService.batchInsert(courseScheduleTeacherSalaryList);
|
|
|
|
|
|
- //加入合奏班
|
|
|
- ClassGroupRelation classGroupRelation = new ClassGroupRelation();
|
|
|
- classGroupRelation.setClassGroupId(classGroup4MixDto.getMixClassGroupId());
|
|
|
- classGroupRelation.setSubClassGroupId(classGroup.getId());
|
|
|
- classGroupRelation.setCreateTime(date);
|
|
|
- classGroupRelationService.insert(classGroupRelation);
|
|
|
-
|
|
|
- //6、添加学生未上合奏课课程
|
|
|
- List<CourseSchedule> noStartCourses = courseScheduleDao.findNoStartCoursesByClassGroupId(classGroup4MixDto.getMixClassGroupId());
|
|
|
- for (CourseSchedule noStartCourse : noStartCourses) {
|
|
|
- for (StudentRegistration studentRegistration : studentList) {
|
|
|
- CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
|
|
|
- courseScheduleStudentPayment.setCourseScheduleId(noStartCourse.getId());
|
|
|
- courseScheduleStudentPayment.setUserId(studentRegistration.getUserId());
|
|
|
- courseScheduleStudentPayment.setExpectPrice(expectPrice);
|
|
|
- courseScheduleStudentPayment.setCreateTime(date);
|
|
|
- courseScheduleStudentPayment.setUpdateTime(date);
|
|
|
- courseScheduleStudentPayment.setClassGroupId(noStartCourse.getClassGroupId());
|
|
|
- courseScheduleStudentPayment.setMusicGroupId(classGroup.getMusicGroupId());
|
|
|
- courseScheduleStudentPayment.setGroupType(classGroup.getGroupType());
|
|
|
- courseScheduleStudentPaymentList.add(courseScheduleStudentPayment);
|
|
|
- }
|
|
|
- }
|
|
|
//学生结算表
|
|
|
courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPaymentList);
|
|
|
return classGroup;
|
|
@@ -1633,15 +1610,15 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
e.setMixClassGroupName(classGroupNames.get(e.getMixClassGroupId()));
|
|
|
List<CourseScheduleTeacherSalary> currentBishopTeacher = courseScheduleBishopTeacherMaps.get(e.getCourseScheduleId().longValue());
|
|
|
List<CourseScheduleTeacherSalary> TeachingTeachers = new ArrayList<>();
|
|
|
- if (!Objects.isNull(currentBishopTeacher)&&!CollectionUtils.isEmpty(currentBishopTeacher)) {
|
|
|
+ if (!Objects.isNull(currentBishopTeacher) && !CollectionUtils.isEmpty(currentBishopTeacher)) {
|
|
|
e.setMasterTeacherId(currentBishopTeacher.get(0).getUserId());
|
|
|
e.setMasterTeacherName(currentBishopTeacher.get(0).getUserName());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
currentBishopTeacher = new ArrayList<>();
|
|
|
}
|
|
|
TeachingTeachers.addAll(currentBishopTeacher);
|
|
|
List<CourseScheduleTeacherSalary> currentCourseTeachingTeachers = courseScheduleTeachingTeacherMaps.get(e.getCourseScheduleId().longValue());
|
|
|
- if(Objects.isNull(currentCourseTeachingTeachers) || CollectionUtils.isEmpty(currentCourseTeachingTeachers)){
|
|
|
+ if (Objects.isNull(currentCourseTeachingTeachers) || CollectionUtils.isEmpty(currentCourseTeachingTeachers)) {
|
|
|
currentCourseTeachingTeachers = new ArrayList<>();
|
|
|
}
|
|
|
TeachingTeachers.addAll(currentCourseTeachingTeachers);
|
|
@@ -1784,7 +1761,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
@Override
|
|
|
public Boolean checkSetSalary(String musicGroupId) {
|
|
|
List<CourseScheduleTeacherSalary> courseScheduleTeacherSalary = courseScheduleTeacherSalaryDao.findCourseScheduleTeacherSalaryByMusicGroupId(musicGroupId, GroupType.MUSIC);
|
|
|
- if(courseScheduleTeacherSalary != null && courseScheduleTeacherSalary.size() > 0){
|
|
|
+ if (courseScheduleTeacherSalary != null && courseScheduleTeacherSalary.size() > 0) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|