|
@@ -791,6 +791,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean finishPreApply(String musicGroupId, boolean isCheckStudentNum) {
|
|
|
+
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null || sysUser.getId() == null) {
|
|
|
+ throw new BizException("请重新登录");
|
|
|
+ }
|
|
|
MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
if (musicGroup == null) {
|
|
|
throw new BizException("乐团信息查询失败");
|
|
@@ -812,17 +817,34 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
|
|
|
+ musicGroup.setStatus(MusicGroupStatusEnum.PAY);
|
|
|
musicGroup.setUpdateTime(new Date());
|
|
|
musicGroupDao.update(musicGroup);
|
|
|
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (sysUser == null || sysUser.getId() == null) {
|
|
|
- throw new BizException("请重新登录");
|
|
|
- }
|
|
|
-
|
|
|
//记录操作日志
|
|
|
- musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "预报名完成(预报名 -> 报名中)", sysUser.getId(), ""));
|
|
|
+ musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "预报名完成(预报名 -> 报名缴费中)", sysUser.getId(), ""));
|
|
|
+
|
|
|
+ studentRegistrationDao.musicGroupOpenPay(musicGroupId, PaymentStatusEnum.OPEN);
|
|
|
+ MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
+ if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
+ regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
|
+ regCalender.setUpdateTime(new Date());
|
|
|
+ musicGroupPaymentCalenderDao.update(regCalender);
|
|
|
+ }
|
|
|
+ //三方乐团不发送缴费通知
|
|
|
+ if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
+ List<Map<Integer, String>> mapList = studentRegistrationDao.findMapByMusicGroupId(musicGroupId, 0);
|
|
|
+ //获取所有已报名学员列表
|
|
|
+ HashMap<Integer, String> map = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(mapList)), HashMap.class);
|
|
|
+ if (map != null && map.size() > 0) {
|
|
|
+ String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + musicGroupId;
|
|
|
+// String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.AWSMS, MessageTypeEnum.SMS_PAYMENT_MESSAGE,
|
|
|
+ map, null, 0, "", "", musicGroup.getName(), studentApplyUrl);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sendSeoMessageSource.sendSeoMessage(musicGroup.getOrganId(), new SysUserRoleEnum[]{ORGAN_MANAGER}, null,
|
|
|
+ musicGroup.getEducationalTeacherId(), MessageTypeEnum.BACKSTAGE_ACTION_PAYMENT, musicGroup.getName());
|
|
|
|
|
|
return true;
|
|
|
}
|
|
@@ -1634,6 +1656,19 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroup.setMemo(memo);
|
|
|
musicGroup.setUpdateTime(date);
|
|
|
musicGroupDao.update(musicGroup);
|
|
|
+
|
|
|
+ List<PaymentCalenderStatusEnum> statusList = new ArrayList<MusicGroupPaymentCalender.PaymentCalenderStatusEnum>();
|
|
|
+ statusList.add(PaymentCalenderStatusEnum.AUDITING);
|
|
|
+ //修改乐团报名缴费项目状态
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
+
|
|
|
+ musicGroupPaymentCalenderList.forEach(t -> {
|
|
|
+ t.setStatus(PaymentCalenderStatusEnum.DRAFT);
|
|
|
+ t.setUpdateTime(date);
|
|
|
+ });
|
|
|
+
|
|
|
+ musicGroupPaymentCalenderDao.batchUpdate(musicGroupPaymentCalenderList);
|
|
|
+
|
|
|
}else if(musicGroup.getStatus() == MusicGroupStatusEnum.FEE_AUDIT){
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "乐团审核失败(费用审核中 -> 费用审核失败)", sysUser.getId(), memo));
|
|
|
List<PaymentCalenderStatusEnum> statusList = new ArrayList<MusicGroupPaymentCalender.PaymentCalenderStatusEnum>();
|