Sfoglia il codice sorgente

教师阅卷,学生待考试列表

tags/正式版本
雍文秀 2 anni fa
parent
commit
5832162e03

+ 2
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java Vedi File

@@ -6,7 +6,6 @@ import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
6 6
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
7 7
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
8 8
 import com.xhkjedu.sexam.mapper.system.UserMapper;
9
-import com.xhkjedu.sexam.model.paper.EPaperFile;
10 9
 import com.xhkjedu.sexam.model.paper.EPaperQtype;
11 10
 import com.xhkjedu.sexam.model.paper.EPaperQtypeQuestion;
12 11
 import com.xhkjedu.sexam.model.paperstudent.EPaperStudent;
@@ -142,6 +141,8 @@ public class EPaperStudentService {
142 141
             sq.setChecked(0);
143 142
             sq.setStuscore(0.0);
144 143
             sq.setCosttime(0);
144
+            sq.setGood(0);
145
+            sq.setBad(0);
145 146
             psqlist.add(sq);
146 147
         }
147 148
         ePaperStudentQuestionMapper.insertList(psqlist);//保存试卷

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/EPaperSQuestionVo.java Vedi File

@@ -12,7 +12,9 @@ import lombok.Data;
12 12
 public class EPaperSQuestionVo {
13 13
     private Integer epsid;//试卷学生id
14 14
     private Integer epsqid;//试卷学生试题id
15
+    private Integer answertype;//答案类型1选择题、图片2纯文本
15 16
     private String stuanswer;//学生答案
17
+    private String stuanswertxt;//学生答案(纯文本)
16 18
     private String qn;//试题题号
17 19
     private Integer eptqid;//试题排序
18 20
     private double qscore;//分值

+ 5
- 3
sexam/src/main/resources/mapper/paper/EPaperCorrectTeacherMapper.xml Vedi File

@@ -49,7 +49,8 @@
49 49
     </select>
50 50
     <!--随机获取一条待批阅试题-->
51 51
     <select id="getCorrectQuestion" resultType="com.xhkjedu.sexam.vo.paper.EPaperSQuestionVo">
52
-        select psq.epsqid,psq.stuanswer,psq.qn,psq.eptqid,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.epsid
52
+        select psq.epsqid,psq.qn,psq.eptqid,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.epsid
53
+        ,psq.answertype,psq.stuanswer,psq.stuanswertxt
53 54
         from e_paper_student_question psq where psq.eptqid=#{eptqid}
54 55
         and psq.answered=1 and (psq.checked=0 or (psq.checked=1 and psq.checkid=#{teacherid}))
55 56
         <if test="classids!=null and classids!=''">
@@ -69,7 +70,8 @@
69 70
     </update>
70 71
     <!--获取上一份批阅试题-->
71 72
     <select id="getPreQuestion" resultType="com.xhkjedu.sexam.vo.paper.EPaperSQuestionVo">
72
-        select psq.epsqid,psq.stuanswer,psq.qn,psq.eptqid,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.epsid
73
+        select psq.epsqid,psq.qn,psq.eptqid,psq.qscore,psq.stuscore,psq.good,psq.bad,psq.epsid
74
+        ,psq.answertype,psq.stuanswer,psq.stuanswertxt
73 75
         from e_paper_student_question psq where psq.eptqid=#{eptqid} and psq.checked=2 and psq.checkid=#{teacherid}
74 76
         order by psq.checktime desc limit 1
75 77
     </select>
@@ -87,7 +89,7 @@
87 89
         ,checkid=#{psq.checkid},checktime=unix_timestamp()
88 90
         ,good=#{psq.good},bad=#{psq.bad}
89 91
         <if test="psq.stuanswer!=null and psq.stuanswer!=''">
90
-            and stuanswer=#{psq.stuanswer}
92
+            ,stuanswer=#{psq.stuanswer}
91 93
         </if>
92 94
         where epsqid=#{psq.epsqid}
93 95
     </update>

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml Vedi File

@@ -5,7 +5,7 @@
5 5
     <!--学生进行中考试列表-->
6 6
     <select id="listExamPapersForStudent" resultType="java.util.Map">
7 7
         select eps.epsid, es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
8
-        e.examname,e.gradeid,e.examtype,ep.epid,ep.ptype
8
+        e.examname,e.gradeid,e.examtype,ep.epid,ep.ptype,eps.sstate
9 9
         from e_paper_student eps left join e_subject es on eps.esid=es.esid
10 10
          left join e_paper ep on eps.epid=ep.epid left join e_base e on eps.examid=e.examid
11 11
         where e.deleted=1 and e.exammode=1 and eps.studentid=#{studentid} and e.examstate=1 GROUP BY eps.epsid

Loading…
Annulla
Salva