|
|
|
@ -763,11 +763,11 @@ public class TeacherServiceImpl implements TeacherService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<Map<String,Map<String,Object>>> getTeachingOfTeacher(TeacherDto teacherDto, HttpServletRequest request) {
|
|
|
|
|
List<Map<String,Map<String,Object>>> list = new ArrayList<>();
|
|
|
|
|
public List<LinkedHashMap<String,LinkedHashMap<String,Object>>> getTeachingOfTeacher(TeacherDto teacherDto, HttpServletRequest request) {
|
|
|
|
|
List<LinkedHashMap<String,LinkedHashMap<String,Object>>> list = new ArrayList<>();
|
|
|
|
|
if(teacherDto.getGrade() != null) {
|
|
|
|
|
Map<String,Map<String,Object>> map = new HashMap<>();
|
|
|
|
|
Map<String,Object> mapTeach = new HashMap<>();
|
|
|
|
|
LinkedHashMap<String,LinkedHashMap<String,Object>> map = new LinkedHashMap<>();
|
|
|
|
|
LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>();
|
|
|
|
|
mapTeach.put("interaction", new Random().nextInt(50) + 1);
|
|
|
|
|
mapTeach.put("cooperation", new Random().nextInt(50) + 1);
|
|
|
|
|
mapTeach.put("test", new Random().nextInt(50) + 1);
|
|
|
|
@ -779,19 +779,10 @@ public class TeacherServiceImpl implements TeacherService {
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
List<School> school = schoolRepository.findBaseById(teacherDto.getCode());
|
|
|
|
|
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())) {
|
|
|
|
|
grades = period.getGrades();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Map<String,Map<String,Object>> map = new HashMap<>();
|
|
|
|
|
List<String> grades = getGrades(teacherDto, school);
|
|
|
|
|
LinkedHashMap<String,LinkedHashMap<String,Object>> map = new LinkedHashMap<>();
|
|
|
|
|
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("cooperation", new Random().nextInt(50) + 1);
|
|
|
|
|
mapTeach.put("test", new Random().nextInt(50) + 1);
|
|
|
|
@ -805,6 +796,22 @@ public class TeacherServiceImpl implements TeacherService {
|
|
|
|
|
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) {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> gradeMap;
|
|
|
|
|