|  | @@ -41,6 +41,7 @@ import java.math.BigDecimal;
 | 
											
												
													
														|  |  import java.time.*;
 |  |  import java.time.*;
 | 
											
												
													
														|  |  import java.time.format.DateTimeFormatter;
 |  |  import java.time.format.DateTimeFormatter;
 | 
											
												
													
														|  |  import java.util.*;
 |  |  import java.util.*;
 | 
											
												
													
														|  | 
 |  | +import java.util.function.Consumer;
 | 
											
												
													
														|  |  import java.util.stream.Collectors;
 |  |  import java.util.stream.Collectors;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import static com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType.*;
 |  |  import static com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType.*;
 | 
											
										
											
												
													
														|  | @@ -4592,11 +4593,15 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          paymentCalenderDto.setMusicGroupId(musicGroup.getId());
 |  |          paymentCalenderDto.setMusicGroupId(musicGroup.getId());
 | 
											
												
													
														|  |          boolean containsAll = musicGroupPaymentCalenderStudentDetails.containsAll(calenderStudentDetails);
 |  |          boolean containsAll = musicGroupPaymentCalenderStudentDetails.containsAll(calenderStudentDetails);
 | 
											
												
													
														|  | -        BigDecimal originalPrice = BigDecimal.ZERO;
 |  | 
 | 
											
												
													
														|  | -        if(musicGroupPaymentCalenderStudentDetails != null && musicGroupPaymentCalenderStudentDetails.size() > 0){
 |  | 
 | 
											
												
													
														|  | -            originalPrice = musicGroupPaymentCalenderStudentDetails.stream().map(e -> e.getCourseCurrentPrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        //给原价赋值,前端没传过来
 | 
											
												
													
														|  | 
 |  | +        for (MusicGroupPaymentCalenderStudentDetail e : calenderStudentDetails) {
 | 
											
												
													
														|  | 
 |  | +            BigDecimal subtract = e.getMasterSubCoursePrice().subtract(e.getSubCourseAmount());
 | 
											
												
													
														|  | 
 |  | +            if(subtract.compareTo(BigDecimal.ZERO) < 0){
 | 
											
												
													
														|  | 
 |  | +                e.setCourseOriginalPrice(BigDecimal.ZERO);
 | 
											
												
													
														|  | 
 |  | +            }else {
 | 
											
												
													
														|  | 
 |  | +                e.setCourseOriginalPrice(subtract);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -        paymentCalenderDto.setOriginalAmount(originalPrice);
 |  | 
 | 
											
												
													
														|  |          if (!containsAll) {
 |  |          if (!containsAll) {
 | 
											
												
													
														|  |              paymentCalenderDto.setStatus(AUDITING);
 |  |              paymentCalenderDto.setStatus(AUDITING);
 | 
											
												
													
														|  |          } else {
 |  |          } else {
 | 
											
										
											
												
													
														|  | @@ -4613,7 +4618,6 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
											
												
													
														|  |          paymentCalenderDto.setPaymentType(SPAN_GROUP_CLASS_ADJUST);
 |  |          paymentCalenderDto.setPaymentType(SPAN_GROUP_CLASS_ADJUST);
 | 
											
												
													
														|  |          //生成缴费项目
 |  |          //生成缴费项目
 | 
											
												
													
														|  |          paymentCalenderDto.setMasterTotalPrice(masterTotalPrice);
 |  |          paymentCalenderDto.setMasterTotalPrice(masterTotalPrice);
 | 
											
												
													
														|  | -//        paymentCalenderDto.setIsGiveMusicNetwork(false);
 |  | 
 | 
											
												
													
														|  |          paymentCalenderDto.setStudentIds(StringUtils.join(studentIds, ","));
 |  |          paymentCalenderDto.setStudentIds(StringUtils.join(studentIds, ","));
 | 
											
												
													
														|  |          musicGroupPaymentCalenderService.create(paymentCalenderDto);
 |  |          musicGroupPaymentCalenderService.create(paymentCalenderDto);
 | 
											
												
													
														|  |          //记录申请信息
 |  |          //记录申请信息
 |