|
@@ -1182,6 +1182,13 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
totalOriginPriceMap.put(musicGroupPaymentCalenderCourseSettings.getCourseType(), musicGroupPaymentCalenderCourseSettings.getCourseOriginalPrice());
|
|
totalOriginPriceMap.put(musicGroupPaymentCalenderCourseSettings.getCourseType(), musicGroupPaymentCalenderCourseSettings.getCourseOriginalPrice());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ List<Integer> classGroupIds = classGroupList.stream().map(ClassGroup::getId).collect(Collectors.toList());
|
|
|
|
+ List<CourseScheduleStudentPayment> ccs = courseScheduleStudentPaymentDao.getWithClassGroupIds(classGroupIds, studentId);
|
|
|
|
+ Set<Long> existCourseIds = new HashSet<>();
|
|
|
|
+ if(!CollectionUtils.isEmpty(ccs)){
|
|
|
|
+ existCourseIds = ccs.stream().map(CourseScheduleStudentPayment::getCourseScheduleId).collect(Collectors.toSet());;
|
|
|
|
+ }
|
|
|
|
+
|
|
Map<CourseScheduleType, BigDecimal> totalPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalOrignPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
Map<CourseScheduleType, BigDecimal> totalOrignPriceMap = new HashMap<CourseSchedule.CourseScheduleType, BigDecimal>();
|
|
|
|
|
|
@@ -1205,6 +1212,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
// 3、学生加入级未开始课程
|
|
// 3、学生加入级未开始课程
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroup.getId());
|
|
List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroup.getId());
|
|
for (CourseSchedule courseSchedule : courseScheduleList) {
|
|
for (CourseSchedule courseSchedule : courseScheduleList) {
|
|
|
|
+ if(existCourseIds.contains(courseSchedule.getId())){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
|
|
CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
|
|
courseScheduleStudentPayment.setCourseSchedule(courseSchedule);
|
|
courseScheduleStudentPayment.setCourseSchedule(courseSchedule);
|
|
courseScheduleStudentPayment.setGroupType(classGroup.getGroupType());
|
|
courseScheduleStudentPayment.setGroupType(classGroup.getGroupType());
|
|
@@ -1212,6 +1223,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
courseScheduleStudentPayment.setUserId(studentId);
|
|
courseScheduleStudentPayment.setUserId(studentId);
|
|
courseScheduleStudentPayment.setBatchNo(batchNo);
|
|
courseScheduleStudentPayment.setBatchNo(batchNo);
|
|
|
|
+ courseScheduleStudentPayment.setBeMerged(false);
|
|
|
|
|
|
unitPrice = unitPriceMap.get(courseSchedule.getType());
|
|
unitPrice = unitPriceMap.get(courseSchedule.getType());
|
|
if (unitPrice != null) {
|
|
if (unitPrice != null) {
|