|
@@ -24,6 +24,7 @@ import com.ym.mec.biz.event.source.GroupEventSource;
|
|
import com.ym.mec.biz.service.*;
|
|
import com.ym.mec.biz.service.*;
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.BeanFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
@@ -66,7 +67,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
private MusicGroupOrganizationCourseSettingsDetailDao musicGroupOrganizationCourseSettingsDetailDao;
|
|
private MusicGroupOrganizationCourseSettingsDetailDao musicGroupOrganizationCourseSettingsDetailDao;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private MusicGroupOrganizationCourseSettingsDao musicGroupOrganizationCourseSettingsDao;
|
|
|
|
|
|
+ private MusicGroupOrganizationCourseSettingsService musicGroupOrganizationCourseSettingsService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private OrganizationCourseUnitPriceSettingsDao organizationCourseUnitPriceSettingsDao;
|
|
private OrganizationCourseUnitPriceSettingsDao organizationCourseUnitPriceSettingsDao;
|
|
@@ -137,6 +138,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
private StudentService studentService;
|
|
private StudentService studentService;
|
|
@Autowired
|
|
@Autowired
|
|
private CloudTeacherOrderDao cloudTeacherOrderDao;
|
|
private CloudTeacherOrderDao cloudTeacherOrderDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private MusicGroupPaymentCalenderBaseService musicGroupPaymentCalenderBaseService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public BaseDAO<Long, MusicGroupPaymentCalender> getDAO() {
|
|
public BaseDAO<Long, MusicGroupPaymentCalender> getDAO() {
|
|
@@ -463,7 +466,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
.getMusicGroupPaymentCalenderCourseSettingsList();
|
|
.getMusicGroupPaymentCalenderCourseSettingsList();
|
|
|
|
|
|
if (currentMusicGroupPaymentCalenderCourseSettings != null && currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
if (currentMusicGroupPaymentCalenderCourseSettings != null && currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
- MusicGroupOrganizationCourseSettings courseSettings = musicGroupOrganizationCourseSettingsDao.get(musicGroupPaymentCalender
|
|
|
|
|
|
+ MusicGroupOrganizationCourseSettings courseSettings = musicGroupOrganizationCourseSettingsService.get(musicGroupPaymentCalender
|
|
.getMusicGroupOrganizationCourseSettingId());
|
|
.getMusicGroupOrganizationCourseSettingId());
|
|
for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : currentMusicGroupPaymentCalenderCourseSettings) {
|
|
for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : currentMusicGroupPaymentCalenderCourseSettings) {
|
|
musicGroupPaymentCalenderCourseSettings.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
|
|
musicGroupPaymentCalenderCourseSettings.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
|
|
@@ -540,44 +543,18 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public String create1(MusicGroupPaymentCalenderDto musicGroupPaymentCalenderDto) {
|
|
|
|
|
|
+ public String create1(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender) {
|
|
|
|
|
|
- String musicGroupId = musicGroupPaymentCalenderDto.getMusicGroupId();
|
|
|
|
|
|
+ String musicGroupId = musicGroupPaymentBaseCalender.getMusicGroupId();
|
|
|
|
|
|
- PaymentType paymentType = musicGroupPaymentCalenderDto.getPaymentType();
|
|
|
|
|
|
+ PaymentType paymentType = musicGroupPaymentBaseCalender.getPaymentType();
|
|
|
|
|
|
- PayUserType payUserType = musicGroupPaymentCalenderDto.getPayUserType();
|
|
|
|
|
|
+ PayUserType payUserType = musicGroupPaymentBaseCalender.getPayUserType();
|
|
|
|
|
|
- List<MusicGroupPaymentDateRange> musicGroupPaymentDateRangeList = musicGroupPaymentCalenderDto.getMusicGroupPaymentDateRangeList();
|
|
|
|
- if(musicGroupPaymentDateRangeList.size() > 1){
|
|
|
|
- throw new BizException("暂不支持多周期缴费");
|
|
|
|
- }
|
|
|
|
MusicGroup musicGroup = musicGroupDao.getLocked(musicGroupId);
|
|
MusicGroup musicGroup = musicGroupDao.getLocked(musicGroupId);
|
|
if (musicGroup == null) {
|
|
if (musicGroup == null) {
|
|
throw new BizException("乐团查询失败,请检查参数");
|
|
throw new BizException("乐团查询失败,请检查参数");
|
|
}
|
|
}
|
|
- if (paymentType == PaymentType.ADD_STUDENT) {
|
|
|
|
- //获取缴费状态在审核中或者已拒绝的缴费项目的学员
|
|
|
|
- Integer userId = Integer.parseInt(musicGroupPaymentCalenderDto.getStudentIds());
|
|
|
|
- if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
|
|
- //该学员是否在其他的会员团
|
|
|
|
- boolean hasMemberGroup = studentRegistrationDao.checkHasMemberGroup(musicGroupId,userId);
|
|
|
|
- if(hasMemberGroup){
|
|
|
|
- throw new BizException("操作失败:学员已在其他系统收费乐团中,不可报名该乐团请联系教务老师");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- String studentIds = musicGroupPaymentCalenderDao.queryCalenderStudentIds(musicGroupId,null);
|
|
|
|
- if(StringUtils.isNotEmpty(studentIds)){
|
|
|
|
- if(studentIds.contains(userId.toString())){
|
|
|
|
- throw new BizException("创建缴费失败:所选学员有待审核或已拒绝的缴费项目");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- List<MusicGroupPaymentCalenderDetail> musicGroupPaymentCalenderDetailList = musicGroupPaymentCalenderDetailDao.queryNotPaymentStudentByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
|
- if(musicGroupPaymentCalenderDetailList != null && musicGroupPaymentCalenderDetailList.size() > 0){
|
|
|
|
- throw new BizException("创建缴费失败:已存在缴费项目");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS && musicGroup.getStatus() != MusicGroupStatusEnum.PRE_BUILD_FEE) {
|
|
if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS && musicGroup.getStatus() != MusicGroupStatusEnum.PRE_BUILD_FEE) {
|
|
throw new BizException("创建缴费失败:已存在缴费项目");
|
|
throw new BizException("创建缴费失败:已存在缴费项目");
|
|
@@ -587,19 +564,11 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
if (sysUser == null) {
|
|
if (sysUser == null) {
|
|
throw new BizException("请登录");
|
|
throw new BizException("请登录");
|
|
}
|
|
}
|
|
- if (musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE && musicGroupPaymentDateRangeList.size() > 1) {
|
|
|
|
- throw new BizException("创建缴费失败:会员收费乐团不支持多周期缴费");
|
|
|
|
- }
|
|
|
|
- //是否自动创建
|
|
|
|
- if(!musicGroupPaymentCalenderDto.getAutoCreate()){
|
|
|
|
- // 所有缴费项目已完成排课才能创建下一个缴费项目
|
|
|
|
- String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null,musicGroupPaymentCalenderDto.getIgnoreBatchNoList());
|
|
|
|
- if (StringUtils.isNoneBlank(orignBatchNo)) {
|
|
|
|
- if(StringUtils.isEmpty(musicGroupPaymentCalenderDto.getBatchNo()) || !musicGroupPaymentCalenderDto.getBatchNo().equals(orignBatchNo)){
|
|
|
|
- throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // 所有缴费项目已完成排课才能创建下一个缴费项目
|
|
|
|
+// String orignBatchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, null, null,null);
|
|
|
|
+// if (StringUtils.isNoneBlank(orignBatchNo)) {
|
|
|
|
+// throw new BizException("当前乐团存在未排课的缴费项目,请先完成排课再操作");
|
|
|
|
+// }
|
|
|
|
|
|
// 不是进行中,只能创建一次缴费
|
|
// 不是进行中,只能创建一次缴费
|
|
if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS) {
|
|
if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS) {
|
|
@@ -608,6 +577,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
throw new BizException("创建失败,已经存在缴费信息");
|
|
throw new BizException("创建失败,已经存在缴费信息");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ musicGroupPaymentBaseCalender.setMusicGroup(musicGroup);
|
|
|
|
|
|
PaymentCalenderStatusEnum status = PaymentCalenderStatusEnum.NO;
|
|
PaymentCalenderStatusEnum status = PaymentCalenderStatusEnum.NO;
|
|
|
|
|
|
@@ -615,266 +585,181 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
String batchNo = idGeneratorService.generatorId() + "";
|
|
String batchNo = idGeneratorService.generatorId() + "";
|
|
|
|
|
|
// 获取设置的课程收费标准
|
|
// 获取设置的课程收费标准
|
|
- List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettingsList = musicGroupPaymentCalenderDto
|
|
|
|
- .getMusicGroupPaymentCalenderCourseSettingsList();
|
|
|
|
|
|
+// List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettingsList = musicGroupPaymentBaseCalender.getMusicGroupPaymentCalenderCourseSettingsList();
|
|
|
|
|
|
//会员原价
|
|
//会员原价
|
|
- BigDecimal memberPaymentAmount = BigDecimal.ZERO;
|
|
|
|
|
|
+// BigDecimal memberPaymentAmount = BigDecimal.ZERO;
|
|
BigDecimal originalMemberPaymentAmount = BigDecimal.ZERO;
|
|
BigDecimal originalMemberPaymentAmount = BigDecimal.ZERO;
|
|
if (payUserType == SCHOOL) {
|
|
if (payUserType == SCHOOL) {
|
|
status = AUDITING;
|
|
status = AUDITING;
|
|
} else {
|
|
} else {
|
|
- if(musicGroupPaymentCalenderCourseSettingsList != null){
|
|
|
|
- if (paymentType == MUSIC_APPLY || paymentType == MUSIC_RENEW) {
|
|
|
|
- // 当前缴费的课程费用
|
|
|
|
- Map<CourseScheduleType, BigDecimal> currentCoursePrice = musicGroupPaymentCalenderCourseSettingsList.stream().collect(
|
|
|
|
- Collectors
|
|
|
|
- .toMap(MusicGroupPaymentCalenderCourseSettings::getCourseType, MusicGroupPaymentCalenderCourseSettings::getCourseCurrentPrice));
|
|
|
|
-
|
|
|
|
- // 查询默认课程费用
|
|
|
|
- Integer musicGroupOrganizationCourseSettingId = musicGroupPaymentCalenderDto.getMusicGroupOrganizationCourseSettingId();
|
|
|
|
- Map<CourseScheduleType, BigDecimal> defaultCoursePrice = musicGroupOrganizationCourseSettingsDetailDao
|
|
|
|
- .queryByMusicGroupOrganizationCourseSettingsId(musicGroupOrganizationCourseSettingId)
|
|
|
|
- .stream()
|
|
|
|
- .collect(
|
|
|
|
- Collectors.toMap(MusicGroupOrganizationCourseSettingsDetail::getCourseType,
|
|
|
|
- MusicGroupOrganizationCourseSettingsDetail::getCourseCurrentPrice));
|
|
|
|
-
|
|
|
|
- // 相同类型的课程如果修改了课程费用,需要走审批
|
|
|
|
- for (Entry<CourseScheduleType, BigDecimal> entry : currentCoursePrice.entrySet()) {
|
|
|
|
- if (defaultCoursePrice.get(entry.getKey()).compareTo(entry.getValue()) != 0) {
|
|
|
|
- status = AUDITING;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else if (paymentType == PaymentType.ADD_COURSE || paymentType == PaymentType.ADD_STUDENT) {
|
|
|
|
- PaymentCalenderStatusEnum dtoStatus = musicGroupPaymentCalenderDto.getStatus();
|
|
|
|
- if(dtoStatus != null && dtoStatus == AUDITING){
|
|
|
|
- status = AUDITING;
|
|
|
|
- }else {
|
|
|
|
- // 如果是课程收费,判断是否审核
|
|
|
|
- for (MusicGroupPaymentCalenderCourseSettings courseSettings : musicGroupPaymentCalenderCourseSettingsList) {
|
|
|
|
- OrganizationCourseUnitPriceSettings defaultUnitPrice = organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(
|
|
|
|
- musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getChargeTypeId());
|
|
|
|
- if (defaultUnitPrice == null) {
|
|
|
|
- throw new BizException("请先设置分部课程类型单价");
|
|
|
|
- }
|
|
|
|
- if (courseSettings.getCourseTotalMinuties() != 0) {
|
|
|
|
-
|
|
|
|
- if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties())).setScale(0, BigDecimal.ROUND_HALF_UP)
|
|
|
|
- .compareTo(courseSettings.getCourseCurrentPrice()) != 0) {
|
|
|
|
|
|
+ status = musicGroupPaymentCalenderBaseService.checkComponentAmount(musicGroupPaymentBaseCalender);
|
|
|
|
+// if(musicGroupPaymentCalenderCourseSettingsList != null){
|
|
|
|
+// if (paymentType == MUSIC_APPLY || paymentType == MUSIC_RENEW) {
|
|
|
|
+// // 当前缴费的课程费用
|
|
|
|
+// Map<CourseScheduleType, BigDecimal> currentCoursePrice = musicGroupPaymentCalenderCourseSettingsList.stream().collect(
|
|
|
|
+// Collectors
|
|
|
|
+// .toMap(MusicGroupPaymentCalenderCourseSettings::getCourseType, MusicGroupPaymentCalenderCourseSettings::getCourseCurrentPrice));
|
|
|
|
+//
|
|
|
|
+// // 查询默认课程费用
|
|
|
|
+// Integer musicGroupOrganizationCourseSettingId = musicGroupPaymentCalenderDto.getMusicGroupOrganizationCourseSettingId();
|
|
|
|
+// Map<CourseScheduleType, BigDecimal> defaultCoursePrice = musicGroupOrganizationCourseSettingsDetailDao
|
|
|
|
+// .queryByMusicGroupOrganizationCourseSettingsId(musicGroupOrganizationCourseSettingId)
|
|
|
|
+// .stream()
|
|
|
|
+// .collect(
|
|
|
|
+// Collectors.toMap(MusicGroupOrganizationCourseSettingsDetail::getCourseType,
|
|
|
|
+// MusicGroupOrganizationCourseSettingsDetail::getCourseCurrentPrice));
|
|
|
|
+//
|
|
|
|
+// // 相同类型的课程如果修改了课程费用,需要走审批
|
|
|
|
+// for (Entry<CourseScheduleType, BigDecimal> entry : currentCoursePrice.entrySet()) {
|
|
|
|
+// if (defaultCoursePrice.get(entry.getKey()).compareTo(entry.getValue()) != 0) {
|
|
|
|
+// status = AUDITING;
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// } else if (paymentType == PaymentType.ADD_COURSE || paymentType == PaymentType.ADD_STUDENT) {
|
|
|
|
+// PaymentCalenderStatusEnum dtoStatus = musicGroupPaymentCalenderDto.getStatus();
|
|
|
|
+// if(dtoStatus != null && dtoStatus == AUDITING){
|
|
|
|
+// status = AUDITING;
|
|
|
|
+// }else {
|
|
|
|
+// // 如果是课程收费,判断是否审核
|
|
|
|
+// for (MusicGroupPaymentCalenderCourseSettings courseSettings : musicGroupPaymentCalenderCourseSettingsList) {
|
|
|
|
+// OrganizationCourseUnitPriceSettings defaultUnitPrice = organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(
|
|
|
|
+// musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getChargeTypeId());
|
|
|
|
+// if (defaultUnitPrice == null) {
|
|
|
|
+// throw new BizException("请先设置分部课程类型单价");
|
|
|
|
+// }
|
|
|
|
+// if (courseSettings.getCourseTotalMinuties() != 0) {
|
|
|
|
+//
|
|
|
|
+// if (defaultUnitPrice.getUnitPrice().multiply(new BigDecimal(courseSettings.getCourseTotalMinuties())).setScale(0, BigDecimal.ROUND_HALF_UP)
|
|
|
|
+// .compareTo(courseSettings.getCourseCurrentPrice()) != 0) {
|
|
|
|
+//
|
|
|
|
+// status = AUDITING;
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// } else {
|
|
|
|
+// status = AUDITING;
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }else if(paymentType == SPAN_GROUP_CLASS_ADJUST){
|
|
|
|
+// status = musicGroupPaymentCalenderDto.getStatus();
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// if(musicGroupPaymentCalenderDto.getMemberRankSettingId() != null){
|
|
|
|
+// //会员价格是否变动
|
|
|
|
+// MemberFeeSetting memberFee = memberFeeSettingDao.findByRankIdAndOrganId(musicGroup.getOrganId(), musicGroupPaymentCalenderDto.getMemberRankSettingId());
|
|
|
|
+// if(memberFee == null){
|
|
|
|
+// throw new BizException("操作失败:请配置当前分部会员收费标准");
|
|
|
|
+// }
|
|
|
|
+// switch (musicGroupPaymentCalenderDto.getMemberValidDate()){
|
|
|
|
+// case 1 :
|
|
|
|
+// memberPaymentAmount = memberFee.getGroupPurchaseMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+// originalMemberPaymentAmount = memberFee.getOriginalMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+// break;
|
|
|
|
+// case 6 :
|
|
|
|
+// memberPaymentAmount = memberFee.getGroupPurchaseHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+// originalMemberPaymentAmount = memberFee.getOriginalHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+// break;
|
|
|
|
+// case 12 :
|
|
|
|
+// memberPaymentAmount = memberFee.getGroupPurchaseYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+// originalMemberPaymentAmount = memberFee.getOriginalYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+// break;
|
|
|
|
+// default:
|
|
|
|
+// throw new BizException("请选择正确的会员有效期");
|
|
|
|
+// }
|
|
|
|
+// if(memberPaymentAmount.compareTo(musicGroupPaymentCalenderDto.getMemberPaymentAmount()) != 0){
|
|
|
|
+// status = AUDITING;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ MusicGroupPaymentCalender musicGroupPaymentCalender = new MusicGroupPaymentCalender();
|
|
|
|
+ musicGroupPaymentCalender.setOriginalMemberPaymentAmount(originalMemberPaymentAmount);
|
|
|
|
+ musicGroupPaymentCalender.setDeadlinePaymentDate(musicGroupPaymentBaseCalender.getDeadlinePaymentDate());
|
|
|
|
+ musicGroupPaymentCalender.setMemo(musicGroupPaymentBaseCalender.getMemo());
|
|
|
|
+ musicGroupPaymentCalender.setMusicGroupId(musicGroupId);
|
|
|
|
+ musicGroupPaymentCalender.setMusicGroupOrganizationCourseSettingId(musicGroupPaymentBaseCalender.getMusicGroupOrganizationCourseSettingId());
|
|
|
|
+ BigDecimal totalPaymentAmount = BigDecimal.ZERO;
|
|
|
|
+ musicGroupPaymentCalender.setPayUserType(musicGroupPaymentBaseCalender.getPayUserType());
|
|
|
|
+ musicGroupPaymentCalender.setStartPaymentDate(musicGroupPaymentBaseCalender.getStartPaymentDate());
|
|
|
|
+ musicGroupPaymentCalender.setOperator(sysUser.getId());
|
|
|
|
+ musicGroupPaymentCalender.setCreateTime(date);
|
|
|
|
+ musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
|
+ musicGroupPaymentCalender.setStatus(status);
|
|
|
|
+ CalenderMemberDto calenderMember = musicGroupPaymentBaseCalender.getCalenderMember();
|
|
|
|
+ if(calenderMember != null){
|
|
|
|
+ //设置会员缴费金额、级别以及有效期
|
|
|
|
+ totalPaymentAmount.add(calenderMember.getActualAmount());
|
|
|
|
+ musicGroupPaymentCalender.setMemberPaymentAmount(calenderMember.getActualAmount());
|
|
|
|
+ musicGroupPaymentCalender.setMemberRankSettingId(calenderMember.getMemberRankSettingId());
|
|
|
|
+ musicGroupPaymentCalender.setMemberValidDate(calenderMember.getMemberNum());
|
|
|
|
+ musicGroupPaymentCalender.setMemberPeriod(calenderMember.getPeriodEnum());
|
|
|
|
+ }
|
|
|
|
+ //课程费用列表
|
|
|
|
+ List<MusicGroupPaymentCalenderCourseSettings> currentMusicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalender
|
|
|
|
+ .getMusicGroupPaymentCalenderCourseSettingsList();
|
|
|
|
+ if (currentMusicGroupPaymentCalenderCourseSettings != null && currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
|
|
+ totalPaymentAmount.add(currentMusicGroupPaymentCalenderCourseSettings.stream().map(e -> e.getCourseCurrentPrice()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
|
+ }
|
|
|
|
+ musicGroupPaymentCalender.setPaymentAmount(totalPaymentAmount);
|
|
|
|
+
|
|
|
|
+// BigDecimal totalPaymentAmount = musicGroupPaymentCalenderDto.getMasterTotalPrice();
|
|
|
|
+// if(musicGroupPaymentCalenderCourseSettingsList != null){
|
|
|
|
+// List<MusicGroupPaymentCalenderCourseSettings> newCSList = new ArrayList<MusicGroupPaymentCalenderCourseSettings>(
|
|
|
|
+// musicGroupPaymentCalenderCourseSettingsList.size());
|
|
|
|
+// for (MusicGroupPaymentCalenderCourseSettings pccs : musicGroupPaymentCalenderCourseSettingsList) {
|
|
|
|
+// MusicGroupPaymentCalenderCourseSettings tempPccs = new MusicGroupPaymentCalenderCourseSettings();
|
|
|
|
+// try {
|
|
|
|
+// BeanUtils.copyProperties(tempPccs, pccs);
|
|
|
|
+// } catch (Exception e) {
|
|
|
|
+// throw new BizException("克隆对象出错", e);
|
|
|
|
+// }
|
|
|
|
+// if (pccs.getIsStudentOptional()) {
|
|
|
|
+// tempPccs.setCourseCurrentPrice(pccs.getCourseCurrentPrice());
|
|
|
|
+// tempPccs.setCourseOriginalPrice(pccs.getCourseOriginalPrice());
|
|
|
|
+// tempPccs.setCourseTotalMinuties(pccs.getCourseTotalMinuties());
|
|
|
|
+// } else {
|
|
|
|
+// tempPccs.setCourseCurrentPrice(BigDecimal.ZERO);
|
|
|
|
+// tempPccs.setCourseOriginalPrice(BigDecimal.ZERO);
|
|
|
|
+// tempPccs.setCourseTotalMinuties(pccs.getCourseTotalMinuties());
|
|
|
|
+// }
|
|
|
|
+// totalPaymentAmount = totalPaymentAmount.add(tempPccs.getCourseCurrentPrice());
|
|
|
|
+// newCSList.add(tempPccs);
|
|
|
|
+// }
|
|
|
|
+// musicGroupPaymentCalender.setMusicGroupPaymentCalenderCourseSettingsList(newCSList);
|
|
|
|
+// }
|
|
|
|
|
|
- status = AUDITING;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- status = AUDITING;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else if(paymentType == SPAN_GROUP_CLASS_ADJUST){
|
|
|
|
- status = musicGroupPaymentCalenderDto.getStatus();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(musicGroupPaymentCalenderDto.getMemberRankSettingId() != null){
|
|
|
|
- //会员价格是否变动
|
|
|
|
- MemberFeeSetting memberFee = memberFeeSettingDao.findByRankIdAndOrganId(musicGroup.getOrganId(), musicGroupPaymentCalenderDto.getMemberRankSettingId());
|
|
|
|
- if(memberFee == null){
|
|
|
|
- throw new BizException("操作失败:请配置当前分部会员收费标准");
|
|
|
|
- }
|
|
|
|
- switch (musicGroupPaymentCalenderDto.getMemberValidDate()){
|
|
|
|
- case 1 :
|
|
|
|
- memberPaymentAmount = memberFee.getGroupPurchaseMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- originalMemberPaymentAmount = memberFee.getOriginalMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- break;
|
|
|
|
- case 6 :
|
|
|
|
- memberPaymentAmount = memberFee.getGroupPurchaseHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- originalMemberPaymentAmount = memberFee.getOriginalHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- break;
|
|
|
|
- case 12 :
|
|
|
|
- memberPaymentAmount = memberFee.getGroupPurchaseYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- originalMemberPaymentAmount = memberFee.getOriginalYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- throw new BizException("请选择正确的会员有效期");
|
|
|
|
- }
|
|
|
|
- if(memberPaymentAmount.compareTo(musicGroupPaymentCalenderDto.getMemberPaymentAmount()) != 0){
|
|
|
|
- status = AUDITING;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //缴费截止日期默认三天后
|
|
|
|
+ if (musicGroupPaymentCalender.getDeadlinePaymentDate() == null && payUserType == PayUserType.STUDENT) {
|
|
|
|
+ musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
|
|
}
|
|
}
|
|
|
|
|
|
- int times = musicGroupPaymentDateRangeList.size();
|
|
|
|
-
|
|
|
|
- // 排序
|
|
|
|
- Collections.sort(musicGroupPaymentDateRangeList, new Comparator<MusicGroupPaymentDateRange>() {
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public int compare(MusicGroupPaymentDateRange o1, MusicGroupPaymentDateRange o2) {
|
|
|
|
- return o1.getPaymentValidStartDate().compareTo(o2.getPaymentValidStartDate());
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- for (int i = 0; i < musicGroupPaymentDateRangeList.size(); i++) {
|
|
|
|
-
|
|
|
|
- MusicGroupPaymentDateRange musicGroupPaymentDateRange = musicGroupPaymentDateRangeList.get(i);
|
|
|
|
-
|
|
|
|
- MusicGroupPaymentCalender musicGroupPaymentCalender = new MusicGroupPaymentCalender();
|
|
|
|
- musicGroupPaymentCalender.setAttribute1(musicGroupPaymentCalenderDto.getAttribute1());
|
|
|
|
- musicGroupPaymentCalender.setOriginalMemberPaymentAmount(originalMemberPaymentAmount);
|
|
|
|
- musicGroupPaymentCalender.setAttribute2(musicGroupPaymentCalenderDto.getAttribute2());
|
|
|
|
- musicGroupPaymentCalender.setDeadlinePaymentDate(musicGroupPaymentDateRange.getDeadlinePaymentDate());
|
|
|
|
- musicGroupPaymentCalender.setIsGiveMusicNetwork(musicGroupPaymentCalenderDto.getIsGiveMusicNetwork());
|
|
|
|
- musicGroupPaymentCalender.setMemo(musicGroupPaymentCalenderDto.getMemo());
|
|
|
|
- musicGroupPaymentCalender.setMusicGroupId(musicGroupId);
|
|
|
|
- musicGroupPaymentCalender.setMusicGroupOrganizationCourseSettingId(musicGroupPaymentCalenderDto.getMusicGroupOrganizationCourseSettingId());
|
|
|
|
-
|
|
|
|
- BigDecimal totalPaymentAmount = musicGroupPaymentCalenderDto.getMasterTotalPrice();
|
|
|
|
- if(musicGroupPaymentCalenderCourseSettingsList != null){
|
|
|
|
- List<MusicGroupPaymentCalenderCourseSettings> newCSList = new ArrayList<MusicGroupPaymentCalenderCourseSettings>(
|
|
|
|
- musicGroupPaymentCalenderCourseSettingsList.size());
|
|
|
|
- for (MusicGroupPaymentCalenderCourseSettings pccs : musicGroupPaymentCalenderCourseSettingsList) {
|
|
|
|
-
|
|
|
|
- MusicGroupPaymentCalenderCourseSettings tempPccs = new MusicGroupPaymentCalenderCourseSettings();
|
|
|
|
- try {
|
|
|
|
- BeanUtils.copyProperties(tempPccs, pccs);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- throw new BizException("克隆对象出错", e);
|
|
|
|
- }
|
|
|
|
- if (i == 0) {
|
|
|
|
- if (pccs.getIsStudentOptional()) {
|
|
|
|
- tempPccs.setCourseCurrentPrice(pccs.getCourseCurrentPrice());
|
|
|
|
- tempPccs.setCourseOriginalPrice(pccs.getCourseOriginalPrice());
|
|
|
|
- tempPccs.setCourseTotalMinuties(pccs.getCourseTotalMinuties());
|
|
|
|
- } else {
|
|
|
|
- tempPccs.setCourseCurrentPrice(pccs.getCourseCurrentPrice().subtract(
|
|
|
|
- pccs.getCourseCurrentPrice().divide(new BigDecimal(times), 0, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(times - 1))
|
|
|
|
- .setScale(0, BigDecimal.ROUND_DOWN)));
|
|
|
|
- tempPccs.setCourseOriginalPrice(pccs.getCourseOriginalPrice().subtract(
|
|
|
|
- pccs.getCourseOriginalPrice().divide(new BigDecimal(times), 0, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(times - 1))
|
|
|
|
- .setScale(0, BigDecimal.ROUND_DOWN)));
|
|
|
|
- tempPccs.setCourseTotalMinuties(pccs.getCourseTotalMinuties() - pccs.getCourseTotalMinuties() / times * (times - 1));
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (!pccs.getIsStudentOptional()) {
|
|
|
|
- tempPccs.setCourseCurrentPrice(pccs.getCourseCurrentPrice().divide(new BigDecimal(times), 0, BigDecimal.ROUND_DOWN));
|
|
|
|
- tempPccs.setCourseOriginalPrice(pccs.getCourseOriginalPrice().divide(new BigDecimal(times), 0, BigDecimal.ROUND_DOWN));
|
|
|
|
- tempPccs.setCourseTotalMinuties(pccs.getCourseTotalMinuties() / times);
|
|
|
|
- } else {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- totalPaymentAmount = totalPaymentAmount.add(tempPccs.getCourseCurrentPrice());
|
|
|
|
- newCSList.add(tempPccs);
|
|
|
|
- }
|
|
|
|
- musicGroupPaymentCalender.setMusicGroupPaymentCalenderCourseSettingsList(newCSList);
|
|
|
|
- }
|
|
|
|
- musicGroupPaymentCalender.setPaymentAmount(totalPaymentAmount);
|
|
|
|
- musicGroupPaymentCalender.setPaymentPattern(musicGroupPaymentCalenderDto.getPaymentPattern());
|
|
|
|
- musicGroupPaymentCalender.setPaymentValidEndDate(musicGroupPaymentDateRange.getPaymentValidEndDate());
|
|
|
|
- musicGroupPaymentCalender.setPaymentValidStartDate(musicGroupPaymentDateRange.getPaymentValidStartDate());
|
|
|
|
-
|
|
|
|
- if (paymentType == PaymentType.MUSIC_APPLY) {
|
|
|
|
- if (i == 0) {
|
|
|
|
- musicGroupPaymentCalender.setPaymentType(paymentType);
|
|
|
|
- } else {
|
|
|
|
- musicGroupPaymentCalender.setPaymentType(PaymentType.MUSIC_RENEW);
|
|
|
|
- }
|
|
|
|
|
|
+ if (musicGroupPaymentCalender.getStatus() != AUDITING) {
|
|
|
|
+ if (date.after(musicGroupPaymentCalender.getStartPaymentDate())) {
|
|
|
|
+ musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.OPEN);
|
|
|
|
+ } else if (date.after(musicGroupPaymentCalender.getDeadlinePaymentDate())) {
|
|
|
|
+ musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.OVER);
|
|
} else {
|
|
} else {
|
|
- musicGroupPaymentCalender.setPaymentType(paymentType);
|
|
|
|
- }
|
|
|
|
- musicGroupPaymentCalender.setPayUserType(musicGroupPaymentCalenderDto.getPayUserType());
|
|
|
|
- musicGroupPaymentCalender.setStartPaymentDate(musicGroupPaymentDateRange.getStartPaymentDate());
|
|
|
|
- musicGroupPaymentCalender.setStudentIds(musicGroupPaymentCalenderDto.getStudentIds());
|
|
|
|
- musicGroupPaymentCalender.setOperator(sysUser.getId());
|
|
|
|
- musicGroupPaymentCalender.setCreateTime(date);
|
|
|
|
- musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
|
- musicGroupPaymentCalender.setStatus(status);
|
|
|
|
-
|
|
|
|
- //缴费截止日期默认三天后
|
|
|
|
- if (musicGroupPaymentCalender.getDeadlinePaymentDate() == null && payUserType == PayUserType.STUDENT) {
|
|
|
|
- musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
|
|
|
|
- }
|
|
|
|
- //校验缴费有效期冲突
|
|
|
|
- if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE && paymentType != SPAN_GROUP_CLASS_ADJUST) {
|
|
|
|
- if(musicGroupPaymentCalender.getPaymentValidStartDate() != null){
|
|
|
|
- int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
|
- musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
|
- if (count > 0) {
|
|
|
|
- throw new BizException("缴费有效期存在冲突,请修改缴费有效期");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (paymentType == PaymentType.ADD_STUDENT) {
|
|
|
|
- musicGroupPaymentCalender.setPayUserType(STUDENT);
|
|
|
|
- musicGroupPaymentCalender.setIsGiveMusicNetwork(false);
|
|
|
|
- if (musicGroupPaymentCalender.getStatus() != AUDITING) {
|
|
|
|
- musicGroupPaymentCalender.setExpectNum(1);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (musicGroupPaymentCalender.getStatus() != AUDITING) {
|
|
|
|
- if (date.after(musicGroupPaymentCalender.getStartPaymentDate())) {
|
|
|
|
- musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.OPEN);
|
|
|
|
- } else if (date.after(musicGroupPaymentCalender.getDeadlinePaymentDate())) {
|
|
|
|
- musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.OVER);
|
|
|
|
- } else {
|
|
|
|
- musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.NO);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 设置批次号
|
|
|
|
- musicGroupPaymentCalender.setBatchNo(batchNo);
|
|
|
|
- //设置会员缴费金额、级别以及有效期
|
|
|
|
- musicGroupPaymentCalender.setMemberPaymentAmount(musicGroupPaymentCalenderDto.getMemberPaymentAmount());
|
|
|
|
- musicGroupPaymentCalender.setMemberRankSettingId(musicGroupPaymentCalenderDto.getMemberRankSettingId());
|
|
|
|
- musicGroupPaymentCalender.setMemberValidDate(musicGroupPaymentCalenderDto.getMemberValidDate());
|
|
|
|
- musicGroupPaymentCalenderDto.setBatchNo(batchNo);
|
|
|
|
- musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
|
|
|
|
-
|
|
|
|
- //课程费用列表
|
|
|
|
- List<MusicGroupPaymentCalenderCourseSettings> currentMusicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalender
|
|
|
|
- .getMusicGroupPaymentCalenderCourseSettingsList();
|
|
|
|
-
|
|
|
|
- if (currentMusicGroupPaymentCalenderCourseSettings != null && currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
|
|
- MusicGroupOrganizationCourseSettings courseSettings = musicGroupOrganizationCourseSettingsDao.get(musicGroupPaymentCalender
|
|
|
|
- .getMusicGroupOrganizationCourseSettingId());
|
|
|
|
- for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : currentMusicGroupPaymentCalenderCourseSettings) {
|
|
|
|
- musicGroupPaymentCalenderCourseSettings.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
|
|
|
|
- if (courseSettings != null) {
|
|
|
|
- musicGroupPaymentCalenderCourseSettings.setName(courseSettings.getName());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- musicGroupPaymentCalenderCourseSettingsDao.batchInsert(currentMusicGroupPaymentCalenderCourseSettings);
|
|
|
|
|
|
+ musicGroupPaymentCalender.setStatus(PaymentCalenderStatusEnum.NO);
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
- //如果是跨团班级合并,保存用户缴费详情
|
|
|
|
- List<MusicGroupPaymentCalenderStudentDetail> musicGroupPaymentCalenderStudentDetails = null;
|
|
|
|
- if (musicGroupPaymentCalender.getPaymentType() == SPAN_GROUP_CLASS_ADJUST){
|
|
|
|
- musicGroupPaymentCalenderStudentDetails = musicGroupPaymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
|
|
|
|
- //记录学员缴费详情
|
|
|
|
- musicGroupPaymentCalenderStudentDetailDao.batchInsert(musicGroupPaymentCalenderStudentDetails,musicGroupPaymentCalender.getBatchNo());
|
|
|
|
- }
|
|
|
|
|
|
+ // 设置批次号
|
|
|
|
+ musicGroupPaymentCalender.setBatchNo(batchNo);
|
|
|
|
+ musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
|
|
|
|
|
|
- if (musicGroupPaymentCalender.getStatus() != AUDITING) {
|
|
|
|
- // 如果是进行中加学生
|
|
|
|
- if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
|
- addStudent(musicGroupPaymentCalender, currentMusicGroupPaymentCalenderCourseSettings,musicGroup);
|
|
|
|
- }else if(musicGroupPaymentCalender.getPaymentType() == SPAN_GROUP_CLASS_ADJUST){
|
|
|
|
- //如果是跨团班级合并,添加学员
|
|
|
|
- musicGroupPaymentCalenderDetailService.batchAdd(musicGroupPaymentCalender,musicGroupPaymentCalenderStudentDetails);
|
|
|
|
- }else if(musicGroupPaymentCalenderDto.getMergeClassFlag()){
|
|
|
|
- //缴费项目添加学员
|
|
|
|
- int[] ints = Arrays.stream(musicGroupPaymentCalenderDto.getStudentIds().split(",")).mapToInt(Integer::parseInt).toArray();
|
|
|
|
- Set<Integer> list2 = Arrays.stream(ints).boxed().collect(Collectors.toSet());
|
|
|
|
- musicGroupPaymentCalenderDetailService.batchAdd(musicGroupPaymentCalender.getId(),list2,musicGroup,false);
|
|
|
|
|
|
+ if (currentMusicGroupPaymentCalenderCourseSettings != null && currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
|
|
+ MusicGroupOrganizationCourseSettings courseSettings = musicGroupOrganizationCourseSettingsService.get(musicGroupPaymentCalender
|
|
|
|
+ .getMusicGroupOrganizationCourseSettingId());
|
|
|
|
+ for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : currentMusicGroupPaymentCalenderCourseSettings) {
|
|
|
|
+ musicGroupPaymentCalenderCourseSettings.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
|
|
|
|
+ if (courseSettings != null) {
|
|
|
|
+ musicGroupPaymentCalenderCourseSettings.setName(courseSettings.getName());
|
|
}
|
|
}
|
|
- //将0元未缴费学员缴费状态更新为已缴费
|
|
|
|
- int j = musicGroupPaymentCalenderDetailDao.updateNoPaymentAndZeroPaymentStatus(musicGroupPaymentCalender.getId());
|
|
|
|
- musicGroupPaymentCalender.setActualNum((musicGroupPaymentCalender.getActualNum()==null?0:musicGroupPaymentCalender.getActualNum()) + j);
|
|
|
|
- musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
|
}
|
|
}
|
|
|
|
+ musicGroupPaymentCalenderCourseSettingsDao.batchInsert(currentMusicGroupPaymentCalenderCourseSettings);
|
|
}
|
|
}
|
|
|
|
|
|
// 如果是报名,需要修改乐团状态
|
|
// 如果是报名,需要修改乐团状态
|
|
@@ -882,7 +767,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
if (status != AUDITING) {
|
|
if (status != AUDITING) {
|
|
musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
|
|
musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
|
|
// 记录操作日志
|
|
// 记录操作日志
|
|
- musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(创建缴费 -> 报名中)", sysUser.getId(), ""));
|
|
|
|
|
|
+ musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "报名缴费项目创建成功(创建缴费中 -> 报名中)", sysUser.getId(), ""));
|
|
} else {
|
|
} else {
|
|
musicGroup.setStatus(MusicGroupStatusEnum.FEE_AUDIT);
|
|
musicGroup.setStatus(MusicGroupStatusEnum.FEE_AUDIT);
|
|
// 记录操作日志
|
|
// 记录操作日志
|
|
@@ -890,15 +775,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
}
|
|
}
|
|
musicGroup.setUpdateTime(date);
|
|
musicGroup.setUpdateTime(date);
|
|
musicGroupDao.update(musicGroup);
|
|
musicGroupDao.update(musicGroup);
|
|
- } else if (paymentType == ADD_STUDENT) {
|
|
|
|
- if (status != AUDITING) {
|
|
|
|
- // 学生加到班级
|
|
|
|
- String classGroupIdStr = musicGroupPaymentCalenderDto.getAttribute1();
|
|
|
|
- classGroupService.addStudentToClassGroupAndCourseArranging(Integer.parseInt(musicGroupPaymentCalenderDto.getStudentIds()), classGroupIdStr,
|
|
|
|
- batchNo, musicGroupPaymentCalenderCourseSettingsList,musicGroup);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
if (status == AUDITING) {
|
|
if (status == AUDITING) {
|
|
// 如果是审核中
|
|
// 如果是审核中
|
|
Set<Integer> roleIds = new HashSet<>(1);
|
|
Set<Integer> roleIds = new HashSet<>(1);
|
|
@@ -906,10 +783,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
Organization organization = organizationDao.get(musicGroup.getOrganId());
|
|
Organization organization = organizationDao.get(musicGroup.getOrganId());
|
|
sysMessageService.batchSeoMessage(musicGroupDao.queryUserIdByRoleId(roleIds, musicGroup.getOrganId()),
|
|
sysMessageService.batchSeoMessage(musicGroupDao.queryUserIdByRoleId(roleIds, musicGroup.getOrganId()),
|
|
MessageTypeEnum.BACKSTAGE_PAYMENT_CALENDER_AUDIT, "", organization.getName(), musicGroup.getName());
|
|
MessageTypeEnum.BACKSTAGE_PAYMENT_CALENDER_AUDIT, "", organization.getName(), musicGroup.getName());
|
|
- }else {
|
|
|
|
- imUserFriendService.refreshGroupImUserFriend(musicGroupId, GroupType.MUSIC);
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
return batchNo;
|
|
return batchNo;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1258,7 +1132,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
}
|
|
}
|
|
|
|
|
|
if (currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
if (currentMusicGroupPaymentCalenderCourseSettings.size() > 0) {
|
|
- MusicGroupOrganizationCourseSettings courseSettings = musicGroupOrganizationCourseSettingsDao.get(musicGroupPaymentCalender
|
|
|
|
|
|
+ MusicGroupOrganizationCourseSettings courseSettings = musicGroupOrganizationCourseSettingsService.get(musicGroupPaymentCalender
|
|
.getMusicGroupOrganizationCourseSettingId());
|
|
.getMusicGroupOrganizationCourseSettingId());
|
|
for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : currentMusicGroupPaymentCalenderCourseSettings) {
|
|
for (MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings : currentMusicGroupPaymentCalenderCourseSettings) {
|
|
musicGroupPaymentCalenderCourseSettings.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
|
|
musicGroupPaymentCalenderCourseSettings.setMusicGroupPaymentCalenderId(musicGroupPaymentCalender.getId());
|