From be289caf378912d92818578aff118ea877877dda Mon Sep 17 00:00:00 2001 From: "hhb@hotmail.com" Date: Mon, 25 Nov 2024 15:31:03 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=B9=B4=E7=BA=A7=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/TeacherController.java | 7 +++++++ .../controller/admin/service/TeacherService.java | 1 + .../admin/service/impl/TeacherServiceImpl.java | 14 ++++++++++++++ .../model/dto/admin/teacher/TeacherDto.java | 1 + src/main/resources/application.yml | 3 ++- 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/teammodel/controller/admin/controller/TeacherController.java b/src/main/java/cn/teammodel/controller/admin/controller/TeacherController.java index b6bec58..2540a4c 100644 --- a/src/main/java/cn/teammodel/controller/admin/controller/TeacherController.java +++ b/src/main/java/cn/teammodel/controller/admin/controller/TeacherController.java @@ -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 res = teacherService.getTeacherLearningCategory(teacherDto); return R.success(res); } + @PostMapping("getTeacherGradeCount") + @ApiOperation("获取年级人数以及分配情况") + public R> getTeacherGradeCount(@Valid @RequestBody TeacherDto teacherDto, HttpServletRequest request) { + Map res = teacherService.getTeacherGradeCount(teacherDto,request); + return R.success(res); + } } diff --git a/src/main/java/cn/teammodel/controller/admin/service/TeacherService.java b/src/main/java/cn/teammodel/controller/admin/service/TeacherService.java index 8f47505..9181968 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/TeacherService.java +++ b/src/main/java/cn/teammodel/controller/admin/service/TeacherService.java @@ -11,4 +11,5 @@ public interface TeacherService { Map getTeacherDetail(TeacherDto teacherDto, HttpServletRequest request); Map getTeacherByRecord(TeacherDto teacherDto); Map getTeacherLearningCategory(TeacherDto teacherDto); + Map getTeacherGradeCount(TeacherDto teacherDto, HttpServletRequest request); } diff --git a/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java b/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java index 6fcfb3f..7318d60 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java +++ b/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java @@ -204,6 +204,20 @@ public class TeacherServiceImpl implements TeacherService { return LearningCategory; } + @Override + public Map getTeacherGradeCount(TeacherDto teacherDto, HttpServletRequest request) { + + Map 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 getStringIntegerMap(List subjects, List schoolTeachers) { Map subjectNameMap = new HashMap<>(); for (School.Subject subject : subjects) { diff --git a/src/main/java/cn/teammodel/model/dto/admin/teacher/TeacherDto.java b/src/main/java/cn/teammodel/model/dto/admin/teacher/TeacherDto.java index b5f3712..123117d 100644 --- a/src/main/java/cn/teammodel/model/dto/admin/teacher/TeacherDto.java +++ b/src/main/java/cn/teammodel/model/dto/admin/teacher/TeacherDto.java @@ -15,4 +15,5 @@ public class TeacherDto { public Long endTime; @ApiModelProperty("学段Id") public String periodId; + public Integer year; } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 4a44e8b..9e2a346 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -82,4 +82,5 @@ ies: server-url-exam-find-record: /common/exam/find-summary-record 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 \ No newline at end of file + server-url-get-teacher-all: /school/teacher/get-teacher-all + server-url-get-teacher-grade-count: /school/teacher/get-teacher-grade \ No newline at end of file