|
@@ -2552,11 +2552,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}
|
|
|
VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
|
surplusCourseFee = sysUserCashAccountLogService.vipReturnFeeCharges(surplusCourseFee, vipGroupCategory == null ? 0 : vipGroupCategory.getStudentNum());
|
|
|
-// if(vipGroupCategory.getStudentNum()<=1){
|
|
|
-// surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
-// }else{
|
|
|
-// surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
-// }
|
|
|
|
|
|
studentApplyRefunds.setExpectAmount(surplusCourseFee);
|
|
|
studentApplyRefunds.setStatus(StudentApplyRefundsStatus.ING);
|
|
@@ -3083,14 +3078,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
|
|
|
BigDecimal actualPrice = coursePrices.get(i);
|
|
|
courseScheduleStudentPayment.setExpectPrice(actualPrice);
|
|
|
+ courseScheduleStudentPayment.setActualPrice(actualPrice);
|
|
|
//按课扣除课程余额
|
|
|
if(courseBalance.compareTo(actualPrice) >= 0){
|
|
|
courseBalance = courseBalance.subtract(actualPrice);
|
|
|
}else {
|
|
|
//扣除排课资格
|
|
|
- actualPrice = activityUserMapperService.use(activityUserMappers,freeActivityUserMappers,j,a,vipGroup.getId());
|
|
|
+ activityUserMapperService.use(activityUserMappers,freeActivityUserMappers,j,a,vipGroup.getId(),courseScheduleStudentPayment);
|
|
|
}
|
|
|
- courseScheduleStudentPayment.setActualPrice(actualPrice);
|
|
|
courseScheduleStudentPayment.setGroupType(GroupType.VIP);
|
|
|
courseScheduleStudentPayment.setMusicGroupId(studentRecoverInfo.getVipGroupId().toString());
|
|
|
courseScheduleStudentPayment.setMusicGroupId(classGroup.getMusicGroupId());
|
|
@@ -3945,7 +3940,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
courseBalance = courseBalance.subtract(actualPrice);
|
|
|
}else {
|
|
|
//扣除排课资格
|
|
|
- courseScheduleStudentPayment.setActualPrice(activityUserMapperService.use(activityUserMappers,freeActivityUserMappers,j,a,vipGroup.getId()));
|
|
|
+ activityUserMapperService.use(activityUserMappers, freeActivityUserMappers, j, a, vipGroup.getId(),courseScheduleStudentPayment);
|
|
|
}
|
|
|
courseScheduleStudentPayment.setGroupType(GroupType.VIP);
|
|
|
courseScheduleStudentPayment.setMusicGroupId(vipGroupId.toString());
|
|
@@ -3957,7 +3952,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
} else if (vipGroupCourseSchedule.getTeachMode().equals(TeachModeEnum.ONLINE)) {
|
|
|
courseScheduleStudentPayment.setOriginalPrice(vipGroup.getOnlineClassesUnitPrice());
|
|
|
}
|
|
|
- courseScheduleStudentPayment.setActualPrice(courseScheduleStudentPayment.getExpectPrice());
|
|
|
courseScheduleStudentPayment.setCreateTime(now);
|
|
|
courseScheduleStudentPayment.setUpdateTime(now);
|
|
|
courseScheduleStudentPayments.add(courseScheduleStudentPayment);
|