|
@@ -56,6 +56,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
if(StringUtils.isNotBlank(monday)){
|
|
|
nowDate=LocalDate.parse(monday, DateUtil.dateFormatter);
|
|
|
}
|
|
|
+
|
|
|
LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
|
|
|
Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant());
|
|
@@ -74,6 +75,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
//本周无课学员编号集合
|
|
|
Set<Integer> noClassStudentIds=new HashSet<>();
|
|
|
for (Map.Entry<Integer, List<StudentServeDto>> studentCoursesEntry : studentCoursesMap.entrySet()) {
|
|
|
+
|
|
|
List<StudentServeDto> haveCourseStudents = studentCoursesEntry.getValue().stream().filter(e -> Objects.nonNull(e.getCourseStartTime())).collect(Collectors.toList());
|
|
|
if(CollectionUtils.isEmpty(haveCourseStudents)){
|
|
|
noClassStudentIds.add(studentCoursesEntry.getKey());
|
|
@@ -84,7 +86,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
noClassStudentIds.add(studentCoursesEntry.getKey());
|
|
|
continue;
|
|
|
}
|
|
|
- if(!nextMonday.before(studentServeDto.getCourseStartTime())){
|
|
|
+ if(!studentServeDto.getCourseStartTime().before(nextMonday)){
|
|
|
dontServeInCurrentWeekStudentIds.add(studentCoursesEntry.getKey());
|
|
|
continue;
|
|
|
}
|