|
@@ -69,9 +69,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
@Autowired
|
|
@Autowired
|
|
private VipGroupActivityDao vipGroupActivityDao;
|
|
private VipGroupActivityDao vipGroupActivityDao;
|
|
@Autowired
|
|
@Autowired
|
|
- private VipGroupCategoryDao vipGroupCategoryDao;
|
|
|
|
- @Autowired
|
|
|
|
- private MusicGroupDao musicGroupDao;
|
|
|
|
|
|
+ private VipGroupCategoryService vipGroupCategoryService;
|
|
@Autowired
|
|
@Autowired
|
|
private SysUserFeignService sysUserFeignService;
|
|
private SysUserFeignService sysUserFeignService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -297,7 +295,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("请勿重复提交");
|
|
throw new BizException("请勿重复提交");
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroupApplyBaseInfoDto.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroupApplyBaseInfoDto.getVipGroupCategoryId());
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
throw new BizException("课程形式不存在");
|
|
throw new BizException("课程形式不存在");
|
|
}
|
|
}
|
|
@@ -571,7 +569,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("请勿重复提交");
|
|
throw new BizException("请勿重复提交");
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroupApplyBaseInfoDto.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroupApplyBaseInfoDto.getVipGroupCategoryId());
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
throw new BizException("课程形式不存在");
|
|
throw new BizException("课程形式不存在");
|
|
}
|
|
}
|
|
@@ -757,7 +755,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
}
|
|
}
|
|
|
|
|
|
if(ActivityCourseType.FREE_VIP.equals(vipGroup.getVipGroupApplyBaseInfo().getActivityCourseType())){
|
|
if(ActivityCourseType.FREE_VIP.equals(vipGroup.getVipGroupApplyBaseInfo().getActivityCourseType())){
|
|
- List<VipGroupCategory> vipGroupCategories = vipGroupCategoryDao.findAllByOrgan(vipGroup.getVipGroupApplyBaseInfo().getOrganId().toString());
|
|
|
|
|
|
+ List<VipGroupCategory> vipGroupCategories = vipGroupCategoryService.findAllByOrgan(vipGroup.getVipGroupApplyBaseInfo().getOrganId().toString());
|
|
VipGroupCategory vipGroupCategory = vipGroupCategories.stream().filter(v -> v.getName().equals("1v2")).findFirst().get();
|
|
VipGroupCategory vipGroupCategory = vipGroupCategories.stream().filter(v -> v.getName().equals("1v2")).findFirst().get();
|
|
vipGroup.getVipGroupApplyBaseInfo().setVipGroupCategoryId(vipGroupCategory.getId());
|
|
vipGroup.getVipGroupApplyBaseInfo().setVipGroupCategoryId(vipGroupCategory.getId());
|
|
}
|
|
}
|
|
@@ -889,7 +887,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("{}课程时间冲突({}-{})", sysUser.getRealName(), DateUtil.dateToString(firstCourseSchedule.getStartClassTime(), "yyyy-MM-dd HH:mm:ss"), DateUtil.dateToString(latestCourseSchedule.getEndClassTime(), "HH:mm:ss"));
|
|
throw new BizException("{}课程时间冲突({}-{})", sysUser.getRealName(), DateUtil.dateToString(firstCourseSchedule.getStartClassTime(), "yyyy-MM-dd HH:mm:ss"), DateUtil.dateToString(latestCourseSchedule.getEndClassTime(), "HH:mm:ss"));
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroupApplyBaseInfoDto.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroupApplyBaseInfoDto.getVipGroupCategoryId());
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
throw new BizException("课程形式不存在");
|
|
throw new BizException("课程形式不存在");
|
|
}
|
|
}
|
|
@@ -1194,7 +1192,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if(StringUtils.isBlank(studentIds)){
|
|
if(StringUtils.isBlank(studentIds)){
|
|
throw new BizException("请选择学员");
|
|
throw new BizException("请选择学员");
|
|
}
|
|
}
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(applyBaseInfo.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(applyBaseInfo.getVipGroupCategoryId());
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
throw new BizException("课程形式不存在");
|
|
throw new BizException("课程形式不存在");
|
|
}
|
|
}
|
|
@@ -1584,7 +1582,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("学员信息异常");
|
|
throw new BizException("学员信息异常");
|
|
}
|
|
}
|
|
|
|
|
|
- List<VipGroupCategory> vipGroupCategories = vipGroupCategoryDao.findAllByOrgan(student.getOrganId().toString());
|
|
|
|
|
|
+ List<VipGroupCategory> vipGroupCategories = vipGroupCategoryService.findAllByOrgan(student.getOrganId().toString());
|
|
VipGroupCategory vipGroupCategory = vipGroupCategories.stream().filter(v -> v.getName().equals(vipGroupCategoryName)).findFirst().get();
|
|
VipGroupCategory vipGroupCategory = vipGroupCategories.stream().filter(v -> v.getName().equals(vipGroupCategoryName)).findFirst().get();
|
|
|
|
|
|
List<VipGroupActivity> vipGroupActivities = vipGroupActivityDao.findByName(vipGroupActivityName, TenantContextHolder.getTenantId());
|
|
List<VipGroupActivity> vipGroupActivities = vipGroupActivityDao.findByName(vipGroupActivityName, TenantContextHolder.getTenantId());
|
|
@@ -2205,7 +2203,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
vipGroupDetail.setCourseSchedules(collect);
|
|
vipGroupDetail.setCourseSchedules(collect);
|
|
vipGroupDetail.setTotalClassTimes(collect.size());
|
|
vipGroupDetail.setTotalClassTimes(collect.size());
|
|
}
|
|
}
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId());
|
|
vipGroupDetail.setCategoryName(vipGroupCategory.getName());
|
|
vipGroupDetail.setCategoryName(vipGroupCategory.getName());
|
|
vipGroupDetail.setNumberOfClasses(vipGroupDao.countTeacherVipGroups(vipGroupDetail.getTeacherId().longValue()));
|
|
vipGroupDetail.setNumberOfClasses(vipGroupDao.countTeacherVipGroups(vipGroupDetail.getTeacherId().longValue()));
|
|
return vipGroupDetail;
|
|
return vipGroupDetail;
|
|
@@ -2224,7 +2222,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("请指定课程形式");
|
|
throw new BizException("请指定课程形式");
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
throw new BizException("课程形式不存在");
|
|
throw new BizException("课程形式不存在");
|
|
}
|
|
}
|
|
@@ -2351,7 +2349,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("请指定课程形式");
|
|
throw new BizException("请指定课程形式");
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
if(Objects.isNull(vipGroupCategory)){
|
|
throw new BizException("课程形式不存在");
|
|
throw new BizException("课程形式不存在");
|
|
}
|
|
}
|
|
@@ -2989,7 +2987,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if(Objects.isNull(surplusCourseFee)){
|
|
if(Objects.isNull(surplusCourseFee)){
|
|
surplusCourseFee = new BigDecimal(0);
|
|
surplusCourseFee = new BigDecimal(0);
|
|
}
|
|
}
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
surplusCourseFee = sysUserCashAccountLogService.vipReturnFeeCharges(surplusCourseFee,vipGroupCategory == null?0:vipGroupCategory.getStudentNum());
|
|
surplusCourseFee = sysUserCashAccountLogService.vipReturnFeeCharges(surplusCourseFee,vipGroupCategory == null?0:vipGroupCategory.getStudentNum());
|
|
// if(vipGroupCategory.getStudentNum()<=1){
|
|
// if(vipGroupCategory.getStudentNum()<=1){
|
|
// surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
// surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
@@ -3030,7 +3028,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("当前课程类型不支持退学");
|
|
throw new BizException("当前课程类型不支持退学");
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
|
|
List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
|
|
if(!CollectionUtils.isEmpty(studentApplyRefunds)){
|
|
if(!CollectionUtils.isEmpty(studentApplyRefunds)){
|
|
@@ -3188,7 +3186,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
|
|
List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
|
|
if(!CollectionUtils.isEmpty(studentApplyRefunds)){
|
|
if(!CollectionUtils.isEmpty(studentApplyRefunds)){
|
|
@@ -3591,7 +3589,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if(vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)){
|
|
if(vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)){
|
|
throw new BizException("不能对已停止的课程进行退课操作");
|
|
throw new BizException("不能对已停止的课程进行退课操作");
|
|
}
|
|
}
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
Map<String,BigDecimal> result = new HashMap<>();
|
|
Map<String,BigDecimal> result = new HashMap<>();
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
BigDecimal bigDecimal;
|
|
BigDecimal bigDecimal;
|
|
@@ -3602,14 +3600,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if(activityUserMapper != null && !activityUserMapper.getReturnFee()){
|
|
if(activityUserMapper != null && !activityUserMapper.getReturnFee()){
|
|
if(Objects.nonNull(activityUserMapper.getVipGroupId())){
|
|
if(Objects.nonNull(activityUserMapper.getVipGroupId())){
|
|
VipGroup group = vipGroupDao.get(activityUserMapper.getVipGroupId());
|
|
VipGroup group = vipGroupDao.get(activityUserMapper.getVipGroupId());
|
|
- vipGroupCategory = vipGroupCategoryDao.get(group.getVipGroupCategoryId().intValue());
|
|
|
|
|
|
+ vipGroupCategory = vipGroupCategoryService.get(group.getVipGroupCategoryId().intValue());
|
|
userCourseInfos.addAll(courseScheduleDao.findUserCourseInfos(GroupType.VIP, activityUserMapper.getVipGroupId().toString(), studentId, null));
|
|
userCourseInfos.addAll(courseScheduleDao.findUserCourseInfos(GroupType.VIP, activityUserMapper.getVipGroupId().toString(), studentId, null));
|
|
}
|
|
}
|
|
if(Objects.nonNull(activityUserMapper.getGiveVipGroupId())){
|
|
if(Objects.nonNull(activityUserMapper.getGiveVipGroupId())){
|
|
userCourseInfos.addAll(courseScheduleDao.findUserCourseInfos(GroupType.VIP, activityUserMapper.getGiveVipGroupId().toString(), studentId, null));
|
|
userCourseInfos.addAll(courseScheduleDao.findUserCourseInfos(GroupType.VIP, activityUserMapper.getGiveVipGroupId().toString(), studentId, null));
|
|
}
|
|
}
|
|
if(Objects.nonNull(activityUserMapper.getPracticeGroupId())){
|
|
if(Objects.nonNull(activityUserMapper.getPracticeGroupId())){
|
|
- vipGroupCategory = vipGroupCategoryDao.get(1);
|
|
|
|
|
|
+ vipGroupCategory = vipGroupCategoryService.get(1);
|
|
userCourseInfos.addAll(courseScheduleDao.findUserCourseInfos(GroupType.PRACTICE, activityUserMapper.getPracticeGroupId().toString(), studentId, null));
|
|
userCourseInfos.addAll(courseScheduleDao.findUserCourseInfos(GroupType.PRACTICE, activityUserMapper.getPracticeGroupId().toString(), studentId, null));
|
|
}
|
|
}
|
|
if(Objects.nonNull(activityUserMapper.getGivePracticeGroupId())){
|
|
if(Objects.nonNull(activityUserMapper.getGivePracticeGroupId())){
|
|
@@ -4273,7 +4271,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("选择的学生中存在此课程中已存在的学生");
|
|
throw new BizException("选择的学生中存在此课程中已存在的学生");
|
|
}
|
|
}
|
|
|
|
|
|
- VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
|
|
if(vipGroupCategory == null){
|
|
if(vipGroupCategory == null){
|
|
throw new BizException("请修改VIP课课程形式");
|
|
throw new BizException("请修改VIP课课程形式");
|