Joburgess 4 vuotta sitten
vanhempi
commit
75e4a971b9

+ 0 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupService.java

@@ -175,7 +175,6 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
      * @param teacherId: 要计算课酬的老师的编号
      * @param onlineClassesUnitPrice: 线上课程单价
      * @param offlineClassesUnitPrice: 线下课程单价
-     * @param computeTotalPrice: 是否计算课程购买总价
      * @return java.util.Map
      */
     <K extends VipGroup> Map<String, BigDecimal> countVipGroupPredictFee(K vipGroup,

+ 12 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -1006,8 +1006,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("指定的活动方案不存在");
 		}
 
-		Teacher teacher = teacherDao.get(teacherId);
-
 		VipGroupSalarySettlementDto vipGroupSalarySettlementDto = JSON.parseObject(vipGroupActivity.getSalarySettlementJson(), VipGroupSalarySettlementDto.class);
 
 		if(Objects.isNull(vipGroupSalarySettlementDto)){
@@ -1121,10 +1119,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		//教师线下单课酬计算
 		if(Objects.nonNull(vipGroupSalarySettlementDto.getOfflineSalarySettlement())){
-			if(vipGroup instanceof VipGroupApplyBaseInfoDto){
-				teacherOfflineSalary=((VipGroupApplyBaseInfoDto) vipGroup).getOfflineTeacherSalary();
-				results.put("offlineTeacherSalary",teacherOfflineSalary);
-			}
 			if(Objects.isNull(teacherOfflineSalary)){
 				switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
 					case TEACHER_DEFAULT:
@@ -1149,7 +1143,19 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		}
 
 		BigDecimal ots = results.get("onlineTeacherSalary");
+		if(Objects.isNull(ots)){
+			ots = teacherDefaultVipGroupSalary.getOnlineClassesSalary();
+		}
+		if(Objects.isNull(ots)){
+			ots = BigDecimal.ZERO;
+		}
 		BigDecimal ofts = results.get("offlineTeacherSalary");
+		if(Objects.isNull(ofts)){
+			ofts = teacherDefaultVipGroupSalary.getOfflineClassesSalary();
+		}
+		if(Objects.isNull(ofts)){
+			ofts = BigDecimal.ZERO;
+		}
 		if(Objects.nonNull(vipGroup.getStatus())&&normalStudentNum!=vipGroupCategory.getStudentNum()){
 			ots = ots.divide(new BigDecimal(vipGroupCategory.getStudentNum()),CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 			ofts = ofts.divide(new BigDecimal(vipGroupCategory.getStudentNum()),CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);