|
@@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.time.DayOfWeek;
|
|
import java.time.DayOfWeek;
|
|
@@ -451,15 +452,18 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> imple
|
|
LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
|
|
LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
|
|
LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
List<TeacherExercisesServiceDto> teacherExercisesServiceSituations = studentExtracurricularExercisesSituationDao.findTeacherExercisesServiceSituations(monDayDate.toString(), new ArrayList<>(teachers));
|
|
List<TeacherExercisesServiceDto> teacherExercisesServiceSituations = studentExtracurricularExercisesSituationDao.findTeacherExercisesServiceSituations(monDayDate.toString(), new ArrayList<>(teachers));
|
|
- Map<Integer, TeacherExercisesServiceDto> teacherServiceMap = teacherExercisesServiceSituations.stream().collect(Collectors.toMap(TeacherExercisesServiceDto::getTeacherId, t -> t));
|
|
|
|
|
|
+ Map<Integer, TeacherExercisesServiceDto> teacherServiceMap = new HashMap<>();
|
|
|
|
+ if(!CollectionUtils.isEmpty(teacherExercisesServiceSituations)){
|
|
|
|
+ teacherServiceMap = teacherExercisesServiceSituations.stream().collect(Collectors.toMap(TeacherExercisesServiceDto::getTeacherId, t -> t));
|
|
|
|
+ }
|
|
|
|
|
|
Map<Integer,String> operatingStudentsNum = MapUtil.convertMybatisMap(studentDao.getTeacherOperatingStudentsNum(teacherIds));
|
|
Map<Integer,String> operatingStudentsNum = MapUtil.convertMybatisMap(studentDao.getTeacherOperatingStudentsNum(teacherIds));
|
|
Map<Integer,String> practiceStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(teacherIds, GroupType.PRACTICE));
|
|
Map<Integer,String> practiceStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(teacherIds, GroupType.PRACTICE));
|
|
Map<Integer,String> vipStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(teacherIds, GroupType.VIP));
|
|
Map<Integer,String> vipStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(teacherIds, GroupType.VIP));
|
|
Map<Integer,String> practiceAndVipStudentsNum = MapUtil.convertMybatisMap(studentDao.getPracticeAndVipNums(teacherIds));
|
|
Map<Integer,String> practiceAndVipStudentsNum = MapUtil.convertMybatisMap(studentDao.getPracticeAndVipNums(teacherIds));
|
|
|
|
|
|
- rows.forEach(e->{
|
|
|
|
-// e.setSubjectName(subjectDao.findBySubIds(e.getSubjectId()));
|
|
|
|
|
|
+ for (Teacher e : rows) {
|
|
|
|
+ e.setSubjectName(subjectDao.findBySubIds(e.getSubjectId()));
|
|
e.setOrganName(organNames.get(e.getTeacherOrganId()));
|
|
e.setOrganName(organNames.get(e.getTeacherOrganId()));
|
|
if(StringUtils.isNotEmpty(e.getSplitSubjectName())){
|
|
if(StringUtils.isNotEmpty(e.getSplitSubjectName())){
|
|
e.setSubjectName(Arrays.asList(e.getSplitSubjectName().split(",")));
|
|
e.setSubjectName(Arrays.asList(e.getSplitSubjectName().split(",")));
|
|
@@ -488,8 +492,7 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> imple
|
|
}else {
|
|
}else {
|
|
e.setOperatingIndex(BigDecimal.ZERO);
|
|
e.setOperatingIndex(BigDecimal.ZERO);
|
|
}
|
|
}
|
|
-
|
|
|
|
- });
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return pageInfo;
|
|
return pageInfo;
|
|
}
|
|
}
|