|
@@ -206,7 +206,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
}
|
|
}
|
|
List<ClassGroupTeacherMapper> teacherMappers = classGroup.getTeacherMapperList();
|
|
List<ClassGroupTeacherMapper> teacherMappers = classGroup.getTeacherMapperList();
|
|
Set<Integer> collect = teacherMappers.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
Set<Integer> collect = teacherMappers.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
- if(teacherMappers.size() != collect.size()){
|
|
|
|
|
|
+ if (teacherMappers.size() != collect.size()) {
|
|
throw new BizException("主教与助教存在冲突");
|
|
throw new BizException("主教与助教存在冲突");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -282,16 +282,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
} else {
|
|
} else {
|
|
MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
|
|
MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
|
|
Map<Integer, String> userRoleMap = new HashMap<>();
|
|
Map<Integer, String> userRoleMap = new HashMap<>();
|
|
- if(musicGroup.getEducationalTeacherId() != null){
|
|
|
|
|
|
+ if (musicGroup.getEducationalTeacherId() != null) {
|
|
userRoleMap.put(musicGroup.getEducationalTeacherId(), "乐团主管");
|
|
userRoleMap.put(musicGroup.getEducationalTeacherId(), "乐团主管");
|
|
}
|
|
}
|
|
- if(musicGroup.getTeamTeacherId() != null){
|
|
|
|
|
|
+ if (musicGroup.getTeamTeacherId() != null) {
|
|
userRoleMap.put(musicGroup.getTeamTeacherId(), "运营主管");
|
|
userRoleMap.put(musicGroup.getTeamTeacherId(), "运营主管");
|
|
}
|
|
}
|
|
- if(musicGroup.getDirectorUserId() != null){
|
|
|
|
|
|
+ if (musicGroup.getDirectorUserId() != null) {
|
|
userRoleMap.put(musicGroup.getDirectorUserId(), "乐队指导");
|
|
userRoleMap.put(musicGroup.getDirectorUserId(), "乐队指导");
|
|
}
|
|
}
|
|
- if(musicGroup.getTransactionTeacherId() != null){
|
|
|
|
|
|
+ if (musicGroup.getTransactionTeacherId() != null) {
|
|
userRoleMap.put(musicGroup.getTransactionTeacherId(), "衔接老师");
|
|
userRoleMap.put(musicGroup.getTransactionTeacherId(), "衔接老师");
|
|
}
|
|
}
|
|
if (teacherIdList != null && teacherIdList.size() > 0) {
|
|
if (teacherIdList != null && teacherIdList.size() > 0) {
|
|
@@ -545,8 +545,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
if (highClassGroup.getHoliday()) {
|
|
if (highClassGroup.getHoliday()) {
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
- String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
|
|
|
|
- if(StringUtils.isNotBlank(holidaySetting)){
|
|
|
|
|
|
+ String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING, tenantId);
|
|
|
|
+ if (StringUtils.isNotBlank(holidaySetting)) {
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -629,7 +629,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
param.put("musicGroupId", e.getMusicGroupId());
|
|
param.put("musicGroupId", e.getMusicGroupId());
|
|
e.setAttendanceNum(teacherPersonalAttendancesCount);
|
|
e.setAttendanceNum(teacherPersonalAttendancesCount);
|
|
Long aLong = hasRestClassMap.get(Integer.parseInt(e.getClassGroupIds()));
|
|
Long aLong = hasRestClassMap.get(Integer.parseInt(e.getClassGroupIds()));
|
|
- if(aLong != null){
|
|
|
|
|
|
+ if (aLong != null) {
|
|
e.setHasRestClass(aLong.intValue());
|
|
e.setHasRestClass(aLong.intValue());
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1206,7 +1206,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Map<CourseScheduleType, BigDecimal> originUnitPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> originUnitPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalCurrentPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalCurrentPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalOriginPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalOriginPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
- if(musicGroupPaymentCalenderCourseSettingsList != null){
|
|
|
|
|
|
+ if (musicGroupPaymentCalenderCourseSettingsList != null) {
|
|
for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : musicGroupPaymentCalenderCourseSettingsList) {
|
|
for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : musicGroupPaymentCalenderCourseSettingsList) {
|
|
unitPriceMap.put(
|
|
unitPriceMap.put(
|
|
musicGroupPaymentCalenderCourseSettings.getCourseType(),
|
|
musicGroupPaymentCalenderCourseSettings.getCourseType(),
|
|
@@ -1244,9 +1244,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
List<CourseScheduleStudentPayment> totalCourseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
List<CourseScheduleStudentPayment> totalCourseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
|
|
|
|
|
|
- if(HIGH_ONLINE.equals(classGroup.getType())){
|
|
|
|
|
|
+ if (HIGH_ONLINE.equals(classGroup.getType())) {
|
|
Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
|
|
Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
|
|
- if(Objects.nonNull(studentNum)&&studentNum>=6){
|
|
|
|
|
|
+ if (Objects.nonNull(studentNum) && studentNum >= 6) {
|
|
throw new BizException("线上基础技能班班级最大人数为6人");
|
|
throw new BizException("线上基础技能班班级最大人数为6人");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1256,11 +1256,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
// 2、插入关联关系
|
|
// 2、插入关联关系
|
|
ClassGroupStudentMapper classGroupStudent = classGroupStudentMapperDao.findClassGroupStudent(classGroup.getId(), studentId);
|
|
ClassGroupStudentMapper classGroupStudent = classGroupStudentMapperDao.findClassGroupStudent(classGroup.getId(), studentId);
|
|
- if(Objects.nonNull(classGroupStudent)){
|
|
|
|
|
|
+ if (Objects.nonNull(classGroupStudent)) {
|
|
classGroupStudent.setStatus(ClassGroupStudentStatusEnum.NORMAL);
|
|
classGroupStudent.setStatus(ClassGroupStudentStatusEnum.NORMAL);
|
|
classGroupStudent.setUpdateTime(date);
|
|
classGroupStudent.setUpdateTime(date);
|
|
classGroupStudentMapperDao.update(classGroupStudent);
|
|
classGroupStudentMapperDao.update(classGroupStudent);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
ClassGroupStudentMapper classGroupStudentMapper = new ClassGroupStudentMapper();
|
|
ClassGroupStudentMapper classGroupStudentMapper = new ClassGroupStudentMapper();
|
|
classGroupStudentMapper.setMusicGroupId(classGroup.getMusicGroupId());
|
|
classGroupStudentMapper.setMusicGroupId(classGroup.getMusicGroupId());
|
|
classGroupStudentMapper.setClassGroupId(classGroup.getId());
|
|
classGroupStudentMapper.setClassGroupId(classGroup.getId());
|
|
@@ -1276,8 +1276,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Map<Integer, List<CourseSchedule>> memberCourseSchedule = courseScheduleList.stream().collect(Collectors.groupingBy(CourseSchedule::getMemberFlag));
|
|
Map<Integer, List<CourseSchedule>> memberCourseSchedule = courseScheduleList.stream().collect(Collectors.groupingBy(CourseSchedule::getMemberFlag));
|
|
for (Integer integer : memberCourseSchedule.keySet()) {
|
|
for (Integer integer : memberCourseSchedule.keySet()) {
|
|
List<CourseSchedule> courseSchedules = memberCourseSchedule.get(integer);
|
|
List<CourseSchedule> courseSchedules = memberCourseSchedule.get(integer);
|
|
- if(courseSchedules != null && courseSchedules.size() > 0){
|
|
|
|
- if(integer == 0){
|
|
|
|
|
|
+ if (courseSchedules != null && courseSchedules.size() > 0) {
|
|
|
|
+ if (integer == 0) {
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
if (existCourseIds.contains(courseSchedule.getId())) {
|
|
if (existCourseIds.contains(courseSchedule.getId())) {
|
|
throw new BizException("该学员已在此班级{}课程中", courseSchedule.getId());
|
|
throw new BizException("该学员已在此班级{}课程中", courseSchedule.getId());
|
|
@@ -1329,7 +1329,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<CourseScheduleType> list = new ArrayList<CourseSchedule.CourseScheduleType>();
|
|
List<CourseScheduleType> list = new ArrayList<CourseSchedule.CourseScheduleType>();
|
|
for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) {
|
|
for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) {
|
|
courseType = courseScheduleStudentPayment.getCourseSchedule().getType();
|
|
courseType = courseScheduleStudentPayment.getCourseSchedule().getType();
|
|
- if(totalCurrentPriceMap.get(courseType) == null){
|
|
|
|
|
|
+ if (totalCurrentPriceMap.get(courseType) == null) {
|
|
throw new BizException("该缴费项目有新增课时:请重新编辑");
|
|
throw new BizException("该缴费项目有新增课时:请重新编辑");
|
|
}
|
|
}
|
|
if (!list.contains(courseType)) {
|
|
if (!list.contains(courseType)) {
|
|
@@ -1344,7 +1344,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
if (existCourseIds.contains(courseSchedule.getId())) {
|
|
if (existCourseIds.contains(courseSchedule.getId())) {
|
|
throw new BizException("该学员已在此班级{}课程中", courseSchedule.getId());
|
|
throw new BizException("该学员已在此班级{}课程中", courseSchedule.getId());
|
|
@@ -1367,18 +1367,18 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(totalCourseScheduleStudentPayments.size() > 0 || courseScheduleStudentPayments.size() > 0){
|
|
|
|
|
|
+ if (totalCourseScheduleStudentPayments.size() > 0 || courseScheduleStudentPayments.size() > 0) {
|
|
totalCourseScheduleStudentPayments.addAll(courseScheduleStudentPayments);
|
|
totalCourseScheduleStudentPayments.addAll(courseScheduleStudentPayments);
|
|
courseScheduleStudentPaymentService.batchInsert(totalCourseScheduleStudentPayments);
|
|
courseScheduleStudentPaymentService.batchInsert(totalCourseScheduleStudentPayments);
|
|
studentService.updateStudentServiceTag(studentId, null, YesOrNoEnum.YES.getCode());
|
|
studentService.updateStudentServiceTag(studentId, null, YesOrNoEnum.YES.getCode());
|
|
}
|
|
}
|
|
|
|
|
|
- if(!CollectionUtils.isEmpty(courseScheduleList)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(courseScheduleList)) {
|
|
allNotStartCourses.addAll(courseScheduleList);
|
|
allNotStartCourses.addAll(courseScheduleList);
|
|
}
|
|
}
|
|
|
|
|
|
List<ClassGroupTeacherMapper> classGroupTeachers = classGroupTeacherMapperService.getClassGroupTeachers(classGroup.getId());
|
|
List<ClassGroupTeacherMapper> classGroupTeachers = classGroupTeacherMapperService.getClassGroupTeachers(classGroup.getId());
|
|
- if(!CollectionUtils.isEmpty(classGroupTeachers)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(classGroupTeachers)) {
|
|
ctm.put(classGroup.getId(), classGroupTeachers);
|
|
ctm.put(classGroup.getId(), classGroupTeachers);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1396,7 +1396,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
for (CourseScheduleTeacherSalary oldCourseSalary : oldCourseSalaries) {
|
|
for (CourseScheduleTeacherSalary oldCourseSalary : oldCourseSalaries) {
|
|
oldCourseSalary.setId(null);
|
|
oldCourseSalary.setId(null);
|
|
//课酬调整后不能更新课酬
|
|
//课酬调整后不能更新课酬
|
|
- if(!oldCourseSalary.getEnableChangeSalary()){
|
|
|
|
|
|
+ if (!oldCourseSalary.getEnableChangeSalary()) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
courseScheduleTeacherSalaryService.createMusicGroupCourseTeacherSalary(null, idCourseMap.get(oldCourseSalary.getCourseScheduleId()), oldCourseSalary);
|
|
courseScheduleTeacherSalaryService.createMusicGroupCourseTeacherSalary(null, idCourseMap.get(oldCourseSalary.getCourseScheduleId()), oldCourseSalary);
|
|
@@ -1431,7 +1431,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//删除班级未开始课程
|
|
//删除班级未开始课程
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
|
|
if (courseScheduleList.size() > 0) {
|
|
if (courseScheduleList.size() > 0) {
|
|
- if(courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId).size() > 0){
|
|
|
|
|
|
+ if (courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId).size() > 0) {
|
|
throw new BizException("操作失败:该班级存在预排课程");
|
|
throw new BizException("操作失败:该班级存在预排课程");
|
|
}
|
|
}
|
|
List<Long> courseScheduleIds = courseScheduleList.stream().map(courseSchedule -> courseSchedule.getId()).collect(Collectors.toList());
|
|
List<Long> courseScheduleIds = courseScheduleList.stream().map(courseSchedule -> courseSchedule.getId()).collect(Collectors.toList());
|
|
@@ -1457,7 +1457,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//删除班级未开始课程
|
|
//删除班级未开始课程
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
|
|
if (courseScheduleList.size() > 0) {
|
|
if (courseScheduleList.size() > 0) {
|
|
- if(courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId).size() > 0){
|
|
|
|
|
|
+ if (courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId).size() > 0) {
|
|
throw new BizException("操作失败:该班级存在预排课程");
|
|
throw new BizException("操作失败:该班级存在预排课程");
|
|
}
|
|
}
|
|
List<Long> courseScheduleIds = courseScheduleList.stream().map(courseSchedule -> courseSchedule.getId()).collect(Collectors.toList());
|
|
List<Long> courseScheduleIds = courseScheduleList.stream().map(courseSchedule -> courseSchedule.getId()).collect(Collectors.toList());
|
|
@@ -1692,8 +1692,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
TeacherClassHeadInfo teacherClassHeadInfo = new TeacherClassHeadInfo();
|
|
TeacherClassHeadInfo teacherClassHeadInfo = new TeacherClassHeadInfo();
|
|
//获取班级的线上、线下课数量
|
|
//获取班级的线上、线下课数量
|
|
- int onlineCourseNum = classGroupDao.countCourseNum(classGroupId,"ONLINE");
|
|
|
|
- int offlineCourseNum = classGroupDao.countCourseNum(classGroupId,"OFFLINE");
|
|
|
|
|
|
+ int onlineCourseNum = classGroupDao.countCourseNum(classGroupId, "ONLINE");
|
|
|
|
+ int offlineCourseNum = classGroupDao.countCourseNum(classGroupId, "OFFLINE");
|
|
|
|
|
|
if (onlineCourseNum > 0 && offlineCourseNum <= 0) {
|
|
if (onlineCourseNum > 0 && offlineCourseNum <= 0) {
|
|
teacherClassHeadInfo.setTeachMode("1");
|
|
teacherClassHeadInfo.setTeachMode("1");
|
|
@@ -1707,7 +1707,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
teacherClassHeadInfo.setStudentNum(classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId()));
|
|
teacherClassHeadInfo.setStudentNum(classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId()));
|
|
teacherClassHeadInfo.setCurrentClassTimes(courseScheduleDao.countCurrentTimes(classGroup.getId(), new Date()));
|
|
teacherClassHeadInfo.setCurrentClassTimes(courseScheduleDao.countCurrentTimes(classGroup.getId(), new Date()));
|
|
teacherClassHeadInfo.setTotalClassTimes(courseScheduleDao.countClassGroupCourses(classGroup.getId()));
|
|
teacherClassHeadInfo.setTotalClassTimes(courseScheduleDao.countClassGroupCourses(classGroup.getId()));
|
|
- teacherClassHeadInfo.setSurplusClassTimes(teacherClassHeadInfo.getTotalClassTimes()-teacherClassHeadInfo.getCurrentClassTimes());
|
|
|
|
|
|
+ teacherClassHeadInfo.setSurplusClassTimes(teacherClassHeadInfo.getTotalClassTimes() - teacherClassHeadInfo.getCurrentClassTimes());
|
|
if (subjectNames != null && !subjectNames.isEmpty()) {
|
|
if (subjectNames != null && !subjectNames.isEmpty()) {
|
|
teacherClassHeadInfo.setSubjectNames(subjectNames);
|
|
teacherClassHeadInfo.setSubjectNames(subjectNames);
|
|
}
|
|
}
|
|
@@ -1784,12 +1784,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Set<Long> collect = truantStudent.stream().map(e -> e.getStudentId()).collect(Collectors.toSet());
|
|
Set<Long> collect = truantStudent.stream().map(e -> e.getStudentId()).collect(Collectors.toSet());
|
|
Map<Integer, String> paymentStatusMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryUserCoursePaymentStatus(collect, schedule.getMusicGroupId()));
|
|
Map<Integer, String> paymentStatusMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryUserCoursePaymentStatus(collect, schedule.getMusicGroupId()));
|
|
|
|
|
|
- Map<Integer, Long> quitMap = MapUtil.convertIntegerMap(musicGroupQuitDao.queryQuitMapByStudentId(collect,schedule.getMusicGroupId()));
|
|
|
|
|
|
+ Map<Integer, Long> quitMap = MapUtil.convertIntegerMap(musicGroupQuitDao.queryQuitMapByStudentId(collect, schedule.getMusicGroupId()));
|
|
//学员是否有待审核的退团申请
|
|
//学员是否有待审核的退团申请
|
|
truantStudent.forEach(studentAttendanceViewDto -> {
|
|
truantStudent.forEach(studentAttendanceViewDto -> {
|
|
studentAttendanceViewDto.setPaymentStatus(paymentStatusMap.get(studentAttendanceViewDto.getStudentId().intValue()));
|
|
studentAttendanceViewDto.setPaymentStatus(paymentStatusMap.get(studentAttendanceViewDto.getStudentId().intValue()));
|
|
Long aLong = quitMap.get(studentAttendanceViewDto.getStudentId().intValue());
|
|
Long aLong = quitMap.get(studentAttendanceViewDto.getStudentId().intValue());
|
|
- studentAttendanceViewDto.setQuitFlag(aLong==null?0:aLong.intValue());
|
|
|
|
|
|
+ studentAttendanceViewDto.setQuitFlag(aLong == null ? 0 : aLong.intValue());
|
|
});
|
|
});
|
|
}
|
|
}
|
|
List<StudentAttendanceViewDto> tempIds = truantStudent.stream()
|
|
List<StudentAttendanceViewDto> tempIds = truantStudent.stream()
|
|
@@ -1802,12 +1802,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<Map<Integer, Long>> studentSubjectIdMaps = subjectDao.findStudentSubjectIdMaps(tempIds);
|
|
List<Map<Integer, Long>> studentSubjectIdMaps = subjectDao.findStudentSubjectIdMaps(tempIds);
|
|
Map<Integer, Long> studentSubjectIdMap = MapUtil.convertIntegerMap(studentSubjectIdMaps);
|
|
Map<Integer, Long> studentSubjectIdMap = MapUtil.convertIntegerMap(studentSubjectIdMaps);
|
|
truantStudent.forEach(studentAttendanceViewDto -> {
|
|
truantStudent.forEach(studentAttendanceViewDto -> {
|
|
- if(Objects.nonNull(studentAttendanceViewDto.getBeMerged())&&studentAttendanceViewDto.getBeMerged()){
|
|
|
|
- studentAttendanceViewDto.setSubjectName("被合并学员");
|
|
|
|
- }else{
|
|
|
|
- studentAttendanceViewDto.setSubjectName(studentSubjectNameMap.get(studentAttendanceViewDto.getStudentId().intValue()));
|
|
|
|
- studentAttendanceViewDto.setSubjectId(studentSubjectIdMap.get(studentAttendanceViewDto.getStudentId().intValue()));
|
|
|
|
- }
|
|
|
|
|
|
+ if (Objects.nonNull(studentAttendanceViewDto.getBeMerged()) && studentAttendanceViewDto.getBeMerged()) {
|
|
|
|
+ studentAttendanceViewDto.setSubjectName("被合并学员");
|
|
|
|
+ } else {
|
|
|
|
+ studentAttendanceViewDto.setSubjectName(studentSubjectNameMap.get(studentAttendanceViewDto.getStudentId().intValue()));
|
|
|
|
+ studentAttendanceViewDto.setSubjectId(studentSubjectIdMap.get(studentAttendanceViewDto.getStudentId().intValue()));
|
|
|
|
+ }
|
|
});
|
|
});
|
|
} else if (schedule.getGroupType() != MUSIC) {
|
|
} else if (schedule.getGroupType() != MUSIC) {
|
|
ClassGroup classGroup = classGroupDao.get(schedule.getClassGroupId());
|
|
ClassGroup classGroup = classGroupDao.get(schedule.getClassGroupId());
|
|
@@ -1998,8 +1998,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
if (classGroup4MixDto.getHoliday()) {
|
|
if (classGroup4MixDto.getHoliday()) {
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
- String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
|
|
|
|
- if(StringUtils.isNotBlank(holidaySetting)){
|
|
|
|
|
|
+ String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING, tenantId);
|
|
|
|
+ if (StringUtils.isNotBlank(holidaySetting)) {
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2019,7 +2019,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
//课时长度
|
|
//课时长度
|
|
long classCourseDuration = Duration.between(LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getStartClassTime() + ":00", formatter),
|
|
long classCourseDuration = Duration.between(LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getStartClassTime() + ":00", formatter),
|
|
- LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getEndClassTime() + ":00", formatter))
|
|
|
|
|
|
+ LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getEndClassTime() + ":00", formatter))
|
|
.toMinutes();
|
|
.toMinutes();
|
|
|
|
|
|
totalCourseDuration += classCourseDuration;
|
|
totalCourseDuration += classCourseDuration;
|
|
@@ -2147,8 +2147,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Set<String> holidayDays = new HashSet<>();
|
|
Set<String> holidayDays = new HashSet<>();
|
|
if (classGroup4MixDto.getHoliday()) {
|
|
if (classGroup4MixDto.getHoliday()) {
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
- String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
|
|
|
|
- if(StringUtils.isNotBlank(holidaySetting)){
|
|
|
|
|
|
+ String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING, tenantId);
|
|
|
|
+ if (StringUtils.isNotBlank(holidaySetting)) {
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2388,10 +2388,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<ClassGroupTeacherMapper> byClassGroup = classGroupTeacherMapperDao.findByClassGroup(classGroupId);
|
|
List<ClassGroupTeacherMapper> byClassGroup = classGroupTeacherMapperDao.findByClassGroup(classGroupId);
|
|
List<ClassGroupTeacherMapper> newTeacherMapperList = classGroup4MixDtos.get(0).getClassGroupTeacherMapperList();
|
|
List<ClassGroupTeacherMapper> newTeacherMapperList = classGroup4MixDtos.get(0).getClassGroupTeacherMapperList();
|
|
Set<Integer> collect = newTeacherMapperList.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
Set<Integer> collect = newTeacherMapperList.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
- if(newTeacherMapperList.size() != collect.size()){
|
|
|
|
|
|
+ if (newTeacherMapperList.size() != collect.size()) {
|
|
throw new BizException("主教与助教存在冲突");
|
|
throw new BizException("主教与助教存在冲突");
|
|
}
|
|
}
|
|
- if(musicGroup.getStatus() == PROGRESS){
|
|
|
|
|
|
+ if (musicGroup.getStatus() == PROGRESS) {
|
|
if (byClassGroup != null && byClassGroup.size() > 0) {
|
|
if (byClassGroup != null && byClassGroup.size() > 0) {
|
|
ClassGroupTeacherMapper groupTeacherMapper = byClassGroup.stream().filter(classGroupTeacherMapper -> classGroupTeacherMapper.getTeacherRole() == TeachTypeEnum.BISHOP).findFirst().get();
|
|
ClassGroupTeacherMapper groupTeacherMapper = byClassGroup.stream().filter(classGroupTeacherMapper -> classGroupTeacherMapper.getTeacherRole() == TeachTypeEnum.BISHOP).findFirst().get();
|
|
if (groupTeacherMapper != null) {
|
|
if (groupTeacherMapper != null) {
|
|
@@ -2460,7 +2460,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
for (ClassGroup4MixDto classGroup4MixDto : classGroup4MixDtos) {
|
|
for (ClassGroup4MixDto classGroup4MixDto : classGroup4MixDtos) {
|
|
List<ClassGroupTeacherMapper> teacherMappers = classGroup4MixDto.getClassGroupTeacherMapperList();
|
|
List<ClassGroupTeacherMapper> teacherMappers = classGroup4MixDto.getClassGroupTeacherMapperList();
|
|
Set<Integer> collect = teacherMappers.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
Set<Integer> collect = teacherMappers.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
- if(teacherMappers.size() != collect.size()){
|
|
|
|
|
|
+ if (teacherMappers.size() != collect.size()) {
|
|
throw new BizException("主教与助教存在冲突");
|
|
throw new BizException("主教与助教存在冲突");
|
|
}
|
|
}
|
|
//3、插入班级排课信息
|
|
//3、插入班级排课信息
|
|
@@ -2484,22 +2484,22 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
Set<String> holidayDays = new HashSet<>();
|
|
Set<String> holidayDays = new HashSet<>();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
- String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
|
|
|
|
- if(StringUtils.isNotBlank(holidaySetting)){
|
|
|
|
|
|
+ String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING, tenantId);
|
|
|
|
+ if (StringUtils.isNotBlank(holidaySetting)) {
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
}
|
|
}
|
|
|
|
|
|
Set<Integer> allTeacherIds = new HashSet<>();
|
|
Set<Integer> allTeacherIds = new HashSet<>();
|
|
List<SimpleUserDto> allTeacherInfo = new ArrayList<>();
|
|
List<SimpleUserDto> allTeacherInfo = new ArrayList<>();
|
|
- if(!confirmGenerate){
|
|
|
|
|
|
+ if (!confirmGenerate) {
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
List<ClassGroupTeacherMapper> newClassGroupTeacherMapperList = courseTimeDto.getClassGroupTeacherMapperList();
|
|
List<ClassGroupTeacherMapper> newClassGroupTeacherMapperList = courseTimeDto.getClassGroupTeacherMapperList();
|
|
Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().map(t -> t.getUserId()).collect(Collectors.toSet());
|
|
Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().map(t -> t.getUserId()).collect(Collectors.toSet());
|
|
- if(!CollectionUtils.isEmpty(teacherIds)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(teacherIds)) {
|
|
allTeacherIds.addAll(teacherIds);
|
|
allTeacherIds.addAll(teacherIds);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(!CollectionUtils.isEmpty(allTeacherIds)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(allTeacherIds)) {
|
|
allTeacherInfo = teacherDao.getUsersSimpleInfo(new ArrayList<>(allTeacherIds));
|
|
allTeacherInfo = teacherDao.getUsersSimpleInfo(new ArrayList<>(allTeacherIds));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2515,8 +2515,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
throw new BizException("主教与助教存在冲突");
|
|
throw new BizException("主教与助教存在冲突");
|
|
}
|
|
}
|
|
|
|
|
|
- Integer teacherId = newClassGroupTeacherMapperList.stream().filter(ct->TeachTypeEnum.BISHOP.equals(ct.getTeacherRole())).findAny().get().getUserId();
|
|
|
|
- if(Objects.isNull(teacherId)){
|
|
|
|
|
|
+ Integer teacherId = newClassGroupTeacherMapperList.stream().filter(ct -> TeachTypeEnum.BISHOP.equals(ct.getTeacherRole())).findAny().get().getUserId();
|
|
|
|
+ if (Objects.isNull(teacherId)) {
|
|
throw new BizException("请设置主教");
|
|
throw new BizException("请设置主教");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2550,7 +2550,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
//课时长度
|
|
//课时长度
|
|
long classCourseDuration = Duration.between(LocalDateTime.parse(DateUtil.dateToString(courseTimeDto.getStartDate(), "yyyy-MM-dd") + " " + courseTimeDto.getStartClassTime() + ":00", formatter),
|
|
long classCourseDuration = Duration.between(LocalDateTime.parse(DateUtil.dateToString(courseTimeDto.getStartDate(), "yyyy-MM-dd") + " " + courseTimeDto.getStartClassTime() + ":00", formatter),
|
|
- LocalDateTime.parse(DateUtil.dateToString(courseTimeDto.getStartDate(), "yyyy-MM-dd") + " " + courseTimeDto.getEndClassTime() + ":00", formatter))
|
|
|
|
|
|
+ LocalDateTime.parse(DateUtil.dateToString(courseTimeDto.getStartDate(), "yyyy-MM-dd") + " " + courseTimeDto.getEndClassTime() + ":00", formatter))
|
|
.toMinutes();
|
|
.toMinutes();
|
|
|
|
|
|
totalCourseDuration += classCourseDuration;
|
|
totalCourseDuration += classCourseDuration;
|
|
@@ -2601,14 +2601,14 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
courseScheduleDao.insert(courseSchedule);
|
|
courseScheduleDao.insert(courseSchedule);
|
|
courseScheduleList.add(courseSchedule);
|
|
courseScheduleList.add(courseSchedule);
|
|
|
|
|
|
- if(!confirmGenerate){
|
|
|
|
- Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().filter(ct->TeachTypeEnum.TEACHING.equals(ct.getTeacherRole())).map(ClassGroupTeacherMapper::getUserId).collect(Collectors.toSet());
|
|
|
|
|
|
+ if (!confirmGenerate) {
|
|
|
|
+ Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().filter(ct -> TeachTypeEnum.TEACHING.equals(ct.getTeacherRole())).map(ClassGroupTeacherMapper::getUserId).collect(Collectors.toSet());
|
|
SimpleUserDto mainTeacher = allTeacherInfo.stream().filter(t -> teacherId.equals(t.getUserId())).findAny().get();
|
|
SimpleUserDto mainTeacher = allTeacherInfo.stream().filter(t -> teacherId.equals(t.getUserId())).findAny().get();
|
|
- if(Objects.nonNull(mainTeacher)){
|
|
|
|
|
|
+ if (Objects.nonNull(mainTeacher)) {
|
|
courseSchedule.setActualTeacherName(mainTeacher.getUserName());
|
|
courseSchedule.setActualTeacherName(mainTeacher.getUserName());
|
|
}
|
|
}
|
|
List<SimpleUserDto> teachingTeachers = allTeacherInfo.stream().filter(t -> teacherIds.contains(t.getUserId())).collect(Collectors.toList());
|
|
List<SimpleUserDto> teachingTeachers = allTeacherInfo.stream().filter(t -> teacherIds.contains(t.getUserId())).collect(Collectors.toList());
|
|
- if(!CollectionUtils.isEmpty(teachingTeachers)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(teachingTeachers)) {
|
|
courseSchedule.setTeachingTeacherNames(StringUtils.join(teachingTeachers.stream().map(SimpleUserDto::getUserName).collect(Collectors.toList()), ","));
|
|
courseSchedule.setTeachingTeacherNames(StringUtils.join(teachingTeachers.stream().map(SimpleUserDto::getUserName).collect(Collectors.toList()), ","));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2672,28 +2672,28 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.get(musicGroupSchoolTermCourseDetailId);
|
|
MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.get(musicGroupSchoolTermCourseDetailId);
|
|
//校验所有学员的课时都有消耗
|
|
//校验所有学员的课时都有消耗
|
|
String studentName = musicGroupSchoolTermStudentCourseDetailDao.getNoCourseStudentName(musicGroupSchoolTermCourseDetailId);
|
|
String studentName = musicGroupSchoolTermStudentCourseDetailDao.getNoCourseStudentName(musicGroupSchoolTermCourseDetailId);
|
|
- if(StringUtils.isNotEmpty(studentName)){
|
|
|
|
- throw new BizException("操作失败:{} 未排课,请检查排课是否完整",studentName);
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(studentName)) {
|
|
|
|
+ throw new BizException("操作失败:{} 未排课,请检查排课是否完整", studentName);
|
|
}
|
|
}
|
|
//获取所有预排课课程列表
|
|
//获取所有预排课课程列表
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
- if(courseSchedules.size() == 0){
|
|
|
|
|
|
+ if (courseSchedules.size() == 0) {
|
|
throw new BizException("操作失败:请先预排课");
|
|
throw new BizException("操作失败:请先预排课");
|
|
}
|
|
}
|
|
//是否有进行中或者已结束的课程
|
|
//是否有进行中或者已结束的课程
|
|
int overCourseScheduleNum = courseScheduleDao.queryOverPreCourseListByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
int overCourseScheduleNum = courseScheduleDao.queryOverPreCourseListByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
- if(overCourseScheduleNum > 0){
|
|
|
|
|
|
+ if (overCourseScheduleNum > 0) {
|
|
throw new BizException("操作失败:有进行中或已结束的课程,请重新排课");
|
|
throw new BizException("操作失败:有进行中或已结束的课程,请重新排课");
|
|
}
|
|
}
|
|
|
|
|
|
Map<Integer, List<CourseSchedule>> courseMap = courseSchedules.stream().collect(Collectors.groupingBy(CourseSchedule::getClassGroupId));
|
|
Map<Integer, List<CourseSchedule>> courseMap = courseSchedules.stream().collect(Collectors.groupingBy(CourseSchedule::getClassGroupId));
|
|
- courseMap.keySet().forEach(e->{
|
|
|
|
|
|
+ courseMap.keySet().forEach(e -> {
|
|
//更新班级课程数
|
|
//更新班级课程数
|
|
classGroupService.updateTotalClassTimes(e, courseMap.get(e).size());
|
|
classGroupService.updateTotalClassTimes(e, courseMap.get(e).size());
|
|
});
|
|
});
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
//取消预排课标记
|
|
//取消预排课标记
|
|
- courseScheduleDao.batchUpdateLockByCourseIds(courseScheduleIds,0,0);
|
|
|
|
|
|
+ courseScheduleDao.batchUpdateLockByCourseIds(courseScheduleIds, 0, 0);
|
|
//标记已排课
|
|
//标记已排课
|
|
termCourseDetail.setCourseFlag(true);
|
|
termCourseDetail.setCourseFlag(true);
|
|
musicGroupSchoolTermCourseDetailDao.update(termCourseDetail);
|
|
musicGroupSchoolTermCourseDetailDao.update(termCourseDetail);
|
|
@@ -2726,16 +2726,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
if (!CollectionUtils.isEmpty(teacherAttendances)) {
|
|
if (!CollectionUtils.isEmpty(teacherAttendances)) {
|
|
teacherAttendanceDao.batchInsert(teacherAttendances);
|
|
teacherAttendanceDao.batchInsert(teacherAttendances);
|
|
}
|
|
}
|
|
- imUserFriendService.refreshGroupImUserFriend(termCourseDetail.getMusicGroupId(),MUSIC);
|
|
|
|
|
|
+ imUserFriendService.refreshGroupImUserFriend(termCourseDetail.getMusicGroupId(), MUSIC);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public void cancelPreCourseSchedule(Integer musicGroupSchoolTermCourseDetailId, Integer classGroupId) {
|
|
public void cancelPreCourseSchedule(Integer musicGroupSchoolTermCourseDetailId, Integer classGroupId) {
|
|
MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.get(musicGroupSchoolTermCourseDetailId);
|
|
MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.get(musicGroupSchoolTermCourseDetailId);
|
|
- if(classGroupId == null){
|
|
|
|
|
|
+ if (classGroupId == null) {
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByMusicGroupId(termCourseDetail.getMusicGroupId());
|
|
- if(courseSchedules.size() > 0){
|
|
|
|
|
|
+ if (courseSchedules.size() > 0) {
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
//删除课程以及关联的学员老师
|
|
//删除课程以及关联的学员老师
|
|
courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
|
|
courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
|
|
@@ -2743,11 +2743,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
courseScheduleDao.deleteCourseSchedulesByClassGroupIds(courseScheduleIds);
|
|
courseScheduleDao.deleteCourseSchedulesByClassGroupIds(courseScheduleIds);
|
|
}
|
|
}
|
|
//取消所有预排课
|
|
//取消所有预排课
|
|
- musicGroupSchoolTermStudentCourseDetailDao.deleteByDetailId(musicGroupSchoolTermCourseDetailId,null);
|
|
|
|
|
|
+ musicGroupSchoolTermStudentCourseDetailDao.deleteByDetailId(musicGroupSchoolTermCourseDetailId, null);
|
|
musicGroupSchoolTermCourseDetailDao.delete(musicGroupSchoolTermCourseDetailId);
|
|
musicGroupSchoolTermCourseDetailDao.delete(musicGroupSchoolTermCourseDetailId);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId);
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId);
|
|
- if(courseSchedules.size() == 0){
|
|
|
|
|
|
+ if (courseSchedules.size() == 0) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(c -> c.getId()).collect(Collectors.toList());
|
|
List<Long> courseScheduleIds = courseSchedules.stream().map(c -> c.getId()).collect(Collectors.toList());
|
|
@@ -2769,14 +2769,14 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//根据课程编号获取总时长
|
|
//根据课程编号获取总时长
|
|
int courseMinutes = courseScheduleDao.sumCourseMinutes(courseScheduleIdList);
|
|
int courseMinutes = courseScheduleDao.sumCourseMinutes(courseScheduleIdList);
|
|
preMemberCourseMinutes += courseMinutes;
|
|
preMemberCourseMinutes += courseMinutes;
|
|
- if(scheduleType == SINGLE || scheduleType == TRAINING_SINGLE){
|
|
|
|
|
|
+ if (scheduleType == SINGLE || scheduleType == TRAINING_SINGLE) {
|
|
singleCourseMinutes += courseMinutes;
|
|
singleCourseMinutes += courseMinutes;
|
|
}
|
|
}
|
|
- if(scheduleType == MIX || scheduleType == TRAINING_MIX){
|
|
|
|
|
|
+ if (scheduleType == MIX || scheduleType == TRAINING_MIX) {
|
|
mixCourseMinutes += courseMinutes;
|
|
mixCourseMinutes += courseMinutes;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- musicGroupSchoolTermStudentCourseDetailDao.cutMinutes(musicGroupSchoolTermCourseDetailId,preMemberCourseMinutes,mixCourseMinutes,singleCourseMinutes,studentId);
|
|
|
|
|
|
+ musicGroupSchoolTermStudentCourseDetailDao.cutMinutes(musicGroupSchoolTermCourseDetailId, preMemberCourseMinutes, mixCourseMinutes, singleCourseMinutes, studentId);
|
|
}
|
|
}
|
|
//删除课程以及关联的学员老师
|
|
//删除课程以及关联的学员老师
|
|
courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
|
|
courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
|
|
@@ -2788,12 +2788,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
@Override
|
|
@Override
|
|
public List<ClassGroup> queryStudentClassGroupsAndTeacher(String musicGroupId) {
|
|
public List<ClassGroup> queryStudentClassGroupsAndTeacher(String musicGroupId) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
- if(sysUser == null){
|
|
|
|
|
|
+ if (sysUser == null) {
|
|
throw new BizException("请登录");
|
|
throw new BizException("请登录");
|
|
}
|
|
}
|
|
List<ClassGroup> classGroups = classGroupDao.queryStudentClassGroups(musicGroupId, sysUser.getId());
|
|
List<ClassGroup> classGroups = classGroupDao.queryStudentClassGroups(musicGroupId, sysUser.getId());
|
|
- if(classGroups.size() > 0){
|
|
|
|
- classGroups.forEach(e->{
|
|
|
|
|
|
+ if (classGroups.size() > 0) {
|
|
|
|
+ classGroups.forEach(e -> {
|
|
e.setTeacherMapperList(classGroupTeacherMapperDao.findClassGroupTeachers(e.getId().toString()));
|
|
e.setTeacherMapperList(classGroupTeacherMapperDao.findClassGroupTeachers(e.getId().toString()));
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -2819,17 +2819,17 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
throw new BizException("当前班级已冻结无法操作预排课");
|
|
throw new BizException("当前班级已冻结无法操作预排课");
|
|
}
|
|
}
|
|
MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
|
|
MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
|
|
- if(musicGroup == null){
|
|
|
|
|
|
+ if (musicGroup == null) {
|
|
throw new BizException("乐团信息查询失败");
|
|
throw new BizException("乐团信息查询失败");
|
|
}
|
|
}
|
|
- if(musicGroup.getTenantId() == null){
|
|
|
|
|
|
+ if (musicGroup.getTenantId() == null) {
|
|
throw new BizException("乐团机构信息异常,请联系管理员");
|
|
throw new BizException("乐团机构信息异常,请联系管理员");
|
|
}
|
|
}
|
|
String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.MEMBER_GROUP_TERM_GIVE_COURSE_TIME, musicGroup.getTenantId());
|
|
String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.MEMBER_GROUP_TERM_GIVE_COURSE_TIME, musicGroup.getTenantId());
|
|
- if(StringUtils.isEmpty(configValue)){
|
|
|
|
|
|
+ if (StringUtils.isEmpty(configValue)) {
|
|
throw new BizException("请配置会员团每学期赠送课程分钟数");
|
|
throw new BizException("请配置会员团每学期赠送课程分钟数");
|
|
}
|
|
}
|
|
- Integer giveCourseTime = Integer.parseInt(configValue)>>1;
|
|
|
|
|
|
+ Integer giveCourseTime = Integer.parseInt(configValue) >> 1;
|
|
|
|
|
|
Boolean confirmGenerate = false;
|
|
Boolean confirmGenerate = false;
|
|
if (Objects.nonNull(classGroup4MixDtos.get(0).getConfirmGenerate())) {
|
|
if (Objects.nonNull(classGroup4MixDtos.get(0).getConfirmGenerate())) {
|
|
@@ -2870,35 +2870,35 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
Integer totalMixCourseMinutes = 0;
|
|
Integer totalMixCourseMinutes = 0;
|
|
Integer singleCourseMinutes = 0;
|
|
Integer singleCourseMinutes = 0;
|
|
- if(classGroup4MixDto.getCourseType() == SINGLE || classGroup4MixDto.getCourseType() == MIX ||
|
|
|
|
- classGroup4MixDto.getCourseType() == TRAINING_SINGLE || classGroup4MixDto.getCourseType() == TRAINING_MIX){
|
|
|
|
|
|
+ if (classGroup4MixDto.getCourseType() == SINGLE || classGroup4MixDto.getCourseType() == MIX ||
|
|
|
|
+ classGroup4MixDto.getCourseType() == TRAINING_SINGLE || classGroup4MixDto.getCourseType() == TRAINING_MIX) {
|
|
//单技课和合奏课最大的排课时长不能超过44 * 45 分钟
|
|
//单技课和合奏课最大的排课时长不能超过44 * 45 分钟
|
|
- if(classGroup4MixDto.getCourseType() == SINGLE || classGroup4MixDto.getCourseType() == TRAINING_SINGLE){
|
|
|
|
- if(totalCourseMinutes > giveCourseTime){
|
|
|
|
- throw new BizException("声部类型总时长不能超过最大限制({}分钟)",giveCourseTime);
|
|
|
|
|
|
+ if (classGroup4MixDto.getCourseType() == SINGLE || classGroup4MixDto.getCourseType() == TRAINING_SINGLE) {
|
|
|
|
+ if (totalCourseMinutes > giveCourseTime) {
|
|
|
|
+ throw new BizException("声部类型总时长不能超过最大限制({}分钟)", giveCourseTime);
|
|
}
|
|
}
|
|
singleCourseMinutes = totalCourseMinutes;
|
|
singleCourseMinutes = totalCourseMinutes;
|
|
//获取所选学员最大的已消耗的单技课时长
|
|
//获取所选学员最大的已消耗的单技课时长
|
|
- int maxSingleCourseMinutes = musicGroupSchoolTermStudentCourseDetailDao.getMaxSingleCourseMinutes(musicGroupSchoolTermCourseDetailId,studentIds);
|
|
|
|
- if(giveCourseTime - maxSingleCourseMinutes < totalCourseMinutes){
|
|
|
|
|
|
+ int maxSingleCourseMinutes = musicGroupSchoolTermStudentCourseDetailDao.getMaxSingleCourseMinutes(musicGroupSchoolTermCourseDetailId, studentIds);
|
|
|
|
+ if (giveCourseTime - maxSingleCourseMinutes < totalCourseMinutes) {
|
|
// throw new BizException("操作失败:所选学员可排单技课时长已不足{}分钟",totalCourseMinutes);
|
|
// throw new BizException("操作失败:所选学员可排单技课时长已不足{}分钟",totalCourseMinutes);
|
|
- throw new BizException("声部类型总时长不能超过最大限制({}分钟)",giveCourseTime);
|
|
|
|
|
|
+ throw new BizException("声部类型总时长不能超过最大限制({}分钟)", giveCourseTime);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if(totalCourseMinutes > giveCourseTime){
|
|
|
|
- throw new BizException("合奏类型总时长不能超过最大限制({}分钟)",giveCourseTime);
|
|
|
|
|
|
+ if (totalCourseMinutes > giveCourseTime) {
|
|
|
|
+ throw new BizException("合奏类型总时长不能超过最大限制({}分钟)", giveCourseTime);
|
|
}
|
|
}
|
|
totalMixCourseMinutes = totalCourseMinutes;
|
|
totalMixCourseMinutes = totalCourseMinutes;
|
|
- int maxMixCourseMinutes = musicGroupSchoolTermStudentCourseDetailDao.getMaxMixCourseMinutes(musicGroupSchoolTermCourseDetailId,studentIds);
|
|
|
|
- if(giveCourseTime - maxMixCourseMinutes < totalCourseMinutes){
|
|
|
|
|
|
+ int maxMixCourseMinutes = musicGroupSchoolTermStudentCourseDetailDao.getMaxMixCourseMinutes(musicGroupSchoolTermCourseDetailId, studentIds);
|
|
|
|
+ if (giveCourseTime - maxMixCourseMinutes < totalCourseMinutes) {
|
|
// throw new BizException("操作失败:所选学员可排合奏课时长已不足{}分钟",totalCourseMinutes);
|
|
// throw new BizException("操作失败:所选学员可排合奏课时长已不足{}分钟",totalCourseMinutes);
|
|
- throw new BizException("合奏类型总时长不能超过最大限制({}分钟)",giveCourseTime);
|
|
|
|
|
|
+ throw new BizException("合奏类型总时长不能超过最大限制({}分钟)", giveCourseTime);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//获取班级学员最少可排课时长
|
|
//获取班级学员最少可排课时长
|
|
- int mixCourseMinutes = musicGroupSchoolTermStudentCourseDetailDao.getMixCourseMinutes(musicGroupSchoolTermCourseDetailId,studentIds);
|
|
|
|
- if(totalCourseMinutes > mixCourseMinutes){
|
|
|
|
|
|
+ int mixCourseMinutes = musicGroupSchoolTermStudentCourseDetailDao.getMixCourseMinutes(musicGroupSchoolTermCourseDetailId, studentIds);
|
|
|
|
+ if (totalCourseMinutes > mixCourseMinutes) {
|
|
throw new BizException("操作失败:所选部分学员可排课时间不足");
|
|
throw new BizException("操作失败:所选部分学员可排课时间不足");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2910,22 +2910,22 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
Set<String> holidayDays = new HashSet<>();
|
|
Set<String> holidayDays = new HashSet<>();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
- String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
|
|
|
|
- if(StringUtils.isNotBlank(holidaySetting)){
|
|
|
|
|
|
+ String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING, tenantId);
|
|
|
|
+ if (StringUtils.isNotBlank(holidaySetting)) {
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
}
|
|
}
|
|
|
|
|
|
Set<Integer> allTeacherIds = new HashSet<>();
|
|
Set<Integer> allTeacherIds = new HashSet<>();
|
|
List<SimpleUserDto> allTeacherInfo = new ArrayList<>();
|
|
List<SimpleUserDto> allTeacherInfo = new ArrayList<>();
|
|
- if(!confirmGenerate){
|
|
|
|
|
|
+ if (!confirmGenerate) {
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
for (CourseTimeDto courseTimeDto : classGroup4MixDto.getCourseTimeDtoList()) {
|
|
List<ClassGroupTeacherMapper> newClassGroupTeacherMapperList = courseTimeDto.getClassGroupTeacherMapperList();
|
|
List<ClassGroupTeacherMapper> newClassGroupTeacherMapperList = courseTimeDto.getClassGroupTeacherMapperList();
|
|
Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().map(t -> t.getUserId()).collect(Collectors.toSet());
|
|
Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().map(t -> t.getUserId()).collect(Collectors.toSet());
|
|
- if(!CollectionUtils.isEmpty(teacherIds)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(teacherIds)) {
|
|
allTeacherIds.addAll(teacherIds);
|
|
allTeacherIds.addAll(teacherIds);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(!CollectionUtils.isEmpty(allTeacherIds)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(allTeacherIds)) {
|
|
allTeacherInfo = teacherDao.getUsersSimpleInfo(new ArrayList<>(allTeacherIds));
|
|
allTeacherInfo = teacherDao.getUsersSimpleInfo(new ArrayList<>(allTeacherIds));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2941,8 +2941,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
throw new BizException("主教与助教存在冲突");
|
|
throw new BizException("主教与助教存在冲突");
|
|
}
|
|
}
|
|
|
|
|
|
- Integer teacherId = newClassGroupTeacherMapperList.stream().filter(ct->TeachTypeEnum.BISHOP.equals(ct.getTeacherRole())).findAny().get().getUserId();
|
|
|
|
- if(Objects.isNull(teacherId)){
|
|
|
|
|
|
+ Integer teacherId = newClassGroupTeacherMapperList.stream().filter(ct -> TeachTypeEnum.BISHOP.equals(ct.getTeacherRole())).findAny().get().getUserId();
|
|
|
|
+ if (Objects.isNull(teacherId)) {
|
|
throw new BizException("请设置主教");
|
|
throw new BizException("请设置主教");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2953,11 +2953,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
throw new BizException("排课循环周期错误,请核查");
|
|
throw new BizException("排课循环周期错误,请核查");
|
|
}
|
|
}
|
|
//排课截止时间不可超过学期截止日期
|
|
//排课截止时间不可超过学期截止日期
|
|
- if(courseTimeDto.getEndDate().compareTo(schoolTermCourseDetail.getEndSchoolTerm()) > 0){
|
|
|
|
|
|
+ if (courseTimeDto.getEndDate().compareTo(schoolTermCourseDetail.getEndSchoolTerm()) > 0) {
|
|
throw new BizException("操作失败:不可跨学期排课,请调整课程截止日期");
|
|
throw new BizException("操作失败:不可跨学期排课,请调整课程截止日期");
|
|
}
|
|
}
|
|
//排课开始时间不可小于预排课时间
|
|
//排课开始时间不可小于预排课时间
|
|
- if(courseTimeDto.getStartDate().compareTo(schoolTermCourseDetail.getStartSchoolTerm()) < 0){
|
|
|
|
|
|
+ if (courseTimeDto.getStartDate().compareTo(schoolTermCourseDetail.getStartSchoolTerm()) < 0) {
|
|
throw new BizException("操作失败:排课开始时间不可小于开课日期");
|
|
throw new BizException("操作失败:排课开始时间不可小于开课日期");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3029,14 +3029,14 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
courseScheduleDao.insert(courseSchedule);
|
|
courseScheduleDao.insert(courseSchedule);
|
|
courseScheduleList.add(courseSchedule);
|
|
courseScheduleList.add(courseSchedule);
|
|
|
|
|
|
- if(!confirmGenerate){
|
|
|
|
- Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().filter(ct->TeachTypeEnum.TEACHING.equals(ct.getTeacherRole())).map(ClassGroupTeacherMapper::getUserId).collect(Collectors.toSet());
|
|
|
|
|
|
+ if (!confirmGenerate) {
|
|
|
|
+ Set<Integer> teacherIds = newClassGroupTeacherMapperList.stream().filter(ct -> TeachTypeEnum.TEACHING.equals(ct.getTeacherRole())).map(ClassGroupTeacherMapper::getUserId).collect(Collectors.toSet());
|
|
SimpleUserDto mainTeacher = allTeacherInfo.stream().filter(t -> teacherId.equals(t.getUserId())).findAny().get();
|
|
SimpleUserDto mainTeacher = allTeacherInfo.stream().filter(t -> teacherId.equals(t.getUserId())).findAny().get();
|
|
- if(Objects.nonNull(mainTeacher)){
|
|
|
|
|
|
+ if (Objects.nonNull(mainTeacher)) {
|
|
courseSchedule.setActualTeacherName(mainTeacher.getUserName());
|
|
courseSchedule.setActualTeacherName(mainTeacher.getUserName());
|
|
}
|
|
}
|
|
List<SimpleUserDto> teachingTeachers = allTeacherInfo.stream().filter(t -> teacherIds.contains(t.getUserId())).collect(Collectors.toList());
|
|
List<SimpleUserDto> teachingTeachers = allTeacherInfo.stream().filter(t -> teacherIds.contains(t.getUserId())).collect(Collectors.toList());
|
|
- if(!CollectionUtils.isEmpty(teachingTeachers)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(teachingTeachers)) {
|
|
courseSchedule.setTeachingTeacherNames(StringUtils.join(teachingTeachers.stream().map(SimpleUserDto::getUserName).collect(Collectors.toList()), ","));
|
|
courseSchedule.setTeachingTeacherNames(StringUtils.join(teachingTeachers.stream().map(SimpleUserDto::getUserName).collect(Collectors.toList()), ","));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3216,8 +3216,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Set<String> holidayDays = new HashSet<>();
|
|
Set<String> holidayDays = new HashSet<>();
|
|
if (classGroup4MixDto.getHoliday()) {
|
|
if (classGroup4MixDto.getHoliday()) {
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
- String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING,tenantId);
|
|
|
|
- if(StringUtils.isNotBlank(holidaySetting)){
|
|
|
|
|
|
+ String holidaySetting = sysTenantConfigService.getTenantConfigValue(SysConfigService.HOLIDAY_SETTING, tenantId);
|
|
|
|
+ if (StringUtils.isNotBlank(holidaySetting)) {
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
holidayDays = new HashSet<>(JSON.parseArray(holidaySetting, String.class));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3238,7 +3238,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
//课时长度
|
|
//课时长度
|
|
long classCourseDuration = Duration.between(LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getStartClassTime() + ":00", formatter),
|
|
long classCourseDuration = Duration.between(LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getStartClassTime() + ":00", formatter),
|
|
- LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getEndClassTime() + ":00", formatter))
|
|
|
|
|
|
+ LocalDateTime.parse(classGroup4MixDto.getStartDate() + " " + courseTimeDto.getEndClassTime() + ":00", formatter))
|
|
.toMinutes();
|
|
.toMinutes();
|
|
|
|
|
|
totalCourseDuration += classCourseDuration;
|
|
totalCourseDuration += classCourseDuration;
|
|
@@ -3326,7 +3326,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
params.put("offset", pageInfo.getOffset());
|
|
params.put("offset", pageInfo.getOffset());
|
|
dataList = classGroupDao.queryMusicGroupClassGroup(params);
|
|
dataList = classGroupDao.queryMusicGroupClassGroup(params);
|
|
List<Integer> classGroups = dataList.stream().map(e -> e.getClassGroupId()).collect(Collectors.toList());
|
|
List<Integer> classGroups = dataList.stream().map(e -> e.getClassGroupId()).collect(Collectors.toList());
|
|
- Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroups, null,0));
|
|
|
|
|
|
+ Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroups, null, 0));
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroups));
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroups));
|
|
String join = StringUtils.join(classGroups, ",");
|
|
String join = StringUtils.join(classGroups, ",");
|
|
//获取主教老师
|
|
//获取主教老师
|
|
@@ -3420,16 +3420,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public int updateClassGroup(ClassGroup classGroup) {
|
|
public int updateClassGroup(ClassGroup classGroup) {
|
|
ClassGroup group = classGroupDao.get(classGroup.getId());
|
|
ClassGroup group = classGroupDao.get(classGroup.getId());
|
|
- if(Objects.isNull(group)){
|
|
|
|
|
|
+ if (Objects.isNull(group)) {
|
|
throw new BizException("班级信息不存在");
|
|
throw new BizException("班级信息不存在");
|
|
}
|
|
}
|
|
String groupName = classGroup.getName();
|
|
String groupName = classGroup.getName();
|
|
- if(StringUtils.isEmpty(groupName)){
|
|
|
|
|
|
+ if (StringUtils.isEmpty(groupName)) {
|
|
throw new BizException("请填写班级名称");
|
|
throw new BizException("请填写班级名称");
|
|
}
|
|
}
|
|
classGroupDao.update(classGroup);
|
|
classGroupDao.update(classGroup);
|
|
ImGroup imGroup = imGroupService.get(classGroup.getId().toString());
|
|
ImGroup imGroup = imGroupService.get(classGroup.getId().toString());
|
|
- if(!Objects.isNull(imGroup)){
|
|
|
|
|
|
+ if (!Objects.isNull(imGroup)) {
|
|
imGroup.setName(groupName);
|
|
imGroup.setName(groupName);
|
|
imGroupService.update(imGroup);
|
|
imGroupService.update(imGroup);
|
|
}
|
|
}
|
|
@@ -3588,8 +3588,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<ClassGroupTeachersDto> getClassGroupAndTeacherByType(String musicGroupId, ClassGroupTypeEnum type) {
|
|
|
|
- List<ClassGroupTeachersDto> classGroups = classGroupDao.findClassGroupByType(musicGroupId, type);
|
|
|
|
|
|
+ public List<ClassGroupTeachersDto> getClassGroupAndTeacherByType(String musicGroupId, ClassGroupTypeEnum type, Boolean hasCourse) {
|
|
|
|
+ List<ClassGroupTeachersDto> classGroups = classGroupDao.findClassGroupByType(musicGroupId, type, hasCourse);
|
|
if (classGroups.size() == 0) {
|
|
if (classGroups.size() == 0) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -3599,14 +3599,14 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<ClassGroupTeacherMapper> classGroupTeachers = classGroupTeacherMapperDao.findClassGroupTeachers(classGroupIds);
|
|
List<ClassGroupTeacherMapper> classGroupTeachers = classGroupTeacherMapperDao.findClassGroupTeachers(classGroupIds);
|
|
Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(classGroupIds))), HashMap.class);
|
|
Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(classGroupIds))), HashMap.class);
|
|
|
|
|
|
- Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroupSet, null,0));
|
|
|
|
- MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.findByCourseDateAndMusicGroupId(musicGroupId, null,0);
|
|
|
|
|
|
+ Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroupSet, null, 0));
|
|
|
|
+ MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.findByCourseDateAndMusicGroupId(musicGroupId, null, 0);
|
|
Map<Integer, Long> preTotalNumMap = null;
|
|
Map<Integer, Long> preTotalNumMap = null;
|
|
Map<Integer, Long> preSubMinutesMap = null;
|
|
Map<Integer, Long> preSubMinutesMap = null;
|
|
Map<Integer, BigDecimal> preMinutesMap = null;
|
|
Map<Integer, BigDecimal> preMinutesMap = null;
|
|
- if(termCourseDetail != null){
|
|
|
|
|
|
+ if (termCourseDetail != null) {
|
|
preTotalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreTotalNumByClassGroupId(classGroupSet));
|
|
preTotalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreTotalNumByClassGroupId(classGroupSet));
|
|
- preSubMinutesMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreSubMinutesByClassGroupId(classGroupSet,termCourseDetail.getId()));
|
|
|
|
|
|
+ preSubMinutesMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreSubMinutesByClassGroupId(classGroupSet, termCourseDetail.getId()));
|
|
preMinutesMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreMinutesByClassGroupId(classGroupSet));
|
|
preMinutesMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreMinutesByClassGroupId(classGroupSet));
|
|
}
|
|
}
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroupSet));
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroupSet));
|
|
@@ -3621,22 +3621,22 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
classGroup.setStudentNum(studyNums.get(classGroup.getId()));
|
|
classGroup.setStudentNum(studyNums.get(classGroup.getId()));
|
|
int totalClassTimes = 0;
|
|
int totalClassTimes = 0;
|
|
int currentClassTimes = 0;
|
|
int currentClassTimes = 0;
|
|
- if(preSubMinutesMap != null){
|
|
|
|
|
|
+ if (preSubMinutesMap != null) {
|
|
if (preSubMinutesMap.containsKey(classGroup.getId())) {
|
|
if (preSubMinutesMap.containsKey(classGroup.getId())) {
|
|
Long aLong = preSubMinutesMap.get(classGroup.getId());
|
|
Long aLong = preSubMinutesMap.get(classGroup.getId());
|
|
- classGroup.setPreSubMinutes(aLong==null?0:aLong.intValue());
|
|
|
|
|
|
+ classGroup.setPreSubMinutes(aLong == null ? 0 : aLong.intValue());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(preMinutesMap != null){
|
|
|
|
|
|
+ if (preMinutesMap != null) {
|
|
if (preMinutesMap.containsKey(classGroup.getId())) {
|
|
if (preMinutesMap.containsKey(classGroup.getId())) {
|
|
BigDecimal bigDecimal = preMinutesMap.get(classGroup.getId());
|
|
BigDecimal bigDecimal = preMinutesMap.get(classGroup.getId());
|
|
- classGroup.setPreMinutes(bigDecimal==null?0:bigDecimal.intValue());
|
|
|
|
|
|
+ classGroup.setPreMinutes(bigDecimal == null ? 0 : bigDecimal.intValue());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(preTotalNumMap != null){
|
|
|
|
|
|
+ if (preTotalNumMap != null) {
|
|
if (preTotalNumMap.containsKey(classGroup.getId())) {
|
|
if (preTotalNumMap.containsKey(classGroup.getId())) {
|
|
Long aLong = preTotalNumMap.get(classGroup.getId());
|
|
Long aLong = preTotalNumMap.get(classGroup.getId());
|
|
- classGroup.setPreTotalClassTimes(aLong==null?0:aLong.intValue());
|
|
|
|
|
|
+ classGroup.setPreTotalClassTimes(aLong == null ? 0 : aLong.intValue());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3673,7 +3673,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
} else {
|
|
} else {
|
|
count = classGroupDao.countClassGroup(params);
|
|
count = classGroupDao.countClassGroup(params);
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
count = classGroupDao.countClassGroup(params);
|
|
count = classGroupDao.countClassGroup(params);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3687,7 +3687,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<ClassGroupTeacherMapper> classGroupTeachers = classGroupTeacherMapperDao.findClassGroupTeachers(classGroupIds);
|
|
List<ClassGroupTeacherMapper> classGroupTeachers = classGroupTeacherMapperDao.findClassGroupTeachers(classGroupIds);
|
|
Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(classGroupIds))), HashMap.class);
|
|
Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(classGroupIds))), HashMap.class);
|
|
|
|
|
|
- Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroupSet, null,0));
|
|
|
|
|
|
+ Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroupSet, null, 0));
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroupSet));
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroupSet));
|
|
|
|
|
|
for (ClassGroupTeachersDto classGroup : dataList) {
|
|
for (ClassGroupTeachersDto classGroup : dataList) {
|
|
@@ -3722,16 +3722,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
|
|
MusicGroup musicGroup = musicGroupDao.get(classGroup.getMusicGroupId());
|
|
|
|
|
|
Map<Integer, String> userRoleMap = new HashMap<Integer, String>();
|
|
Map<Integer, String> userRoleMap = new HashMap<Integer, String>();
|
|
- if(musicGroup.getEducationalTeacherId() != null){
|
|
|
|
|
|
+ if (musicGroup.getEducationalTeacherId() != null) {
|
|
userRoleMap.put(musicGroup.getEducationalTeacherId(), "乐团主管");
|
|
userRoleMap.put(musicGroup.getEducationalTeacherId(), "乐团主管");
|
|
}
|
|
}
|
|
- if(musicGroup.getTeamTeacherId() != null){
|
|
|
|
|
|
+ if (musicGroup.getTeamTeacherId() != null) {
|
|
userRoleMap.put(musicGroup.getTeamTeacherId(), "运营主管");
|
|
userRoleMap.put(musicGroup.getTeamTeacherId(), "运营主管");
|
|
}
|
|
}
|
|
- if(musicGroup.getDirectorUserId() != null){
|
|
|
|
|
|
+ if (musicGroup.getDirectorUserId() != null) {
|
|
userRoleMap.put(musicGroup.getDirectorUserId(), "乐队指导");
|
|
userRoleMap.put(musicGroup.getDirectorUserId(), "乐队指导");
|
|
}
|
|
}
|
|
- if(musicGroup.getTransactionTeacherId() != null){
|
|
|
|
|
|
+ if (musicGroup.getTransactionTeacherId() != null) {
|
|
userRoleMap.put(musicGroup.getTransactionTeacherId(), "衔接老师");
|
|
userRoleMap.put(musicGroup.getTransactionTeacherId(), "衔接老师");
|
|
}
|
|
}
|
|
for (Integer userId : userIds) {
|
|
for (Integer userId : userIds) {
|
|
@@ -4061,8 +4061,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<RemainCourseTypeDurationDto> queryRemainCourseTypeDuration(String classGroupIdList,Integer memberFlag) {
|
|
|
|
- return courseScheduleDao.queryRemainCourseTypeDuration(classGroupIdList,memberFlag);
|
|
|
|
|
|
+ public List<RemainCourseTypeDurationDto> queryRemainCourseTypeDuration(String classGroupIdList, Integer memberFlag) {
|
|
|
|
+ return courseScheduleDao.queryRemainCourseTypeDuration(classGroupIdList, memberFlag);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -4137,7 +4137,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(classGroupIds.get(0));
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(classGroupIds.get(0));
|
|
//获取欠费学员列表
|
|
//获取欠费学员列表
|
|
- List<Integer> noPaymentUserIds = musicGroupPaymentCalenderDetailDao.queryNoPaymentUserIds(musicGroup.getId(), new ArrayList<>(studentIds),null);
|
|
|
|
|
|
+ List<Integer> noPaymentUserIds = musicGroupPaymentCalenderDetailDao.queryNoPaymentUserIds(musicGroup.getId(), new ArrayList<>(studentIds), null);
|
|
if (noPaymentUserIds.size() > 0) {
|
|
if (noPaymentUserIds.size() > 0) {
|
|
throw new BizException("操作失败:有欠费的学员不允许创建缴费");
|
|
throw new BizException("操作失败:有欠费的学员不允许创建缴费");
|
|
}
|
|
}
|
|
@@ -4262,7 +4262,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//冻结班级
|
|
//冻结班级
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds, 1);
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds, 1);
|
|
//冻结所选班级的课程
|
|
//冻结所选班级的课程
|
|
- courseScheduleDao.batchUpdateLockByCourseIds(allLockCourseIds, 1,null);
|
|
|
|
|
|
+ courseScheduleDao.batchUpdateLockByCourseIds(allLockCourseIds, 1, null);
|
|
httpResponseResult.setMsg("学员班级调整申请已提交,缴费项目审核中");
|
|
httpResponseResult.setMsg("学员班级调整申请已提交,缴费项目审核中");
|
|
}
|
|
}
|
|
return httpResponseResult;
|
|
return httpResponseResult;
|
|
@@ -4388,11 +4388,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
classGroupIds.add(masterClassGroupId);
|
|
classGroupIds.add(masterClassGroupId);
|
|
List<ClassGroup> byClassGroupIds = classGroupDao.findByClassGroupIds(classGroupIds, null);
|
|
List<ClassGroup> byClassGroupIds = classGroupDao.findByClassGroupIds(classGroupIds, null);
|
|
long count = byClassGroupIds.stream().map(e -> e.getMusicGroupId()).distinct().count();
|
|
long count = byClassGroupIds.stream().map(e -> e.getMusicGroupId()).distinct().count();
|
|
- if(count > 1){
|
|
|
|
|
|
+ if (count > 1) {
|
|
//获取分布默认的课程类型单价
|
|
//获取分布默认的课程类型单价
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
|
|
//主班乐团不能是系统收费团
|
|
//主班乐团不能是系统收费团
|
|
- if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
|
|
|
|
+ if (musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE) {
|
|
throw new BizException("操作失败:主班乐团不能是系统收费团");
|
|
throw new BizException("操作失败:主班乐团不能是系统收费团");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -4550,7 +4550,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(courseSchedule.getId());
|
|
List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(courseSchedule.getId());
|
|
for (CourseScheduleTeacherSalary teacherSalary : courseScheduleTeacherSalaries) {
|
|
for (CourseScheduleTeacherSalary teacherSalary : courseScheduleTeacherSalaries) {
|
|
//课酬调整后不能更新课酬
|
|
//课酬调整后不能更新课酬
|
|
- if(!teacherSalary.getEnableChangeSalary()){
|
|
|
|
|
|
+ if (!teacherSalary.getEnableChangeSalary()) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
List<TeacherDefaultMusicGroupSalary> teacherSalaryList = teacherDefaultMusicGroupSalaryService.getTeacherSalaryByUserIdAndType(teacherSalary.getUserId(), null, null);
|
|
List<TeacherDefaultMusicGroupSalary> teacherSalaryList = teacherDefaultMusicGroupSalaryService.getTeacherSalaryByUserIdAndType(teacherSalary.getUserId(), null, null);
|
|
@@ -4608,7 +4608,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//主班
|
|
//主班
|
|
Integer masterClassGroupId = mergeClassSplitClassAffirmDto.getMasterClassGroupId();
|
|
Integer masterClassGroupId = mergeClassSplitClassAffirmDto.getMasterClassGroupId();
|
|
//是否有预排课
|
|
//是否有预排课
|
|
- if(courseScheduleDao.queryPreCourseListByClassGroupId(masterClassGroupId).size() > 0){
|
|
|
|
|
|
+ if (courseScheduleDao.queryPreCourseListByClassGroupId(masterClassGroupId).size() > 0) {
|
|
throw new BizException("操作失败: 所选主班有预排课课程,请先完成预排课操作");
|
|
throw new BizException("操作失败: 所选主班有预排课课程,请先完成预排课操作");
|
|
}
|
|
}
|
|
//学员列表
|
|
//学员列表
|
|
@@ -4621,7 +4621,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//学员列表
|
|
//学员列表
|
|
List<Integer> classGroupIds = mergeClassSplitClassAffirmDto.getClassGroupIds();
|
|
List<Integer> classGroupIds = mergeClassSplitClassAffirmDto.getClassGroupIds();
|
|
//是否有预排课
|
|
//是否有预排课
|
|
- if(courseScheduleDao.queryPreCourseListByClassGroupIds(classGroupIds) > 0){
|
|
|
|
|
|
+ if (courseScheduleDao.queryPreCourseListByClassGroupIds(classGroupIds) > 0) {
|
|
throw new BizException("操作失败: 所选从班班有预排课课程,请先完成预排课操作");
|
|
throw new BizException("操作失败: 所选从班班有预排课课程,请先完成预排课操作");
|
|
}
|
|
}
|
|
//班级和学员关联
|
|
//班级和学员关联
|
|
@@ -4636,7 +4636,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
StudentRegistration studentRegistration = studentRegistrationDao.findApplyStudent(musicGroup.getId(), studentIds);
|
|
StudentRegistration studentRegistration = studentRegistrationDao.findApplyStudent(musicGroup.getId(), studentIds);
|
|
if (studentRegistration != null) {
|
|
if (studentRegistration != null) {
|
|
throw new BizException("操作失败: 学员 {}/{} 在 {} 中为报名状态不可合并",
|
|
throw new BizException("操作失败: 学员 {}/{} 在 {} 中为报名状态不可合并",
|
|
- studentRegistration.getName(),studentRegistration.getUserId(),musicGroup.getName());
|
|
|
|
|
|
+ studentRegistration.getName(), studentRegistration.getUserId(), musicGroup.getName());
|
|
}
|
|
}
|
|
//获取缴费状态在审核中或者已拒绝的缴费项目的学员
|
|
//获取缴费状态在审核中或者已拒绝的缴费项目的学员
|
|
String studentId = musicGroupPaymentCalenderDao.queryCalenderStudentIds(musicGroup.getId(), null);
|
|
String studentId = musicGroupPaymentCalenderDao.queryCalenderStudentIds(musicGroup.getId(), null);
|
|
@@ -4656,9 +4656,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
//给原价赋值,前端没传过来
|
|
//给原价赋值,前端没传过来
|
|
for (MusicGroupPaymentCalenderStudentDetail e : calenderStudentDetails) {
|
|
for (MusicGroupPaymentCalenderStudentDetail e : calenderStudentDetails) {
|
|
BigDecimal subtract = e.getMasterSubCoursePrice().subtract(e.getSubCourseAmount());
|
|
BigDecimal subtract = e.getMasterSubCoursePrice().subtract(e.getSubCourseAmount());
|
|
- if(subtract.compareTo(BigDecimal.ZERO) < 0){
|
|
|
|
|
|
+ if (subtract.compareTo(BigDecimal.ZERO) < 0) {
|
|
e.setCourseOriginalPrice(BigDecimal.ZERO);
|
|
e.setCourseOriginalPrice(BigDecimal.ZERO);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
e.setCourseOriginalPrice(subtract);
|
|
e.setCourseOriginalPrice(subtract);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -4716,7 +4716,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = calenderStudentDetails.stream().collect(Collectors.groupingBy(e -> e.getUserId()));
|
|
Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = calenderStudentDetails.stream().collect(Collectors.groupingBy(e -> e.getUserId()));
|
|
for (Map<Integer, String> classGroupStudent : classGroupStudents) {
|
|
for (Map<Integer, String> classGroupStudent : classGroupStudents) {
|
|
Integer classGroupId = classGroupStudent.keySet().iterator().next();
|
|
Integer classGroupId = classGroupStudent.keySet().iterator().next();
|
|
- studentRegistrationService.insertStudent(classGroupStudent.get(classGroupId), musicGroupDao.findByClassGroupId(classGroupId).getId(), musicGroup.getId(), collect,paymentCalenderDto.getBatchNo());
|
|
|
|
|
|
+ studentRegistrationService.insertStudent(classGroupStudent.get(classGroupId), musicGroupDao.findByClassGroupId(classGroupId).getId(), musicGroup.getId(), collect, paymentCalenderDto.getBatchNo());
|
|
}
|
|
}
|
|
List<Map> classGroupStudents1 = JSON.parseArray(musicGroupStudentClassAdjust.getClassGroupStudents(), Map.class);
|
|
List<Map> classGroupStudents1 = JSON.parseArray(musicGroupStudentClassAdjust.getClassGroupStudents(), Map.class);
|
|
spanGroupClassAdjustPass(masterClassGroupId, studentIds, courseIds, classGroupStudents1, allLockCourseIds, paymentCalenderDto.getBatchNo(), masterTotalPrice);
|
|
spanGroupClassAdjustPass(masterClassGroupId, studentIds, courseIds, classGroupStudents1, allLockCourseIds, paymentCalenderDto.getBatchNo(), masterTotalPrice);
|
|
@@ -4725,7 +4725,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
// 冻结班级
|
|
// 冻结班级
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds, 1);
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds, 1);
|
|
// 冻结所选班级的课程
|
|
// 冻结所选班级的课程
|
|
- courseScheduleDao.batchUpdateLockByCourseIds(allLockCourseIds, 1,null);
|
|
|
|
|
|
+ courseScheduleDao.batchUpdateLockByCourseIds(allLockCourseIds, 1, null);
|
|
httpResponseResult.setMsg("操作成功:学员班级调整申请已提交,缴费项目审核中");
|
|
httpResponseResult.setMsg("操作成功:学员班级调整申请已提交,缴费项目审核中");
|
|
}
|
|
}
|
|
return httpResponseResult;
|
|
return httpResponseResult;
|
|
@@ -4761,7 +4761,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
courseScheduleDao.deleteMusicGroupCourseSchedulesWithStudents(courseIds, studentIds);
|
|
courseScheduleDao.deleteMusicGroupCourseSchedulesWithStudents(courseIds, studentIds);
|
|
}
|
|
}
|
|
//解冻课程
|
|
//解冻课程
|
|
- courseScheduleDao.batchUpdateLockByCourseIds(allLockCourseIds, 0,null);
|
|
|
|
|
|
+ courseScheduleDao.batchUpdateLockByCourseIds(allLockCourseIds, 0, null);
|
|
//解冻班级
|
|
//解冻班级
|
|
classGroupIds.add(masterClassGroupId);
|
|
classGroupIds.add(masterClassGroupId);
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds, 0);
|
|
classGroupDao.batchUpdateLockByClassGroupIds(classGroupIds, 0);
|
|
@@ -4784,10 +4784,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
@Override
|
|
@Override
|
|
public List<CourseSchedule> queryPreCourseList(Integer classGroupId) {
|
|
public List<CourseSchedule> queryPreCourseList(Integer classGroupId) {
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId);
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.queryPreCourseListByClassGroupId(classGroupId);
|
|
- if(courseSchedules.size() > 0){
|
|
|
|
|
|
+ if (courseSchedules.size() > 0) {
|
|
List<Long> courseIdList = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
List<Long> courseIdList = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
- Map<Long, String> bishopTeacherMap = MapUtil.convertMybatisMap(courseScheduleTeacherSalaryDao.queryTeacherNameMap(courseIdList,"BISHOP"));
|
|
|
|
- Map<Long, String> teachingTeacherMap = MapUtil.convertMybatisMap(courseScheduleTeacherSalaryDao.queryTeacherNameMap(courseIdList,"TEACHING"));
|
|
|
|
|
|
+ Map<Long, String> bishopTeacherMap = MapUtil.convertMybatisMap(courseScheduleTeacherSalaryDao.queryTeacherNameMap(courseIdList, "BISHOP"));
|
|
|
|
+ Map<Long, String> teachingTeacherMap = MapUtil.convertMybatisMap(courseScheduleTeacherSalaryDao.queryTeacherNameMap(courseIdList, "TEACHING"));
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
courseSchedule.setActualTeacherName(bishopTeacherMap.get(courseSchedule.getId()));
|
|
courseSchedule.setActualTeacherName(bishopTeacherMap.get(courseSchedule.getId()));
|
|
courseSchedule.setTeachingTeacherNames(teachingTeacherMap.get(courseSchedule.getId()));
|
|
courseSchedule.setTeachingTeacherNames(teachingTeacherMap.get(courseSchedule.getId()));
|