|
|
@ -763,11 +763,11 @@ public class TeacherServiceImpl implements TeacherService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Map<String,Map<String,Object>>> getTeachingOfTeacher(TeacherDto teacherDto, HttpServletRequest request) {
|
|
|
|
public List<LinkedHashMap<String,LinkedHashMap<String,Object>>> getTeachingOfTeacher(TeacherDto teacherDto, HttpServletRequest request) {
|
|
|
|
List<Map<String,Map<String,Object>>> list = new ArrayList<>();
|
|
|
|
List<LinkedHashMap<String,LinkedHashMap<String,Object>>> list = new ArrayList<>();
|
|
|
|
if(teacherDto.getGrade() != null) {
|
|
|
|
if(teacherDto.getGrade() != null) {
|
|
|
|
Map<String,Map<String,Object>> map = new HashMap<>();
|
|
|
|
LinkedHashMap<String,LinkedHashMap<String,Object>> map = new LinkedHashMap<>();
|
|
|
|
Map<String,Object> mapTeach = new HashMap<>();
|
|
|
|
LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>();
|
|
|
|
mapTeach.put("interaction", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("interaction", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("cooperation", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("cooperation", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("test", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("test", new Random().nextInt(50) + 1);
|
|
|
@ -779,19 +779,10 @@ public class TeacherServiceImpl implements TeacherService {
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
|
|
List<School> school = schoolRepository.findBaseById(teacherDto.getCode());
|
|
|
|
List<School> school = schoolRepository.findBaseById(teacherDto.getCode());
|
|
|
|
List<String> grades = new ArrayList<>();
|
|
|
|
List<String> grades = getGrades(teacherDto, school);
|
|
|
|
if(school != null && !school.isEmpty()) {
|
|
|
|
LinkedHashMap<String,LinkedHashMap<String,Object>> map = new LinkedHashMap<>();
|
|
|
|
for (School base : school) {
|
|
|
|
|
|
|
|
for (School.Period period : base.getPeriod()) {
|
|
|
|
|
|
|
|
if(period.getId().equals(teacherDto.getPeriodId())) {
|
|
|
|
|
|
|
|
grades = period.getGrades();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String,Map<String,Object>> map = new HashMap<>();
|
|
|
|
|
|
|
|
for (String grade : grades) {
|
|
|
|
for (String grade : grades) {
|
|
|
|
Map<String,Object> mapTeach = new HashMap<>();
|
|
|
|
LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>();
|
|
|
|
mapTeach.put("interaction", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("interaction", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("cooperation", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("cooperation", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("test", new Random().nextInt(50) + 1);
|
|
|
|
mapTeach.put("test", new Random().nextInt(50) + 1);
|
|
|
@ -805,6 +796,22 @@ public class TeacherServiceImpl implements TeacherService {
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static @NotNull List<String> getGrades(TeacherDto teacherDto, List<School> school) {
|
|
|
|
|
|
|
|
List<String> grades = new ArrayList<>();
|
|
|
|
|
|
|
|
if(school != null && !school.isEmpty()) {
|
|
|
|
|
|
|
|
for (School base : school) {
|
|
|
|
|
|
|
|
for (School.Period period : base.getPeriod()) {
|
|
|
|
|
|
|
|
if(period.getId().equals(teacherDto.getPeriodId())) {
|
|
|
|
|
|
|
|
for(String grade : period.getGrades()) {
|
|
|
|
|
|
|
|
grades.add(grade.trim());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return grades;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> getTeacherBase(GpTeacherDto gpTeacherDto, HttpServletRequest request) {
|
|
|
|
public Map<String, Object> getTeacherBase(GpTeacherDto gpTeacherDto, HttpServletRequest request) {
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> gradeMap;
|
|
|
|
Map<String, Object> gradeMap;
|
|
|
|