|
@@ -16,6 +16,7 @@ import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
|
|
|
import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
|
|
|
import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
|
|
|
|
|
+import com.ym.mec.biz.dal.enums.StudentMusicGroupStatusEnum;
|
|
|
import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
|
|
import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
|
|
|
import com.ym.mec.biz.service.ClassGroupService;
|
|
import com.ym.mec.biz.service.ClassGroupService;
|
|
|
import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
|
|
import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
|
|
@@ -86,6 +87,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrganizationDao organizationDao;
|
|
private OrganizationDao organizationDao;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
|
+ private StudentRegistrationDao studentRegistrationDao;
|
|
|
|
|
+ @Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
private SysMessageService sysMessageService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
private SysUserFeignService sysUserFeignService;
|
|
@@ -188,7 +191,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
musicGroupPaymentCalender.setPayUserType(STUDENT);
|
|
musicGroupPaymentCalender.setPayUserType(STUDENT);
|
|
|
musicGroupPaymentCalender.setIsGiveMusicNetwork(false);
|
|
musicGroupPaymentCalender.setIsGiveMusicNetwork(false);
|
|
|
- musicGroupPaymentCalender.setExpectNum(1);
|
|
|
|
|
|
|
+ if(musicGroupPaymentCalender.getStatus() != PaymentCalenderStatusEnum.AUDITING){
|
|
|
|
|
+ musicGroupPaymentCalender.setExpectNum(1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (musicGroupPaymentCalender.getStatus() != PaymentCalenderStatusEnum.AUDITING) {
|
|
if (musicGroupPaymentCalender.getStatus() != PaymentCalenderStatusEnum.AUDITING) {
|
|
|
if (date.after(musicGroupPaymentCalender.getStartPaymentDate())) {
|
|
if (date.after(musicGroupPaymentCalender.getStartPaymentDate())) {
|
|
@@ -297,6 +302,13 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
if(musicGroup == null){
|
|
if(musicGroup == null){
|
|
|
throw new BizException("乐团查询失败,请检查参数");
|
|
throw new BizException("乐团查询失败,请检查参数");
|
|
|
}
|
|
}
|
|
|
|
|
+ //如果是进行中加学生,查看学员是否在团
|
|
|
|
|
+ if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(musicGroupId, Integer.parseInt(musicGroupPaymentCalender.getStudentIds()));
|
|
|
|
|
+ if(studentRegistration.getMusicGroupStatus() == StudentMusicGroupStatusEnum.QUIT){
|
|
|
|
|
+ throw new BizException("修改失败:学员已退团");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
|
|
|
|
|
@@ -374,6 +386,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}else {
|
|
}else {
|
|
|
|
|
+ if(musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT){
|
|
|
|
|
+ musicGroupPaymentCalender.setExpectNum(1);
|
|
|
|
|
+ }
|
|
|
Set<Integer> roleIds = new HashSet<>(1);
|
|
Set<Integer> roleIds = new HashSet<>(1);
|
|
|
roleIds.add(SysUserRole.ADMINISTRATOR);
|
|
roleIds.add(SysUserRole.ADMINISTRATOR);
|
|
|
Organization organization = organizationDao.get(musicGroup.getOrganId());
|
|
Organization organization = organizationDao.get(musicGroup.getOrganId());
|
|
@@ -613,7 +628,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
}
|
|
|
musicGroupPaymentCalender.setAuditMemo(auditMemo);
|
|
musicGroupPaymentCalender.setAuditMemo(auditMemo);
|
|
|
musicGroupPaymentCalender.setUpdateTime(date);
|
|
musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
- musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
|
|
|
|
+
|
|
|
//如果是报名,并且所有的报名都审核通过,需要修改乐团状态
|
|
//如果是报名,并且所有的报名都审核通过,需要修改乐团状态
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
|
int count = musicGroupPaymentCalenderDao.countAuditReject(musicGroupPaymentCalender.getMusicGroupId(),calenderId);
|
|
int count = musicGroupPaymentCalenderDao.countAuditReject(musicGroupPaymentCalender.getMusicGroupId(),calenderId);
|
|
@@ -633,9 +648,11 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
sysMessageService.batchSeoMessage(musicGroupDao.queryUserIdByRoleId(roleIds, musicGroup.getOrganId()), MessageTypeEnum.BACKSTAGE_CREATE_MUSIC_GROUP_APPLY, "", sysUser.getUsername());
|
|
sysMessageService.batchSeoMessage(musicGroupDao.queryUserIdByRoleId(roleIds, musicGroup.getOrganId()), MessageTypeEnum.BACKSTAGE_CREATE_MUSIC_GROUP_APPLY, "", sysUser.getUsername());
|
|
|
}
|
|
}
|
|
|
}else if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
}else if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
|
|
+ musicGroupPaymentCalender.setExpectNum(1);
|
|
|
List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalenderCourseSettingsDao.queryCalenderCourseSettings(calenderId);
|
|
List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalenderCourseSettingsDao.queryCalenderCourseSettings(calenderId);
|
|
|
addStudent(musicGroupPaymentCalender,musicGroupPaymentCalenderCourseSettings);
|
|
addStudent(musicGroupPaymentCalender,musicGroupPaymentCalenderCourseSettings);
|
|
|
}
|
|
}
|
|
|
|
|
+ musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|