|
@@ -3724,23 +3724,22 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
|
|
|
BigDecimal masterTotalPrice = getMasterTotalPrice(masterClassGroupId);
|
|
|
//是否有需要审核的缴费项目
|
|
|
- //将学员加入新乐团、扣除原乐团剩余课程余额、补充到现有乐团
|
|
|
List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = paymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
|
|
|
|
|
|
- Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = calenderStudentDetails.stream().collect(Collectors.groupingBy(e -> e.getUserId()));
|
|
|
- for (Map<Integer, String> classGroupStudent : classGroupStudents) {
|
|
|
- Integer classGroupId = classGroupStudent.keySet().iterator().next();
|
|
|
- studentRegistrationService.insertStudent(classGroupStudent.get(classGroupId),musicGroupDao.findByClassGroupId(classGroupId).getId(),musicGroup.getId(),collect);
|
|
|
- }
|
|
|
-
|
|
|
paymentCalenderDto.setMusicGroupId(musicGroup.getId());
|
|
|
-
|
|
|
- boolean containsAll = ListUtil.isEquals(musicGroupPaymentCalenderStudentDetails,calenderStudentDetails);
|
|
|
+ boolean containsAll = musicGroupPaymentCalenderStudentDetails.containsAll(calenderStudentDetails);
|
|
|
if(!containsAll){
|
|
|
paymentCalenderDto.setStatus(AUDITING);
|
|
|
}else {
|
|
|
paymentCalenderDto.setStatus(NO);
|
|
|
}
|
|
|
+
|
|
|
+ //将学员加入新乐团、扣除原乐团剩余课程余额、补充到现有乐团
|
|
|
+ Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = calenderStudentDetails.stream().collect(Collectors.groupingBy(e -> e.getUserId()));
|
|
|
+ for (Map<Integer, String> classGroupStudent : classGroupStudents) {
|
|
|
+ Integer classGroupId = classGroupStudent.keySet().iterator().next();
|
|
|
+ studentRegistrationService.insertStudent(classGroupStudent.get(classGroupId),musicGroupDao.findByClassGroupId(classGroupId).getId(),musicGroup.getId(),collect);
|
|
|
+ }
|
|
|
paymentCalenderDto.setPayUserType(MusicGroupPaymentCalender.PayUserType.STUDENT);
|
|
|
paymentCalenderDto.setPaymentType(SPAN_GROUP_CLASS_ADJUST);
|
|
|
//生成缴费项目
|