diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 28d941edf98d41275f917d277da1f9a92dc2d93b..46754baa5f58b5488171d057b342bda710a31257 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -9,8 +9,17 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fly_check/fly_check.iml b/fly_check/fly_check.iml
index 4cf874dc27483247d41027c582c18ed7506e86e6..5f2729c0cc1e2912cff09dbb58085f44ce3634cc 100644
--- a/fly_check/fly_check.iml
+++ b/fly_check/fly_check.iml
@@ -5,4 +5,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fly_common/fly_common.iml b/fly_common/fly_common.iml
index 4cf874dc27483247d41027c582c18ed7506e86e6..08f236fa658d9bf7a0d9ab7fdc25ecb5e917ceda 100644
--- a/fly_common/fly_common.iml
+++ b/fly_common/fly_common.iml
@@ -5,4 +5,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fly_elephant.iml b/fly_elephant.iml
index 74f3f131c13b467c7040d951529e88bfcc393a21..b7cdba783fc4f1177d19ec65d68da5a3297aa9a5 100644
--- a/fly_elephant.iml
+++ b/fly_elephant.iml
@@ -1,2 +1,67 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fly_homework/fly_homework.iml b/fly_homework/fly_homework.iml
index 8c7d5259edafc9afd17a06064bc410e2592fa582..5f2729c0cc1e2912cff09dbb58085f44ce3634cc 100644
--- a/fly_homework/fly_homework.iml
+++ b/fly_homework/fly_homework.iml
@@ -4,17 +4,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/fly_homework/src/main/java/com/zhiyou/homework/controller/ExamScoreController.java b/fly_homework/src/main/java/com/zhiyou/homework/controller/ExamScoreController.java
index 23babd71f2cb0bf4c1e94a53debaf9a94ad27b71..bbc87caa7aa425ce912285dd027ed6a3c31091d7 100644
--- a/fly_homework/src/main/java/com/zhiyou/homework/controller/ExamScoreController.java
+++ b/fly_homework/src/main/java/com/zhiyou/homework/controller/ExamScoreController.java
@@ -2,9 +2,12 @@ package com.zhiyou.homework.controller;
import com.zhiyou.common.pojo.Result;
import com.zhiyou.common.pojo.StateCode;
+import com.zhiyou.homework.dao.StudentDao;
import com.zhiyou.homework.pojo.Exam;
import com.zhiyou.homework.pojo.Grade;
+import com.zhiyou.homework.pojo.Student;
import com.zhiyou.homework.service.ExamService;
+import com.zhiyou.homework.service.StudentService;
import com.zhiyou.homework.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -24,6 +27,9 @@ public class ExamScoreController {
@Autowired
private ExamService examService;
+ @Autowired
+ private StudentService studentService;
+
/**
* 打开成绩管理首页
@@ -32,19 +38,78 @@ public class ExamScoreController {
* 接口测试OK
* TODO 原型图展示的是xxx成绩单,这里数据存储查出都是xxx考试
*/
- @GetMapping("/{tid}")
- public Result findAllExam(@PathVariable Integer tid) {
- // 查询老师所教所有班级,且按班级编号降序
- Map gradeCourseMap = teacherService.findGradeAndCourseByTeacherId(tid);
- TreeSet gradeSet = gradeCourseMap.get("grade");
- // 获得第一个班级
- Grade firstGrade = (Grade)gradeSet.first();
- // 获得该班所有考试信息
- List exams = examService.findAllByGid(firstGrade.getGid());
+ @GetMapping({"/{tid}","/{tid}/{gid}/{sname}","/grade/{tid}/{gid}","/stu/{tid}/{sname}"})
+ public Result findAllExam(@PathVariable Integer tid,
+ @PathVariable(required = false) Integer gid,
+ @PathVariable(required = false) String sname) {
+ TreeSet grades = null;
+ List students = null;
+ List exams = null;
+ if (gid == null && sname == null) {
+ // 查询老师所教所有班级,且按班级编号降序
+ Map gradeCourseMap = teacherService.findGradeAndCourseByTeacherId(tid);
+ grades = gradeCourseMap.get("grade");
+ // 获得第一个班级
+ Grade firstGrade = (Grade)grades.first();
+ // 获得该班所有学生信息
+ students = studentService.select(firstGrade.getGid());
+ // 获得该班所有考试信息
+ exams = examService.findAllByGid(firstGrade.getGid());
+
+ }else {
+ // 获得所有班级信息
+ grades = teacherService.findAllGrade(tid);
+ // 获得该班所有学生信息
+ students = studentService.select(gid);
+ // 获得该学生所有考试
+ exams = examService.findStuAll(gid,sname);
+ }
Map map = new HashMap<>();
- map.put("grade",gradeSet);
+ map.put("grade",grades);
map.put("exam",exams);
+ map.put("students",students);
return new Result(true, StateCode.OK,"查询全部考试成功",map);
}
+
+ /**
+ * 班级id+根据考试id 查询该班考试详情及该班所有学生所有学科成绩
+ */
+ @GetMapping("/detail/{gid}/{eid}")
+ public Result findAllExam(@PathVariable Integer gid,
+ @PathVariable Integer eid) {
+
+ // 先查询班级整体情况
+ List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index e023d01be90f322235780ca1ca70765644415da6..ca2e07f2e85462e643424056ad7cbcf1db8c8077 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,7 @@
fly_common
fly_videoMonitoring
fly_check
+ fly_homework