|  | @@ -295,6 +295,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 | 
	
		
			
				|  |  |          BigDecimal memberActualAmount = musicGroupPaymentCalenderMemberService.getActualAmount(musicGroupPaymentBaseCalender);
 | 
	
		
			
				|  |  |          BigDecimal repairActualAmount = musicGroupPaymentCalenderRepairService.getActualAmount(musicGroupPaymentBaseCalender);
 | 
	
		
			
				|  |  |          BigDecimal activityActualAmount = musicGroupPaymentCalenderActivityService.getActualAmount(musicGroupPaymentBaseCalender);
 | 
	
		
			
				|  |  | +        if(memberActualAmount.compareTo(BigDecimal.ZERO) > 0 && (courseActualAmount.compareTo(BigDecimal.ZERO) == 0 || activityActualAmount.compareTo(BigDecimal.ZERO) == 0)){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          BigDecimal actualTotalAmount = courseActualAmount.add(memberActualAmount)
 | 
	
		
			
				|  |  |                  .add(repairActualAmount)
 | 
	
	
		
			
				|  | @@ -1375,30 +1378,4 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 | 
	
		
			
				|  |  |      public MusicGroupPaymentCalender findByMusicGroupRegCalender(String musicGroupId) {
 | 
	
		
			
				|  |  |          return musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
 | 
	
		
			
				|  |  | -    public MusicGroupStudentFee updateCalender(Long calenderDetailId, Integer userId) {
 | 
	
		
			
				|  |  | -        Date date = new Date();
 | 
	
		
			
				|  |  | -        MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.get(calenderDetailId);
 | 
	
		
			
				|  |  | -        MusicGroupPaymentCalender calender = this.get(calenderDetail.getMusicGroupPaymentCalenderId());
 | 
	
		
			
				|  |  | -        MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId, calender.getMusicGroupId());
 | 
	
		
			
				|  |  | -//		if(calender.getIsGiveMusicNetwork() && musicGroupStudentFee != null){
 | 
	
		
			
				|  |  | -//			//赠送网管课
 | 
	
		
			
				|  |  | -//			musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getRemainNetworkClassTimes() + 1);
 | 
	
		
			
				|  |  | -//		}
 | 
	
		
			
				|  |  | -        //更新学生的缴费记录状态
 | 
	
		
			
				|  |  | -        calenderDetail.setPaymentStatus(MusicGroupStudentFee.PaymentStatus.PAID_COMPLETED);
 | 
	
		
			
				|  |  | -//		calenderDetail.setActualAmount(calenderDetail.getExpectAmount().add(calenderDetail.getExpectMemberAmount()));
 | 
	
		
			
				|  |  | -        calenderDetail.setPayTime(date);
 | 
	
		
			
				|  |  | -        calenderDetail.setUpdateTime(date);
 | 
	
		
			
				|  |  | -        musicGroupPaymentCalenderDetailDao.update(calenderDetail);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        //更新实际缴费人数
 | 
	
		
			
				|  |  | -        Integer actualNum = calender.getActualNum() == null ? 0 : calender.getActualNum();
 | 
	
		
			
				|  |  | -        calender.setActualNum(actualNum + 1);
 | 
	
		
			
				|  |  | -        calender.setUpdateTime(date);
 | 
	
		
			
				|  |  | -        musicGroupPaymentCalenderDao.update(calender);
 | 
	
		
			
				|  |  | -        return musicGroupStudentFee;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  }
 |