|
@@ -197,6 +197,8 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
if(!CollectionUtils.isEmpty(teacherReminds)){
|
|
|
mondayTeacherRemindMap = teacherReminds.stream().collect(Collectors.groupingBy(e -> DateUtil.dateToString(e.getMonday(), "yyyy-MM-dd"), Collectors.groupingBy(TeacherRemind::getTeacherId)));
|
|
|
}
|
|
|
+ List<StudentExtracurricularExercisesSituation> teacherServeWithDate = studentExtracurricularExercisesSituationDao.findTeacherServeWithDate(queryInfo.getMonday(), queryInfo.getSunday(), teacherIds);
|
|
|
+ Map<Integer, List<StudentExtracurricularExercisesSituation>> teacherServeMap = teacherServeWithDate.stream().filter(s -> "HOMEWORK".equals(s.getServeType())).collect(Collectors.groupingBy(StudentExtracurricularExercisesSituation::getTeacherId));
|
|
|
for (TeacherServeDto teacherServeDto : dataList) {
|
|
|
String mondayStr = DateUtil.dateToString(teacherServeDto.getMonday(), "yyyy-MM-dd");
|
|
|
if(!mondayTeacherRemindMap.containsKey(mondayStr)){
|
|
@@ -206,6 +208,18 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
|
|
|
if(!teacherRemindMap.containsKey(teacherServeDto.getTeacherId())){
|
|
|
continue;
|
|
|
}
|
|
|
+ if(teacherServeMap.containsKey(teacherServeDto.getTeacherId())){
|
|
|
+ List<StudentExtracurricularExercisesSituation> tss = teacherServeMap.get(teacherServeDto.getTeacherId());
|
|
|
+ Set<Long> courseIds = new HashSet<>();
|
|
|
+ for (StudentExtracurricularExercisesSituation ts : tss) {
|
|
|
+ if(StringUtils.isBlank(ts.getCourseIds())){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Set<Long> ids = Arrays.stream(ts.getCourseIds().split(",")).map(s -> Long.valueOf(s)).collect(Collectors.toSet());
|
|
|
+ courseIds.addAll(ids);
|
|
|
+ }
|
|
|
+ teacherServeDto.setHomeworkNum(courseIds.size());
|
|
|
+ }
|
|
|
TeacherRemind lastTeacherRemind = teacherRemindMap.get(teacherServeDto.getTeacherId()).stream().max(Comparator.comparing(TeacherRemind::getCreateTime)).get();
|
|
|
teacherServeDto.setOperatorName(lastTeacherRemind.getOperatorName());
|
|
|
teacherServeDto.setRemindDate(lastTeacherRemind.getCreateTime());
|