|  | @@ -299,17 +299,22 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |                      musicGroupSubjectPlan.setApplyStudentNum(e.getRegisterIdList().size());
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | -			if (studentRegistrationList.size() > 0) {
 | 
	
		
			
				|  |  | -				studentRegistrationDao.batchInsert(studentRegistrationList);
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  |              musicGroup.setStatus(MusicGroupStatusEnum.PAY);
 | 
	
		
			
				|  |  |  			//是否是免费团
 | 
	
		
			
				|  |  |              if (musicGroupSubjectPlans != null && musicGroupSubjectPlans.size() > 0) {
 | 
	
		
			
				|  |  |                  int size = musicGroupSubjectPlans.stream().filter(e -> e.getFee().compareTo(BigDecimal.ZERO) == 1).collect(Collectors.toList()).size();
 | 
	
		
			
				|  |  |                  if(size < 1){
 | 
	
		
			
				|  |  |                      musicGroup.setStatus(MusicGroupStatusEnum.PREPARE);
 | 
	
		
			
				|  |  | +                    if (studentRegistrationList.size() > 0) {
 | 
	
		
			
				|  |  | +                        //修改为已缴费
 | 
	
		
			
				|  |  | +                        studentRegistrationList.forEach(e->e.setPaymentStatus(PaymentStatusEnum.YES));
 | 
	
		
			
				|  |  | +                        studentRegistrationDao.batchInsert(studentRegistrationList);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            if (studentRegistrationList.size() > 0) {
 | 
	
		
			
				|  |  | +                studentRegistrationDao.batchInsert(studentRegistrationList);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              musicGroupDao.update(musicGroup);
 | 
	
		
			
				|  |  |              musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "跨团调整", sysUser.getId(),""));
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -642,9 +647,21 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |              musicGroupSubjectPlanDao.delByMusicGroupId(musicGroupId);
 | 
	
		
			
				|  |  |              //删除原有的声部商品组合
 | 
	
		
			
				|  |  |              musicGroupSubjectGoodsGroupDao.delByMusicGroupId(subFeeSettingDto.getMusicGroupId());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -			if (subFeeSettingDto.getMusicGroupSubjectPlans() != null && subFeeSettingDto.getMusicGroupSubjectPlans().size() > 0) {
 | 
	
		
			
				|  |  | -				musicGroupSubjectPlanDao.batchAdd(subFeeSettingDto.getMusicGroupSubjectPlans(), musicGroupId);
 | 
	
		
			
				|  |  | +            //如果是进行中,补充缴费信息
 | 
	
		
			
				|  |  | +            if(musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS){
 | 
	
		
			
				|  |  | +                List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
 | 
	
		
			
				|  |  | +                if(musicGroupStudentFees != null && musicGroupStudentFees.size() > 0){
 | 
	
		
			
				|  |  | +                    Date nextPaymentDate = musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId);
 | 
	
		
			
				|  |  | +                    musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees,nextPaymentDate);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            List<MusicGroupSubjectPlan> musicGroupSubjectPlans = subFeeSettingDto.getMusicGroupSubjectPlans();
 | 
	
		
			
				|  |  | +            if (musicGroupSubjectPlans != null && musicGroupSubjectPlans.size() > 0) {
 | 
	
		
			
				|  |  | +                musicGroupSubjectPlans.forEach(e->{
 | 
	
		
			
				|  |  | +                    //修改课程费用
 | 
	
		
			
				|  |  | +                    musicGroupStudentFeeDao.updateCourseFee(musicGroupId,e.getSubjectId(),e.getFee());
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +				musicGroupSubjectPlanDao.batchAdd(musicGroupSubjectPlans, musicGroupId);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			if (subFeeSettingDto.getMusicGroupSubjectGoodsGroups() != null && subFeeSettingDto.getMusicGroupSubjectGoodsGroups().size() > 0) {
 | 
	
		
			
				|  |  |  				musicGroupSubjectGoodsGroupDao.batchInsert(subFeeSettingDto.getMusicGroupSubjectGoodsGroups(), musicGroupId);
 | 
	
	
		
			
				|  | @@ -1039,7 +1056,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |  				//更新班级人数
 | 
	
		
			
				|  |  |  				classGroupDao.batchUpdateStudentNumMinusOne(classGroupIdList);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                List<ImGroupModel> imGroupModels = new ArrayList<ImGroupModel>();
 | 
	
		
			
				|  |  | +                List<ImGroupModel> imGroupModels = new ArrayList<>();
 | 
	
		
			
				|  |  |                  ImGroupMember[] imGroupMember = {new ImGroupMember(userId.toString())};
 | 
	
		
			
				|  |  |                  for (Integer classGroupId : classGroupIdList) {
 | 
	
		
			
				|  |  |                      imGroupModels.add(new ImGroupModel(classGroupId + "",imGroupMember,""));
 | 
	
	
		
			
				|  | @@ -1518,10 +1535,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |              throw new Exception("用户信息获取失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          String musicGroupId = subFeeSettingDto.getMusicGroup().getId();
 | 
	
		
			
				|  |  | -        if(musicGroupDao.get(musicGroupId) == null){
 | 
	
		
			
				|  |  | +        MusicGroup group = musicGroupDao.get(musicGroupId);
 | 
	
		
			
				|  |  | +        MusicGroup musicGroup = subFeeSettingDto.getMusicGroup();
 | 
	
		
			
				|  |  | +        if(group == null){
 | 
	
		
			
				|  |  |              throw new Exception("乐团信息不存在");
 | 
	
		
			
				|  |  | +        }else if(group.getSchoolId() != musicGroup.getSchoolId()){
 | 
	
		
			
				|  |  | +            //如果已生成课表,那么修改未上课时教学点
 | 
	
		
			
				|  |  | +            courseScheduleDao.updateCourseScheduleSchool("MUSIC",musicGroupId,musicGroup.getSchoolId());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        MusicGroup musicGroup = subFeeSettingDto.getMusicGroup();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Date date = new Date();
 | 
	
		
			
				|  |  |          List<Integer> months = subFeeSettingDto.getMonths();
 | 
	
	
		
			
				|  | @@ -1644,6 +1665,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 | 
	
		
			
				|  |  |          MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
 | 
	
		
			
				|  |  |          musicGroup.setEducationalTeacherName(teacherDao.queryNameById(musicGroup.getEducationalTeacherId()));
 | 
	
		
			
				|  |  |          musicGroup.setTeamTeacherName(teacherDao.queryNameById(musicGroup.getTeamTeacherId()));
 | 
	
		
			
				|  |  | +        musicGroup.setDirectorUserName(teacherDao.queryNameById(musicGroup.getDirectorUserId()));
 | 
	
		
			
				|  |  |          Organization organization = organizationDao.get(musicGroup.getOrganId());
 | 
	
		
			
				|  |  |          if(organization != null){
 | 
	
		
			
				|  |  |              musicGroup.setOrganName(organization.getName());
 |