|
@@ -291,9 +291,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
//计算课程相关费用信息
|
|
|
Map<String, BigDecimal> costInfo = countVipGroupPredictFee(vipGroupApplyBaseInfoDto,
|
|
|
- vipGroupApplyBaseInfoDto.getUserId(),
|
|
|
- vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice(),
|
|
|
- vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice());
|
|
|
+ vipGroupApplyBaseInfoDto.getUserId());
|
|
|
|
|
|
vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.PASS);
|
|
|
|
|
@@ -1057,6 +1055,17 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
results.put("totalPrice",totalPrice.setScale(0,BigDecimal.ROUND_CEILING));
|
|
|
|
|
|
+ if(vipGroup instanceof VipGroupApplyBaseInfoDto && !CollectionUtils.isEmpty(((VipGroupApplyBaseInfoDto)vipGroup).getVipGroupStudentCoursePrices())){
|
|
|
+ for (VipGroupStudentCoursePrice vscp : ((VipGroupApplyBaseInfoDto)vipGroup).getVipGroupStudentCoursePrices()) {
|
|
|
+ if(Objects.isNull(vscp.getOnlineClassesUnitPrice())||Objects.isNull(vscp.getOfflineClassesUnitPrice())){
|
|
|
+ throw new BizException("请设置课程单价");
|
|
|
+ }
|
|
|
+ vscp.setPaymentPrice(vscp.getOfflineClassesUnitPrice().multiply(new BigDecimal(vipGroup.getOfflineClassesNum())).add(vscp.getOnlineClassesUnitPrice().multiply(new BigDecimal(vipGroup.getOnlineClassesNum()))));
|
|
|
+ vipGroup.setTotalPrice(vipGroup.getTotalPrice().add(vscp.getPaymentPrice()));
|
|
|
+ results.put(vscp.getStudentId().toString(), vscp.getPaymentPrice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//教师课酬线上单课酬计算
|
|
|
if(Objects.nonNull(vipGroupSalarySettlementDto.getOnlineSalarySettlement())){
|
|
|
if(Objects.isNull(teacherOnlineSalary)){
|
|
@@ -2072,7 +2081,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
classGroupTeacherMapperDao.insert(classGroupTeacherMapper);
|
|
|
}
|
|
|
|
|
|
- Map<String, BigDecimal> salaryMap = countVipGroupPredictFee(vipGroup, vipGroup.getUserId(), null, null);
|
|
|
+ Map<String, BigDecimal> salaryMap = countVipGroupPredictFee(vipGroup, vipGroup.getUserId());
|
|
|
|
|
|
//创建老师单节课课酬信息
|
|
|
courseScheduleTeacherSalaryService.createCourseScheduleTeacherVipSalary(vipGroup,
|
|
@@ -2723,7 +2732,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
courseScheduleService.batchAddCourseSchedule(vipGroupApplyDto.getCourseSchedules());
|
|
|
|
|
|
- Map<String, BigDecimal> map = countVipGroupPredictFee(vipGroup, vipGroup.getUserId(), null, null);
|
|
|
+ Map<String, BigDecimal> map = countVipGroupPredictFee(vipGroup, vipGroup.getUserId());
|
|
|
|
|
|
BigDecimal teacherSalary=BigDecimal.ZERO;
|
|
|
|
|
@@ -2850,7 +2859,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(courseNum==0){
|
|
|
courseScheduleService.batchAddCourseSchedule(courseSchedules);
|
|
|
|
|
|
- Map<String, BigDecimal> salaryMap = countVipGroupPredictFee(vipGroup, vipGroup.getUserId(), null, null);
|
|
|
+ Map<String, BigDecimal> salaryMap = countVipGroupPredictFee(vipGroup, vipGroup.getUserId());
|
|
|
|
|
|
//创建老师单节课课酬信息
|
|
|
courseScheduleTeacherSalaryService.createCourseScheduleTeacherVipSalary(vipGroup,
|