Przeglądaj źródła

教师阅卷

tags/正式版本
雍文秀 2 lat temu
rodzic
commit
5497ff9372

+ 6
- 6
sexam/src/main/java/com/xhkjedu/sexam/controller/paper/EPaperCorrectTeacherController.java Wyświetl plik

@@ -81,10 +81,10 @@ public class EPaperCorrectTeacherController {
81 81
     @PostMapping("/get_cq")
82 82
     public ResultVo getCorrectQuestion(@RequestBody EPTeacherVo vo) {
83 83
         Integer teacherid = vo.getTeacherid();
84
-        String eptqids = vo.getEptqids();
84
+        Integer eptqid = vo.getEptqid();
85 85
         Integer esid = vo.getEsid();
86
-        N_Utils.validation(new Object[]{teacherid, "教师id", 1, eptqids, "试卷试题ids", 2, esid, "考试科目id", 1});
87
-        return correctTeacherService.getCorrectQuestion(teacherid, eptqids, vo.getClassids(), esid);
86
+        N_Utils.validation(new Object[]{teacherid, "教师id", 1, eptqid, "试卷试题id", 1, esid, "考试科目id", 1});
87
+        return correctTeacherService.getCorrectQuestion(teacherid, eptqid, vo.getClassids(), esid);
88 88
     }
89 89
 
90 90
     /**
@@ -97,10 +97,10 @@ public class EPaperCorrectTeacherController {
97 97
      **/
98 98
     @PostMapping("/get_pre")
99 99
     public ResultVo getPreQuestion(@RequestBody EPTeacherVo vo) {
100
-        Integer epid = vo.getEpid();
100
+        Integer eptqid = vo.getEptqid();
101 101
         Integer teacherid = vo.getTeacherid();
102
-        N_Utils.validation(new Object[]{epid, "试卷id", 1, teacherid, "教师id", 1});
103
-        return correctTeacherService.getPreQuestion(epid, teacherid);
102
+        N_Utils.validation(new Object[]{eptqid, "试卷试题id", 1, teacherid, "教师id", 1});
103
+        return correctTeacherService.getPreQuestion(eptqid, teacherid);
104 104
     }
105 105
 
106 106
     /**

+ 2
- 2
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperCorrectTeacherMapper.java Wyświetl plik

@@ -16,7 +16,7 @@ public interface EPaperCorrectTeacherMapper {
16 16
 
17 17
     //随机获取一条待批阅试题
18 18
     EPaperSQuestionVo getCorrectQuestion(@Param("teacherid") Integer teacherid,
19
-                                         @Param("eptqids") String eptqids, @Param("classids") String classids);
19
+                                         @Param("eptqid") Integer eptqid, @Param("classids") String classids);
20 20
 
21 21
     //试题批阅情况
22 22
     EPaperSQuestionVo getCheckQuestion(@Param("eptqid") Integer eptqid, @Param("teacherid") Integer teacherid);
@@ -25,7 +25,7 @@ public interface EPaperCorrectTeacherMapper {
25 25
     void updateCheckQuestionById(@Param("epsqid") Integer epsqid, @Param("teacherid") Integer teacherid);
26 26
 
27 27
     //获取上一份批阅试题
28
-    Map getPreQuestion(@Param("epid") Integer epid, @Param("teacherid") Integer teacherid);
28
+    Map getPreQuestion(@Param("eptqid") Integer eptqid, @Param("teacherid") Integer teacherid);
29 29
 
30 30
     //阅卷记录
31 31
     List<Map> listRecord(@Param("eptqid") Integer eptqid, @Param("teacherid") Integer teacherid);

+ 2
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperCorrectTeacherService.java Wyświetl plik

@@ -37,12 +37,12 @@ public class EPaperCorrectTeacherService {
37 37
     }
38 38
 
39 39
     //随机获取待批试题
40
-    public ResultVo getCorrectQuestion(Integer teacherid, String eptqids, String classids, Integer esid) {
40
+    public ResultVo getCorrectQuestion(Integer teacherid, Integer eptqid, String classids, Integer esid) {
41 41
         lock.lock();
42 42
         Map map = correctTeacherMapper.getExamNameByEsId(esid);//根据考试科目id获取考试名称
43 43
         try {
44 44
             //随机获取一条待批阅试题
45
-            EPaperSQuestionVo sq = correctTeacherMapper.getCorrectQuestion(teacherid, eptqids, classids);
45
+            EPaperSQuestionVo sq = correctTeacherMapper.getCorrectQuestion(teacherid, eptqid, classids);
46 46
             if (sq == null) return new ResultVo(0, "已批阅完成");
47 47
             //修改试卷学生试题为批阅中
48 48
             correctTeacherMapper.updateCheckQuestionById(sq.getEpsqid(), teacherid);

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/EPTeacherVo.java Wyświetl plik

@@ -20,7 +20,7 @@ public class EPTeacherVo {
20 20
     private Integer teacherid;
21 21
 
22 22
     //试卷试题ids
23
-    private String eptqids;
23
+    private Integer eptqid;
24 24
 
25 25
     //班级ids
26 26
     private String classids;

+ 2
- 2
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml Wyświetl plik

@@ -50,7 +50,7 @@
50 50
     <!--随机获取一条待批阅试题-->
51 51
     <select id="getCorrectQuestion" resultType="com.xhkjedu.sexam.vo.paper.EPaperSQuestionVo">
52 52
         select psq.epsqid,psq.stuanswer,psq.qn,psq.eptqid,psq.qscore,psq.epsid
53
-        from e_paper_student_question psq where psq.eptqid in(${eptqids})
53
+        from e_paper_student_question psq where psq.eptqid=#{eptqid}
54 54
         and psq.answered=1 and (psq.checked=0 or (psq.checked=1 and psq.checkid=#{teacherid}))
55 55
         <if test="classids!=null and classids!=''">
56 56
             and psq.classid in(${classids})
@@ -70,7 +70,7 @@
70 70
     <!--获取上一份批阅试题-->
71 71
     <select id="getPreQuestion" resultType="java.util.Map">
72 72
         select psq.epsqid,psq.stuanswer,psq.qn,psq.qorder,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.epsid
73
-        from e_paper_student_question psq where psq.epid=#{epid} and psq.checked=2 and psq.checkid=#{teacherid}
73
+        from e_paper_student_question psq where psq.eptqid=#{eptqid} and psq.checked=2 and psq.checkid=#{teacherid}
74 74
         order by psq.checktime desc limit 1
75 75
     </select>
76 76
     <!--阅卷记录-->

+ 5
- 0
sexam/src/main/resources/mapper/report/EReportGenerateMapper.xml Wyświetl plik

@@ -12,4 +12,9 @@
12 12
         from e_paper ep left join e_paper_analyze epa on ep.epid = epa.epid
13 13
         where ep.examid=#{examid}
14 14
     </select>
15
+    <select id="listStu" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
16
+        select er.studentid,er.subjectid,er.classrank,er.schoolrank
17
+        from(select max(er.rsid)rsid from e_class_student ecs left join e_rstudent er on ecs.studentid = er.studentid
18
+        where ecs.examid=#{examid} group by er.studentid,er.subjectid)a left join e_rstudent er on a.rsid=er.rsid
19
+    </select>
15 20
 </mapper>

Ładowanie…
Anuluj
Zapisz