|
@@ -251,14 +251,14 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
Map<GroupType, Long> groupTypeCountFirstMap = firstWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
Map<GroupType, Long> groupTypeCountFirstMap = firstWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
- if(Objects.nonNull(groupTypeCountFirstMap.get(GroupType.PRACTICE))&&groupTypeCountFirstMap.get(GroupType.PRACTICE)>80){
|
|
|
|
|
|
+ if(Objects.nonNull(groupTypeCountFirstMap.get(GroupType.PRACTICE))&&groupTypeCountFirstMap.get(GroupType.PRACTICE)>=80){
|
|
firstWeekEnableApply=false;
|
|
firstWeekEnableApply=false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
Map<GroupType, Long> groupTypeCountSecondMap = secondWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
Map<GroupType, Long> groupTypeCountSecondMap = secondWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
- if(Objects.nonNull(groupTypeCountSecondMap.get(GroupType.PRACTICE))&&groupTypeCountSecondMap.get(GroupType.PRACTICE)>80){
|
|
|
|
|
|
+ if(Objects.nonNull(groupTypeCountSecondMap.get(GroupType.PRACTICE))&&groupTypeCountSecondMap.get(GroupType.PRACTICE)>=80){
|
|
secondWeekEnableApply=false;
|
|
secondWeekEnableApply=false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -432,14 +432,14 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
Map<GroupType, Long> groupTypeCountFirstMap = firstWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
Map<GroupType, Long> groupTypeCountFirstMap = firstWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
- if(Objects.nonNull(groupTypeCountFirstMap.get(GroupType.PRACTICE))&&groupTypeCountFirstMap.get(GroupType.PRACTICE)>80){
|
|
|
|
|
|
+ if(Objects.nonNull(groupTypeCountFirstMap.get(GroupType.PRACTICE))&&groupTypeCountFirstMap.get(GroupType.PRACTICE)>=80){
|
|
firstWeekEnableApply=false;
|
|
firstWeekEnableApply=false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
Map<GroupType, Long> groupTypeCountSecondMap = secondWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
Map<GroupType, Long> groupTypeCountSecondMap = secondWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
- if(Objects.nonNull(groupTypeCountSecondMap.get(GroupType.PRACTICE))&&groupTypeCountSecondMap.get(GroupType.PRACTICE)>80){
|
|
|
|
|
|
+ if(Objects.nonNull(groupTypeCountSecondMap.get(GroupType.PRACTICE))&&groupTypeCountSecondMap.get(GroupType.PRACTICE)>=80){
|
|
secondWeekEnableApply=false;
|
|
secondWeekEnableApply=false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -648,14 +648,14 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
Map<GroupType, Long> groupTypeCountFirstMap = firstWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
Map<GroupType, Long> groupTypeCountFirstMap = firstWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
- if(Objects.nonNull(groupTypeCountFirstMap.get(GroupType.PRACTICE))&&groupTypeCountFirstMap.get(GroupType.PRACTICE)>80){
|
|
|
|
|
|
+ if(Objects.nonNull(groupTypeCountFirstMap.get(GroupType.PRACTICE))&&groupTypeCountFirstMap.get(GroupType.PRACTICE)>=80){
|
|
firstWeekEnableApply=false;
|
|
firstWeekEnableApply=false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
if(!CollectionUtils.isEmpty(firstWeekCourses)){
|
|
Map<GroupType, Long> groupTypeCountSecondMap = secondWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
Map<GroupType, Long> groupTypeCountSecondMap = secondWeekCourses.stream().collect(Collectors.groupingBy(CourseSchedule::getGroupType, Collectors.counting()));
|
|
- if(Objects.nonNull(groupTypeCountSecondMap.get(GroupType.PRACTICE))&&groupTypeCountSecondMap.get(GroupType.PRACTICE)>80){
|
|
|
|
|
|
+ if(Objects.nonNull(groupTypeCountSecondMap.get(GroupType.PRACTICE))&&groupTypeCountSecondMap.get(GroupType.PRACTICE)>=80){
|
|
secondWeekEnableApply=false;
|
|
secondWeekEnableApply=false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -787,6 +787,9 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
||practiceGroup.getSecondCourseTime().after(activityEndDate)) {
|
|
||practiceGroup.getSecondCourseTime().after(activityEndDate)) {
|
|
throw new BizException("预约时间超过范围");
|
|
throw new BizException("预约时间超过范围");
|
|
}
|
|
}
|
|
|
|
+ if(DateUtil.isSameDay(practiceGroup.getFirstCourseTime(),practiceGroup.getSecondCourseTime())){
|
|
|
|
+ throw new BizException("两节课不可以在同一天");
|
|
|
|
+ }
|
|
|
|
|
|
List<Date> allCourseDates=new ArrayList<>();
|
|
List<Date> allCourseDates=new ArrayList<>();
|
|
allCourseDates.add(practiceGroup.getFirstCourseTime());
|
|
allCourseDates.add(practiceGroup.getFirstCourseTime());
|