update 年级相关内容

develop
hhb@hotmail.com 1 month ago
parent 1dd21b136e
commit be289caf37

@ -2,6 +2,7 @@ package cn.teammodel.controller.admin.controller;
import cn.teammodel.common.R;
import cn.teammodel.controller.admin.service.TeacherService;
import cn.teammodel.model.dto.admin.exam.ExamRecordDto;
import cn.teammodel.model.dto.admin.exam.OverViewDto;
import cn.teammodel.model.dto.admin.teacher.TeacherDto;
import io.swagger.annotations.Api;
@ -47,5 +48,11 @@ public class TeacherController {
Map<String, Object> res = teacherService.getTeacherLearningCategory(teacherDto);
return R.success(res);
}
@PostMapping("getTeacherGradeCount")
@ApiOperation("获取年级人数以及分配情况")
public R<Map<String, Object>> getTeacherGradeCount(@Valid @RequestBody TeacherDto teacherDto, HttpServletRequest request) {
Map<String, Object> res = teacherService.getTeacherGradeCount(teacherDto,request);
return R.success(res);
}
}

@ -11,4 +11,5 @@ public interface TeacherService {
Map<String,Object> getTeacherDetail(TeacherDto teacherDto, HttpServletRequest request);
Map<Long, Integer> getTeacherByRecord(TeacherDto teacherDto);
Map<String,Object> getTeacherLearningCategory(TeacherDto teacherDto);
Map<String,Object> getTeacherGradeCount(TeacherDto teacherDto, HttpServletRequest request);
}

@ -204,6 +204,20 @@ public class TeacherServiceImpl implements TeacherService {
return LearningCategory;
}
@Override
public Map<String, Object> getTeacherGradeCount(TeacherDto teacherDto, HttpServletRequest request) {
Map<String, Object> gradeMap;
String url = env.getProperty("ies.server-url-get-teacher-grade-count");
try {
gradeMap = GroupUtil.getGroupId(teacherDto,new GroupUtil(env), request,url);
}catch (Exception e) {
throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "数据转换错误");
}
return gradeMap;
}
private static @NotNull Map<String, Integer> getStringIntegerMap(List<School.Subject> subjects, List<SchoolTeacher> schoolTeachers) {
Map<String, String> subjectNameMap = new HashMap<>();
for (School.Subject subject : subjects) {

@ -15,4 +15,5 @@ public class TeacherDto {
public Long endTime;
@ApiModelProperty("学段Id")
public String periodId;
public Integer year;
}

@ -83,3 +83,4 @@ ies:
server-url-analysis-simple: /analysis/simple
server-url-find-simple-by-student: /common/exam/find-simple-by-student
server-url-get-teacher-all: /school/teacher/get-teacher-all
server-url-get-teacher-grade-count: /school/teacher/get-teacher-grade
Loading…
Cancel
Save