|
@@ -1121,6 +1121,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
List<String> orderDetailTypes = studentPaymentOrderDetailDao.getOrderDetailType(studentPaymentOrder.getId());
|
|
|
List<MusicGroupPaymentCalenderCourseSettings> courseSettings = musicGroupPaymentCalenderCourseSettingsDao.getWithPaymentCalender(musicGroupRegCalender.getId());
|
|
|
BigDecimal courseTotalPrice = courseSettings.stream().filter(e -> orderDetailTypes.contains(e.getCourseType().getCode())).map(MusicGroupPaymentCalenderCourseSettings::getCourseCurrentPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal optionalCourseFee = courseSettings.stream().filter(MusicGroupPaymentCalenderCourseSettings::getIsStudentOptional).filter(e -> orderDetailTypes.contains(e.getCourseType().getCode())).map(MusicGroupPaymentCalenderCourseSettings::getCourseCurrentPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
List<MusicGroupPaymentStudentCourseDetail> musicGroupPaymentStudentCourseDetails = new ArrayList<>();
|
|
|
|
|
@@ -1133,7 +1134,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
if (currentPaymentCalenderId.longValue() == musicGroupPaymentCalender.getId()) {
|
|
|
musicGroupPaymentCalenderDetail.setExpectAmount(courseTotalPrice);
|
|
|
if (studentPaymentOrder.getCourseRemitFee() != null && (studentPaymentOrder.getCourseRemitFee().compareTo(BigDecimal.ZERO) > 0)) {
|
|
|
- musicGroupPaymentCalenderDetail.setActualAmount(BigDecimal.ZERO);
|
|
|
+ musicGroupPaymentCalenderDetail.setActualAmount(optionalCourseFee);
|
|
|
} else {
|
|
|
musicGroupPaymentCalenderDetail.setActualAmount(courseTotalPrice);
|
|
|
}
|