|
@@ -169,6 +169,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
vipGroupApplyBaseInfoDto.getUserId(),
|
|
|
vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice(),
|
|
|
vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice(),
|
|
|
+ true,
|
|
|
true);
|
|
|
|
|
|
//如果默认课酬与实际课酬不匹配则需要审批
|
|
@@ -504,10 +505,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
@Override
|
|
|
public <K extends VipGroup> Map<String,BigDecimal> countVipGroupPredictFee(K vipGroup,
|
|
|
- Integer teacherId,
|
|
|
- BigDecimal onlineClassesUnitPrice,
|
|
|
- BigDecimal offlineClassesUnitPrice,
|
|
|
- boolean computeTotalPrice){
|
|
|
+ Integer teacherId,
|
|
|
+ BigDecimal onlineClassesUnitPrice,
|
|
|
+ BigDecimal offlineClassesUnitPrice,
|
|
|
+ boolean computeTotalPrice,
|
|
|
+ boolean useDefaultTeacherSalary){
|
|
|
|
|
|
if(Objects.isNull(teacherId)){
|
|
|
throw new BizException("请指定教师");
|
|
@@ -557,7 +559,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(Objects.nonNull(vipGroupSalarySettlementDto.getOnlineSalarySettlement())){
|
|
|
switch (vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType()){
|
|
|
case TEACHER_DEFAULT:
|
|
|
- if(vipGroup instanceof VipGroupApplyBaseInfoDto){
|
|
|
+ if(vipGroup instanceof VipGroupApplyBaseInfoDto&&!useDefaultTeacherSalary){
|
|
|
teacherOnlineSalary=((VipGroupApplyBaseInfoDto) vipGroup).getOnlineTeacherSalary();
|
|
|
}
|
|
|
|
|
@@ -585,7 +587,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(Objects.nonNull(vipGroupSalarySettlementDto.getOfflineSalarySettlement())){
|
|
|
switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
|
|
|
case TEACHER_DEFAULT:
|
|
|
- if(vipGroup instanceof VipGroupApplyBaseInfoDto){
|
|
|
+ if(vipGroup instanceof VipGroupApplyBaseInfoDto&&!useDefaultTeacherSalary){
|
|
|
teacherOfflineSalary=((VipGroupApplyBaseInfoDto) vipGroup).getOfflineTeacherSalary();
|
|
|
}
|
|
|
if(Objects.isNull(teacherOfflineSalary)){
|
|
@@ -805,7 +807,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
studentApplyRefunds.setExpectAmount(countVipGroupPredictFee(vipGroup,
|
|
|
vipGroup.getUserId(),
|
|
|
new BigDecimal(surplusClassTimes.get(TeachModeEnum.ONLINE.getCode()).toString()),
|
|
|
- new BigDecimal(surplusClassTimes.get(TeachModeEnum.OFFLINE.getCode()).toString()),true).get("totalPrice"));
|
|
|
+ new BigDecimal(surplusClassTimes.get(TeachModeEnum.OFFLINE.getCode()).toString()),
|
|
|
+ true,
|
|
|
+ false).get("totalPrice"));
|
|
|
studentApplyRefunds.setStatus(AuditStatusEnum.ING);
|
|
|
String orderNo=StringUtils.join(new String[]{studentId.toString(),String.valueOf(System.currentTimeMillis())});
|
|
|
studentApplyRefunds.setOrderNo(orderNo);
|