|
@@ -161,7 +161,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
private SimpleDateFormat sdf_ymd = new SimpleDateFormat("yyyy-MM-dd");
|
|
private SimpleDateFormat sdf_ymd = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
|
|
private SimpleDateFormat sdf_hms = new SimpleDateFormat("HH:mm:ss");
|
|
private SimpleDateFormat sdf_hms = new SimpleDateFormat("HH:mm:ss");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
private SimpleDateFormat sdf_ymdhms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
private SimpleDateFormat sdf_ymdhms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -313,20 +313,20 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
OrderTypeEnum type = OrderTypeEnum.SPORADIC;
|
|
OrderTypeEnum type = OrderTypeEnum.SPORADIC;
|
|
|
if (chargeInfo.getChargeType().equals(SporadicChargeTypeEnum.DOUBLE_ELEVEN2020)) {
|
|
if (chargeInfo.getChargeType().equals(SporadicChargeTypeEnum.DOUBLE_ELEVEN2020)) {
|
|
|
type = OrderTypeEnum.DOUBLE_ELEVEN2020;
|
|
type = OrderTypeEnum.DOUBLE_ELEVEN2020;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
String startTimeStr = sysConfigDao.findConfigValue(SysConfigService.START_TIME_OF_1111);
|
|
String startTimeStr = sysConfigDao.findConfigValue(SysConfigService.START_TIME_OF_1111);
|
|
|
String endTimeStr = sysConfigDao.findConfigValue(SysConfigService.END_TIME_OF_1111);
|
|
String endTimeStr = sysConfigDao.findConfigValue(SysConfigService.END_TIME_OF_1111);
|
|
|
Date startTime = sdf_ymdhms.parse(startTimeStr);
|
|
Date startTime = sdf_ymdhms.parse(startTimeStr);
|
|
|
Date endTime = sdf_ymdhms.parse(endTimeStr);
|
|
Date endTime = sdf_ymdhms.parse(endTimeStr);
|
|
|
- if(date.before(startTime)){
|
|
|
|
|
- throw new Exception("活动暂未开始,请您耐心等待!");
|
|
|
|
|
|
|
+ if (date.before(startTime)) {
|
|
|
|
|
+ throw new Exception("活动暂未开始,请您耐心等待!");
|
|
|
}
|
|
}
|
|
|
- if(date.after(endTime)){
|
|
|
|
|
- throw new Exception("活动已结束,谢谢您的支持!");
|
|
|
|
|
|
|
+ if (date.after(endTime)) {
|
|
|
|
|
+ throw new Exception("活动已结束,谢谢您的支持!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -498,7 +498,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
}
|
|
|
goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.valueOf(kitGroupPurchaseType));
|
|
goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.valueOf(kitGroupPurchaseType));
|
|
|
remitFee = groupType.get(kitGroupPurchaseType) == null ? BigDecimal.ZERO : groupType.get(kitGroupPurchaseType);
|
|
remitFee = groupType.get(kitGroupPurchaseType) == null ? BigDecimal.ZERO : groupType.get(kitGroupPurchaseType);
|
|
|
- if (coursePurchase != null){
|
|
|
|
|
|
|
+ if (coursePurchase != null) {
|
|
|
courseRemitFee = coursePurchase.get(kitGroupPurchaseType) == null ? BigDecimal.ZERO : coursePurchase.get(kitGroupPurchaseType);
|
|
courseRemitFee = coursePurchase.get(kitGroupPurchaseType) == null ? BigDecimal.ZERO : coursePurchase.get(kitGroupPurchaseType);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1046,7 +1046,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroupDao.update(musicGroup);
|
|
musicGroupDao.update(musicGroup);
|
|
|
//获取报名缴费项目
|
|
//获取报名缴费项目
|
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
- if(regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)){
|
|
|
|
|
|
|
+ if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
|
regCalender.setUpdateTime(new Date());
|
|
regCalender.setUpdateTime(new Date());
|
|
|
musicGroupPaymentCalenderDao.update(regCalender);
|
|
musicGroupPaymentCalenderDao.update(regCalender);
|
|
@@ -1393,7 +1393,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroupDao.update(musicGroup);
|
|
musicGroupDao.update(musicGroup);
|
|
|
|
|
|
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderService.findByMusicGroupRegCalender(musicGroup.getId());
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderService.findByMusicGroupRegCalender(musicGroup.getId());
|
|
|
- if (regCalender != null&& regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
|
|
|
|
+ if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
regCalender.setDeadlinePaymentDate(expireDate);
|
|
regCalender.setDeadlinePaymentDate(expireDate);
|
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
|
regCalender.setUpdateTime(date);
|
|
regCalender.setUpdateTime(date);
|
|
@@ -1683,10 +1683,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
Integer organId = studentRegistration.getOrganId();
|
|
Integer organId = studentRegistration.getOrganId();
|
|
|
MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByCalenderIdAndUserId(calenderId, userId);
|
|
MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByCalenderIdAndUserId(calenderId, userId);
|
|
|
//关闭之前的订单
|
|
//关闭之前的订单
|
|
|
- if(calenderDetail.getPaymentOrderId() != null){
|
|
|
|
|
|
|
+ if (calenderDetail.getPaymentOrderId() != null) {
|
|
|
StudentPaymentOrder oldStudentPaymentOrder = studentPaymentOrderDao.get(calenderDetail.getPaymentOrderId());
|
|
StudentPaymentOrder oldStudentPaymentOrder = studentPaymentOrderDao.get(calenderDetail.getPaymentOrderId());
|
|
|
- if(oldStudentPaymentOrder != null){
|
|
|
|
|
- if(oldStudentPaymentOrder.getStatus() == SUCCESS){
|
|
|
|
|
|
|
+ if (oldStudentPaymentOrder != null) {
|
|
|
|
|
+ if (oldStudentPaymentOrder.getStatus() == SUCCESS) {
|
|
|
throw new BizException("您已支付请勿重复提交");
|
|
throw new BizException("您已支付请勿重复提交");
|
|
|
}
|
|
}
|
|
|
oldStudentPaymentOrder.setStatus(CLOSE);
|
|
oldStudentPaymentOrder.setStatus(CLOSE);
|
|
@@ -1760,7 +1760,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
|
|
|
|
|
if (amount.compareTo(BigDecimal.ZERO) == 0) {
|
|
if (amount.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- studentPaymentRouteOrderService.addRouteOrder(orderNo,organId, balance);
|
|
|
|
|
|
|
+ studentPaymentRouteOrderService.addRouteOrder(orderNo, organId, balance);
|
|
|
Map<String, String> notifyMap = new HashMap<>(4);
|
|
Map<String, String> notifyMap = new HashMap<>(4);
|
|
|
notifyMap.put("tradeState", "1");
|
|
notifyMap.put("tradeState", "1");
|
|
|
notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
|
|
notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
|
|
@@ -1811,7 +1811,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (studentPaymentOrder.getStatus() == SUCCESS) {
|
|
if (studentPaymentOrder.getStatus() == SUCCESS) {
|
|
|
//当前乐团报名是否赠送乐团网管课
|
|
//当前乐团报名是否赠送乐团网管课
|
|
|
MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByOrderId(studentPaymentOrder.getId());
|
|
MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByOrderId(studentPaymentOrder.getId());
|
|
|
- MusicGroupStudentFee musicGroupStudentFee = musicGroupPaymentCalenderService.updateCalender(calenderDetail.getId(),studentRegistration.getUserId());
|
|
|
|
|
|
|
+ MusicGroupStudentFee musicGroupStudentFee = musicGroupPaymentCalenderService.updateCalender(calenderDetail.getId(), studentRegistration.getUserId());
|
|
|
|
|
|
|
|
musicGroupStudentFee.setUpdateTime(date);
|
|
musicGroupStudentFee.setUpdateTime(date);
|
|
|
musicGroupStudentFee.setLatestPaidTime(date);
|
|
musicGroupStudentFee.setLatestPaidTime(date);
|
|
@@ -2080,6 +2080,20 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
// List<Integer> months = subFeeSettingDto.getMonths();
|
|
// List<Integer> months = subFeeSettingDto.getMonths();
|
|
|
|
|
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
|
|
|
+ //缴费方式不同
|
|
|
|
|
+ if ((group.getStatus().equals(MusicGroupStatusEnum.AUDIT_FAILED) || group.getStatus().equals(MusicGroupStatusEnum.DRAFT))
|
|
|
|
|
+ && !group.getChargeTypeId().equals(musicGroup.getChargeTypeId())) {
|
|
|
|
|
+ //删除原有的乐团声部规划
|
|
|
|
|
+ musicGroupSubjectPlanDao.delByMusicGroupId(musicGroupId);
|
|
|
|
|
+ //删除原有的声部商品组合
|
|
|
|
|
+ musicGroupSubjectGoodsGroupDao.delByMusicGroupId(musicGroupId);
|
|
|
|
|
+ //删除原有的缴费项目
|
|
|
|
|
+ MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
|
|
+ if (regCalender != null) {
|
|
|
|
|
+ musicGroupPaymentCalenderDao.delByGroupId(musicGroupId);
|
|
|
|
|
+ musicGroupPaymentCalenderCourseSettingsDao.deleteByMusicGroupPaymentCalenderId(regCalender.getId());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//判断缴费日历是否修改
|
|
//判断缴费日历是否修改
|
|
|
/*boolean isModifiedOfCalender = false;
|
|
/*boolean isModifiedOfCalender = false;
|
|
@@ -2126,7 +2140,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroup.setUpdateTime(date);
|
|
musicGroup.setUpdateTime(date);
|
|
|
musicGroupDao.update(musicGroup);
|
|
musicGroupDao.update(musicGroup);
|
|
|
//修改课程里面的教学点
|
|
//修改课程里面的教学点
|
|
|
- if (!musicGroup.getSchoolId().equals(musicGroup.getSchoolId())) {
|
|
|
|
|
|
|
+ if (!group.getSchoolId().equals(musicGroup.getSchoolId())) {
|
|
|
courseScheduleDao.updateByMusicGroupId(musicGroupId, musicGroup.getSchoolId());
|
|
courseScheduleDao.updateByMusicGroupId(musicGroupId, musicGroup.getSchoolId());
|
|
|
}
|
|
}
|
|
|
// 删除乐团付费主体列表
|
|
// 删除乐团付费主体列表
|
|
@@ -2195,7 +2209,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
//所有人开启缴费
|
|
//所有人开启缴费
|
|
|
studentRegistrationDao.musicGroupOpenPay(musicGroupId, PaymentStatusEnum.OPEN);
|
|
studentRegistrationDao.musicGroupOpenPay(musicGroupId, PaymentStatusEnum.OPEN);
|
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
- if(regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)){
|
|
|
|
|
|
|
+ if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
|
regCalender.setUpdateTime(new Date());
|
|
regCalender.setUpdateTime(new Date());
|
|
|
musicGroupPaymentCalenderDao.update(regCalender);
|
|
musicGroupPaymentCalenderDao.update(regCalender);
|