|
@@ -32,6 +32,7 @@ import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
+import com.ym.mec.util.collection.ListUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -3723,21 +3724,22 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
|
|
|
BigDecimal masterTotalPrice = getMasterTotalPrice(masterClassGroupId);
|
|
|
//是否有需要审核的缴费项目
|
|
|
- //将学员加入新乐团、扣除原乐团剩余课程余额、补充到现有乐团
|
|
|
- Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = musicGroupPaymentCalenderStudentDetails.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);
|
|
|
- }
|
|
|
+ List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = paymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
|
|
|
|
|
|
paymentCalenderDto.setMusicGroupId(musicGroup.getId());
|
|
|
- List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = paymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
|
|
|
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);
|
|
|
//生成缴费项目
|