Browse Source

教师阅卷

tags/正式版本
雍文秀 2 years ago
parent
commit
5497ff9372

+ 6
- 6
sexam/src/main/java/com/xhkjedu/sexam/controller/paper/EPaperCorrectTeacherController.java View File

81
     @PostMapping("/get_cq")
81
     @PostMapping("/get_cq")
82
     public ResultVo getCorrectQuestion(@RequestBody EPTeacherVo vo) {
82
     public ResultVo getCorrectQuestion(@RequestBody EPTeacherVo vo) {
83
         Integer teacherid = vo.getTeacherid();
83
         Integer teacherid = vo.getTeacherid();
84
-        String eptqids = vo.getEptqids();
84
+        Integer eptqid = vo.getEptqid();
85
         Integer esid = vo.getEsid();
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
      **/
97
      **/
98
     @PostMapping("/get_pre")
98
     @PostMapping("/get_pre")
99
     public ResultVo getPreQuestion(@RequestBody EPTeacherVo vo) {
99
     public ResultVo getPreQuestion(@RequestBody EPTeacherVo vo) {
100
-        Integer epid = vo.getEpid();
100
+        Integer eptqid = vo.getEptqid();
101
         Integer teacherid = vo.getTeacherid();
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 View File

16
 
16
 
17
     //随机获取一条待批阅试题
17
     //随机获取一条待批阅试题
18
     EPaperSQuestionVo getCorrectQuestion(@Param("teacherid") Integer teacherid,
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
     EPaperSQuestionVo getCheckQuestion(@Param("eptqid") Integer eptqid, @Param("teacherid") Integer teacherid);
22
     EPaperSQuestionVo getCheckQuestion(@Param("eptqid") Integer eptqid, @Param("teacherid") Integer teacherid);
25
     void updateCheckQuestionById(@Param("epsqid") Integer epsqid, @Param("teacherid") Integer teacherid);
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
     List<Map> listRecord(@Param("eptqid") Integer eptqid, @Param("teacherid") Integer teacherid);
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 View File

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
         lock.lock();
41
         lock.lock();
42
         Map map = correctTeacherMapper.getExamNameByEsId(esid);//根据考试科目id获取考试名称
42
         Map map = correctTeacherMapper.getExamNameByEsId(esid);//根据考试科目id获取考试名称
43
         try {
43
         try {
44
             //随机获取一条待批阅试题
44
             //随机获取一条待批阅试题
45
-            EPaperSQuestionVo sq = correctTeacherMapper.getCorrectQuestion(teacherid, eptqids, classids);
45
+            EPaperSQuestionVo sq = correctTeacherMapper.getCorrectQuestion(teacherid, eptqid, classids);
46
             if (sq == null) return new ResultVo(0, "已批阅完成");
46
             if (sq == null) return new ResultVo(0, "已批阅完成");
47
             //修改试卷学生试题为批阅中
47
             //修改试卷学生试题为批阅中
48
             correctTeacherMapper.updateCheckQuestionById(sq.getEpsqid(), teacherid);
48
             correctTeacherMapper.updateCheckQuestionById(sq.getEpsqid(), teacherid);

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/EPTeacherVo.java View File

20
     private Integer teacherid;
20
     private Integer teacherid;
21
 
21
 
22
     //试卷试题ids
22
     //试卷试题ids
23
-    private String eptqids;
23
+    private Integer eptqid;
24
 
24
 
25
     //班级ids
25
     //班级ids
26
     private String classids;
26
     private String classids;

+ 2
- 2
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml View File

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

+ 5
- 0
sexam/src/main/resources/mapper/report/EReportGenerateMapper.xml View File

12
         from e_paper ep left join e_paper_analyze epa on ep.epid = epa.epid
12
         from e_paper ep left join e_paper_analyze epa on ep.epid = epa.epid
13
         where ep.examid=#{examid}
13
         where ep.examid=#{examid}
14
     </select>
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
 </mapper>
20
 </mapper>

Loading…
Cancel
Save