|
@@ -555,9 +555,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
//计算课程相关费用信息
|
|
|
if (CourseSchedule.CourseScheduleType.VIP.getCode().equals(groupType)) {
|
|
|
// 计算老师课薪
|
|
|
- costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto, vipGroupApplyBaseInfoDto.getUserId(), null);
|
|
|
- }
|
|
|
- if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(groupType)) {
|
|
|
+ costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto, vipGroupApplyBaseInfoDto.getUserId());
|
|
|
+ }else if (CourseSchedule.CourseScheduleType.LIVE.getCode().equals(groupType)) {
|
|
|
costInfo.put("totalPrice",vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice().multiply(new BigDecimal(vipGroupApplyBaseInfoDto.getOnlineClassesNum())));
|
|
|
costInfo.put("originalTotalPrice",vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice().multiply(new BigDecimal(vipGroupApplyBaseInfoDto.getOnlineClassesNum())));
|
|
|
}
|
|
@@ -1279,11 +1278,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
if (!ActivityCourseType.FREE_VIP.equals(vipGroup.getVipGroupApplyBaseInfo().getActivityCourseType())) {
|
|
|
//计算课程相关费用信息
|
|
|
- Map<String, BigDecimal> costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto,
|
|
|
- vipGroupApplyBaseInfoDto.getUserId(), null);
|
|
|
+ Map<String, BigDecimal> costInfo = countVipGroupPredictFee1(vipGroupApplyBaseInfoDto,vipGroupApplyBaseInfoDto.getUserId());
|
|
|
BigDecimal teacherSalary = costInfo.get("offlineTeacherSalary");
|
|
|
//是否是赠送课程
|
|
|
- ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroupApplyBaseInfoDto.getId(), "VIP", null);
|
|
|
+ ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroupApplyBaseInfoDto.getId(), vipGroupApplyBaseInfoDto.getGroupType(), null);
|
|
|
if (activityUserMapper != null) {
|
|
|
if (vipGroupApplyBaseInfoDto.getId().equals(activityUserMapper.getGiveVipGroupId())) {
|
|
|
teacherSalary = costInfo.get("giveOfflineTeacherSalary");
|
|
@@ -2184,8 +2182,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
@Override
|
|
|
public <K extends VipGroup> Map<String, BigDecimal> countVipGroupPredictFee1(K vipGroup,
|
|
|
- Integer teacherId,
|
|
|
- Long courseId) {
|
|
|
+ Integer teacherId) {
|
|
|
if (Objects.isNull(teacherId)) {
|
|
|
throw new BizException("请指定教师");
|
|
|
}
|
|
@@ -2233,7 +2230,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
vipGroup.setOriginalTotalPrice(originalTotalPrice);
|
|
|
}
|
|
|
//是否是赠送课程
|
|
|
- ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), "VIP", null);
|
|
|
+ ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), vipGroup.getGroupType(), null);
|
|
|
if (activityUserMapper != null) {
|
|
|
if (vipGroup.getId().equals(activityUserMapper.getGiveVipGroupId())) {
|
|
|
giveVipOfflineSalarySettlement = vipGroupSalarySettlementDto.getGiveVipOfflineSalarySettlement();
|
|
@@ -2268,7 +2265,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
results.put("totalPrice", vipGroup.getTotalPrice());
|
|
|
results.put("originalTotalPrice", vipGroup.getOriginalTotalPrice());
|
|
|
|
|
|
- int normalStudentNum = classGroupStudentMapperDao.countGroupNormalStudentNum(VIP, vipGroup.getId().toString());
|
|
|
+ int normalStudentNum = classGroupStudentMapperDao.countGroupNormalStudentNum(vipGroup.getGroupType(), vipGroup.getId().toString());
|
|
|
|
|
|
//教师线下单课酬计算
|
|
|
BigDecimal teacherOfflineSalary = BigDecimal.ZERO;
|
|
@@ -2754,7 +2751,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
studentPaymentOrderService.activityGive(vipGroup.getVipGroupActivityId(), order,
|
|
|
vipGroup.getId().toString(), null);
|
|
|
//获取班级实际人数
|
|
|
- Integer studentNum = classGroupStudentMapperDao.countGroupNormalStudentNum(groupType, classGroup.getMusicGroupId());
|
|
|
+ Integer studentNum = classGroupStudentMapperDao.countGroupNormalStudentNum(vipGroup.getGroupType(), classGroup.getMusicGroupId());
|
|
|
//课程组人数已满,变更状态
|
|
|
if (studentNum.equals(classGroup.getExpectStudentNum())) {
|
|
|
vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
|
|
@@ -2771,7 +2768,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
List<TeacherAttendance> teacherAttendances = new ArrayList<>();
|
|
|
//创建课酬信息
|
|
|
List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = new ArrayList<>();
|
|
|
- Map<String, BigDecimal> stringBigDecimalMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId(), null);
|
|
|
+ Map<String, BigDecimal> stringBigDecimalMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId());
|
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
|
//创建教师课程薪水记录
|
|
|
CourseScheduleTeacherSalary courseScheduleTeacherSalary = new CourseScheduleTeacherSalary();
|
|
@@ -3428,10 +3425,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
classGroupTeacherMapperDao.insert(classGroupTeacherMapper);
|
|
|
}
|
|
|
|
|
|
- Map<String, BigDecimal> salaryMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId(), null);
|
|
|
+ Map<String, BigDecimal> salaryMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId());
|
|
|
BigDecimal teacherSalary = salaryMap.get("offlineTeacherSalary");
|
|
|
//是否是赠送课程
|
|
|
- ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), "VIP", null);
|
|
|
+ ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), vipGroup.getGroupType(), null);
|
|
|
if (activityUserMapper != null) {
|
|
|
if (vipGroup.getId().equals(activityUserMapper.getGiveVipGroupId())) {
|
|
|
teacherSalary = salaryMap.get("giveOfflineTeacherSalary");
|
|
@@ -4045,7 +4042,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
|
|
|
courseScheduleService.batchAddCourseSchedule(vipGroupApplyDto.getCourseSchedules());
|
|
|
|
|
|
- Map<String, BigDecimal> map = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId(), null);
|
|
|
+ Map<String, BigDecimal> map = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId());
|
|
|
BigDecimal offlineTeacherSalary = map.get("offlineTeacherSalary");
|
|
|
//是否是赠送课程
|
|
|
ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), "VIP", null);
|
|
@@ -4184,7 +4181,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if (courseNum == 0) {
|
|
|
courseScheduleService.batchAddCourseSchedule(courseSchedules);
|
|
|
|
|
|
- Map<String, BigDecimal> salaryMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId(), null);
|
|
|
+ Map<String, BigDecimal> salaryMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId());
|
|
|
BigDecimal offlineTeacherSalary = salaryMap.get("offlineTeacherSalary");
|
|
|
//是否是赠送课程
|
|
|
ActivityUserMapper activityUserMapper = activityUserMapperService.findVipUserMapper(vipGroup.getId(), "VIP", null);
|
|
@@ -4511,7 +4508,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
List<TeacherAttendance> teacherAttendances = new ArrayList<>();
|
|
|
//创建课酬信息
|
|
|
List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = new ArrayList<>();
|
|
|
- Map<String, BigDecimal> stringBigDecimalMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId(), null);
|
|
|
+ Map<String, BigDecimal> stringBigDecimalMap = countVipGroupPredictFee1(vipGroup, vipGroup.getUserId());
|
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
|
//创建教师课程薪水记录
|
|
|
CourseScheduleTeacherSalary courseScheduleTeacherSalary = new CourseScheduleTeacherSalary();
|