update 教师信息

develop
hhb@hotmail.com 4 weeks ago
parent e746605ee0
commit c1bbd8a7ac

@ -144,7 +144,7 @@ public class TeacherServiceImpl implements TeacherService {
Map<String, Long> degreeCount = gpTeachers.stream() Map<String, Long> degreeCount = gpTeachers.stream()
.filter(gpTeacher -> gpTeacher.getDegree() != null) .filter(gpTeacher -> gpTeacher.getDegree() != null)
.collect(Collectors.groupingBy(GpTeacher::getDegree, Collectors.counting())); .collect(Collectors.groupingBy(GpTeacher::getDegree, Collectors.counting()));
Map<String, Integer> practiceCount = getStringIntegerMap(teacherDto, gpTeachers); //Map<String, Integer> practiceCount = getStringIntegerMap(teacherDto, gpTeachers);
if(!genderCount.containsKey("F")) { if(!genderCount.containsKey("F")) {
genderCount.put("F",0L); genderCount.put("F",0L);
@ -153,12 +153,12 @@ public class TeacherServiceImpl implements TeacherService {
}else if (!genderCount.containsKey("M")){ }else if (!genderCount.containsKey("M")){
genderCount.put("M",0L); genderCount.put("M",0L);
} }
Map<String, Object> genderMap = new HashMap<>(); /* Map<String, Object> genderMap = new HashMap<>();
Map<String, Object> practiceMap = new HashMap<>(); Map<String, Object> practiceMap = new HashMap<>();
for (GpTeacher gpTeacher : gpTeachers) { for (GpTeacher gpTeacher : gpTeachers) {
genderMap.put(gpTeacher.basic.name, gpTeacher.basic.gender); genderMap.put(gpTeacher.basic.name, gpTeacher.basic.gender);
practiceMap.put(gpTeacher.basic.name, gpTeacher.practiceTime); practiceMap.put(gpTeacher.basic.name, gpTeacher.practiceTime);
} }*/
for (GpTeacherVo teacher : teachersList) { for (GpTeacherVo teacher : teachersList) {
for(GpTeacher gpTeacher : gpTeachers) { for(GpTeacher gpTeacher : gpTeachers) {
@ -182,9 +182,9 @@ public class TeacherServiceImpl implements TeacherService {
} }
} }
} }
teachers.put("practice", practiceCount); //teachers.put("practice", practiceCount);
teachers.put("practiceMap", practiceMap); //teachers.put("practiceMap", practiceMap);
teachers.put("genderMap", genderMap); //teachers.put("genderMap", genderMap);
teachers.put("gender", genderCount); teachers.put("gender", genderCount);
teachers.put("degree", degreeCount); teachers.put("degree", degreeCount);
teachers.put("info", teachersList); teachers.put("info", teachersList);

Loading…
Cancel
Save