Explorar o código

审核列表增加不包含淘气过滤条件

周箭河 %!s(int64=4) %!d(string=hai) anos
pai
achega
f06de5b2a6

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -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);
                 }