develop
hhb@hotmail.com 3 days ago
parent af6536c0fe
commit 74148a068a

@ -61,4 +61,18 @@ public class TeacherController {
return R.success(res);
}
@PostMapping("getTeachingAndResearch")
@ApiOperation("获取教师教研数据")
public R<Map<String,Object>> getTeachingAndResearch(@Valid @RequestBody TeacherDto teacherDto, HttpServletRequest request) {
Map<String,Object> res = teacherService.getTeachingAndResearch(teacherDto,request);
return R.success(res);
}
@PostMapping("getTeachingOfTeacher")
@ApiOperation("获取教师教学法数据")
public R<List<Map<String,Map<String,Object>>>> getTeachingOfTeacher(@Valid @RequestBody TeacherDto teacherDto, HttpServletRequest request) {
List<Map<String,Map<String,Object>>> res = teacherService.getTeachingOfTeacher(teacherDto,request);
return R.success(res);
}
}

@ -14,4 +14,6 @@ public interface TeacherService {
Map<String,Object> getTeacherLearningCategory(TeacherDto teacherDto);
Map<String,Object> getTeacherGradeCount(TeacherDto teacherDto, HttpServletRequest request);
List<Map<String,Map<String, Long>>> getDistributionOfTeachers(TeacherDto teacherDto, HttpServletRequest request);
Map<String,Object> getTeachingAndResearch(TeacherDto teacherDto, HttpServletRequest request);
List<Map<String,Map<String,Object>>> getTeachingOfTeacher(TeacherDto teacherDto, HttpServletRequest request);
}

@ -728,6 +728,78 @@ public class TeacherServiceImpl implements TeacherService {
return distributionList;
}
@Override
public Map<String, Object> getTeachingAndResearch(TeacherDto teacherDto, HttpServletRequest request) {
Map<String, Object> map = new HashMap<>();
//录课数
map.put("Lessons",new Random().nextInt(100) + 1);
//T(数据)
map.put("TData",new Random().nextInt(100) + 1);
//T绿灯
map.put("TGreen",new Random().nextInt(100) + 1);
//双绿灯
map.put("DoubleGreen",new Random().nextInt(100) + 1);
//观课数
map.put("WLessons",new Random().nextInt(100) + 1);
//议课数
map.put("TLessons",new Random().nextInt(100) + 1);
//频道数
map.put("Channels",new Random().nextInt(20) + 1);
//公开课
map.put("OLessons",new Random().nextInt(100) + 1);
//课件数
map.put("Coursewares",new Random().nextInt(100) + 1);
//教案数
map.put("TeachingPlan",new Random().nextInt(40) + 1);
//公开标记
map.put("OMarkers",new Random().nextInt(30) + 1);
//个人标记
map.put("PMarkers",new Random().nextInt(30) + 1);
//被标记数
map.put("TMarkers",new Random().nextInt(30) + 1);
//被点阅数
map.put("ClickAndRead",new Random().nextInt(100) + 1);
return map;
}
@Override
public List<Map<String,Map<String,Object>>> getTeachingOfTeacher(TeacherDto teacherDto, HttpServletRequest request) {
List<Map<String,Map<String,Object>>> list = new ArrayList<>();
if(teacherDto.getGrade() != null) {
Map<String,Map<String,Object>> map = new HashMap<>();
Map<String,Object> mapTeach = new HashMap<>();
mapTeach.put("interaction", new Random().nextInt(50) + 1);
mapTeach.put("test", new Random().nextInt(50) + 1);
mapTeach.put("differentiation", new Random().nextInt(50) + 1);
map.put(teacherDto.getGrade(), mapTeach);
list.add(map);
}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<>();
for (String grade : grades) {
Map<String,Object> mapTeach = new HashMap<>();
mapTeach.put("interaction", new Random().nextInt(50) + 1);
mapTeach.put("test", new Random().nextInt(50) + 1);
mapTeach.put("differentiation", new Random().nextInt(50) + 1);
map.put(grade, mapTeach);
}
list.add(map);
}
return list;
}
public Map<String, Object> getTeacherBase(GpTeacherDto gpTeacherDto, HttpServletRequest request) {
Map<String, Object> gradeMap;

Loading…
Cancel
Save