|
@@ -391,6 +391,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
public void createForMusicGroup(String musicGroupId, List<CourseSchedule> courseSchedules, List<Integer> studentIds) {
|
|
|
+
|
|
|
Map<Integer, List<CourseSchedule>> memberCourseMap = courseSchedules.stream().collect(Collectors.groupingBy(CourseSchedule::getMemberFlag));
|
|
|
Map<Long,List<Long>> courseCalenderMap = new HashMap<>(10);
|
|
|
for (Integer memberFlag : memberCourseMap.keySet()) {
|
|
@@ -424,7 +425,6 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
}
|
|
|
courseTypeCourseDurationMap.put(typeCoursesEntry.getKey(), sdMap);
|
|
|
}
|
|
|
-
|
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<>();
|
|
|
|
|
|
for (Integer studentId : studentIds) {
|
|
@@ -463,7 +463,8 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
cssp.setUserId(studentId);
|
|
|
//扣除可排课时长
|
|
|
//处理经营报表
|
|
|
- this.calcCourseMinutes(musicGroupPaymentStudentCourseDetails,courseDuration,cssp,musicGroupPaymentCalenders,courseCalenderMap);
|
|
|
+ this.calcCourseMinutes(musicGroupPaymentStudentCourseDetails,courseDuration,
|
|
|
+ cssp,musicGroupPaymentCalenders,courseCalenderMap);
|
|
|
typeCourseStudentPayments.add(cssp);
|
|
|
}
|
|
|
courseScheduleStudentPayments.addAll(typeCourseStudentPayments);
|
|
@@ -485,8 +486,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
private Boolean calcCourseMinutes(List<MusicGroupPaymentStudentCourseDetail> courseDetails,
|
|
|
Integer courseDuration,
|
|
|
CourseScheduleStudentPayment studentPayment,
|
|
|
- List<MusicGroupPaymentCalender> musicGroupPaymentCalenders,
|
|
|
- Map<Long,List<Long>> courseCalenderMap){
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenders,Map<Long,List<Long>> courseCalenderMap){
|
|
|
Boolean result = true;
|
|
|
Integer courseMinutes = courseDuration;
|
|
|
Map<Long, List<MusicGroupPaymentCalender>> calenderMap = musicGroupPaymentCalenders.stream().collect(Collectors.groupingBy(MusicGroupPaymentCalender::getId));
|
|
@@ -540,6 +540,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
// operatingReportCloudService.updateSet(calender,courseIds);
|
|
|
}
|
|
|
if(courseMinutes == 0){
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
}
|