|
@@ -27,7 +27,6 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
-
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -182,14 +181,17 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
// 如果是报名,需要修改乐团状态
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
|
- if (musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT) {
|
|
|
- throw new BizException("创建失败:缴费项目类型不匹配");
|
|
|
+ int countAuditReject = musicGroupPaymentCalenderDao.countAuditReject(musicGroupPaymentCalender.getMusicGroupId(),null);
|
|
|
+ if(countAuditReject == 0){
|
|
|
+ if (musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT) {
|
|
|
+ throw new BizException("创建失败:缴费项目类型不匹配");
|
|
|
+ }
|
|
|
+ musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
|
|
|
+ musicGroup.setUpdateTime(date);
|
|
|
+ // 记录操作日志
|
|
|
+ musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 审核中)", sysUser.getId(), ""));
|
|
|
+ musicGroupDao.update(musicGroup);
|
|
|
}
|
|
|
- musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
|
|
|
- musicGroup.setUpdateTime(date);
|
|
|
- // 记录操作日志
|
|
|
- musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 审核中)", sysUser.getId(), ""));
|
|
|
- musicGroupDao.update(musicGroup);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -328,15 +330,19 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
|
|
|
|
// 如果是报名,需要修改乐团状态
|
|
|
+
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
|
- if (musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT) {
|
|
|
- throw new BizException("创建失败:缴费项目类型不匹配");
|
|
|
+ int countAuditReject = musicGroupPaymentCalenderDao.countAuditReject(musicGroupPaymentCalender.getMusicGroupId(),musicGroupPaymentCalender.getId());
|
|
|
+ if(countAuditReject == 0){
|
|
|
+ if (musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT) {
|
|
|
+ throw new BizException("创建失败:缴费项目类型不匹配");
|
|
|
+ }
|
|
|
+ musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
|
|
|
+ musicGroup.setUpdateTime(date);
|
|
|
+ // 记录操作日志
|
|
|
+ musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 审核中)", sysUser.getId(), ""));
|
|
|
+ musicGroupDao.update(musicGroup);
|
|
|
}
|
|
|
- musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
|
|
|
- musicGroup.setUpdateTime(date);
|
|
|
- // 记录操作日志
|
|
|
- musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(草稿 -> 审核中)", sysUser.getId(), ""));
|
|
|
- musicGroupDao.update(musicGroup);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -462,18 +468,21 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
//如果是报名,并且所有的报名都审核通过,需要修改乐团状态
|
|
|
- int count = musicGroupPaymentCalenderDao.countAuditReject(musicGroupPaymentCalender.getMusicGroupId(),calenderId);
|
|
|
- if (count == 0 && musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(musicGroupPaymentCalender.getMusicGroupId());
|
|
|
- musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
|
|
|
- musicGroup.setUpdateTime(date);
|
|
|
- musicGroupDao.update(musicGroup);
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null || sysUser.getId() == null){
|
|
|
- throw new BizException("请重新登录");
|
|
|
+
|
|
|
+ if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
|
+ int count = musicGroupPaymentCalenderDao.countAuditReject(musicGroupPaymentCalender.getMusicGroupId(),calenderId);
|
|
|
+ if(count == 0){
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(musicGroupPaymentCalender.getMusicGroupId());
|
|
|
+ musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
|
|
|
+ musicGroup.setUpdateTime(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(), ""));
|
|
|
}
|
|
|
}
|
|
|
|