|
@@ -2742,24 +2742,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
} else {
|
|
|
throw new BizException("当前乐团状态不支持此操作");
|
|
|
}
|
|
|
+ //新建团:(乐团合作单位没有进行中 、暂停、关闭 的乐团)
|
|
|
+ //若乐团新建团,则操作【确认开团】时,若【已缴费】学员达到98人,则无需对【未缴费】学员新增回访
|
|
|
+ //若乐团不是新建团,则操作【确认开团】时,若【已缴费】学员达到58人,则无需对【未缴费】学员新增回访
|
|
|
//报名未交费的学生,完成回访才能到下一步
|
|
|
- boolean hasNoVisit = false;
|
|
|
- StringBuilder tipsMsg = new StringBuilder();
|
|
|
- List<StudentRegistration> noPaymentStudents = studentRegistrationDao.getNoPaymentStudent(musicGroupId);
|
|
|
- if (noPaymentStudents.size() > 0) {
|
|
|
- tipsMsg.append("以下学生未完成回访,");
|
|
|
- List<Integer> studentIds = noPaymentStudents.stream().map(StudentRegistration::getUserId).collect(Collectors.toList());
|
|
|
- List<Integer> musicGroupVisitStudent = studentVisitDao.getMusicGroupVisitStudent(musicGroupId, studentIds);
|
|
|
- for (StudentRegistration noPaymentStudent : noPaymentStudents) {
|
|
|
- if (!musicGroupVisitStudent.contains(noPaymentStudent.getUserId())) {
|
|
|
- hasNoVisit = true;
|
|
|
- tipsMsg.append(noPaymentStudent.getName()).append("(").append(noPaymentStudent.getUserId()).append(")、");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (hasNoVisit) {
|
|
|
- throw new BizException(tipsMsg.append("请完成回访").toString());
|
|
|
- }
|
|
|
+
|
|
|
+ //获取乐团合作单位乐团数量
|
|
|
+ musicGroupDao.getCooperationMusicGroupNum(musicGroup.getCooperationOrganId(),musicGroupId);
|
|
|
+ checkStudentVisit(musicGroupId);
|
|
|
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, event, sysUser.getId(), ""));
|
|
|
musicGroup.setStatus(MusicGroupStatusEnum.PREPARE);
|
|
@@ -2788,6 +2778,26 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
sysMessageService.batchSeoMessage(integers, MessageTypeEnum.BACKSTAGE_MUSIC_GROUP_MARKING, "", musicGroup.getName());
|
|
|
}
|
|
|
|
|
|
+ private void checkStudentVisit(String musicGroupId){
|
|
|
+ boolean hasNoVisit = false;
|
|
|
+ StringBuilder tipsMsg = new StringBuilder();
|
|
|
+ List<StudentRegistration> noPaymentStudents = studentRegistrationDao.getNoPaymentStudent(musicGroupId);
|
|
|
+ if (noPaymentStudents.size() > 0) {
|
|
|
+ tipsMsg.append("以下学生未完成回访,");
|
|
|
+ List<Integer> studentIds = noPaymentStudents.stream().map(StudentRegistration::getUserId).collect(Collectors.toList());
|
|
|
+ List<Integer> musicGroupVisitStudent = studentVisitDao.getMusicGroupVisitStudent(musicGroupId, studentIds);
|
|
|
+ for (StudentRegistration noPaymentStudent : noPaymentStudents) {
|
|
|
+ if (!musicGroupVisitStudent.contains(noPaymentStudent.getUserId())) {
|
|
|
+ hasNoVisit = true;
|
|
|
+ tipsMsg.append(noPaymentStudent.getName()).append("(").append(noPaymentStudent.getUserId()).append(")、");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (hasNoVisit) {
|
|
|
+ throw new BizException(tipsMsg.append("请完成回访").toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public List<StudentRegistration> addMusicGroupRegs(String musicGroupId, List<Long> registerIds) throws Exception {
|