Sfoglia il codice sorgente

完善学生试卷信息

ywx
王宁 6 mesi fa
parent
commit
cb95404785

+ 4
- 0
src/main/java/com/xhkjedu/mapper/EPaperVerifyMapper.java Vedi File

@@ -1,5 +1,6 @@
1 1
 package com.xhkjedu.mapper;
2 2
 
3
+import com.xhkjedu.model.EPaperQtypeQuestion;
3 4
 import com.xhkjedu.model.EPaperStudent0608;
4 5
 import org.apache.ibatis.annotations.Param;
5 6
 
@@ -21,4 +22,7 @@ public interface EPaperVerifyMapper {
21 22
 
22 23
     //识别正确跳过
23 24
     void correctSkip(@Param("epsid") Integer epsid);
25
+
26
+    //获取试卷原试题答案
27
+    List<EPaperQtypeQuestion> listPaperAnswer(@Param("epid") Integer epid);
24 28
 }

+ 60
- 0
src/main/java/com/xhkjedu/model/EPaperQtypeQuestion.java Vedi File

@@ -0,0 +1,60 @@
1
+package com.xhkjedu.model;
2
+
3
+import lombok.Data;
4
+
5
+import javax.persistence.Id;
6
+import javax.persistence.Table;
7
+
8
+@Table(name = "e_paper_qtype_question")
9
+@Data
10
+public class EPaperQtypeQuestion extends BaseBean {
11
+    @Id
12
+    //考试试卷题型试题表
13
+    private Integer eptqid;
14
+
15
+    //考试试卷题型表id
16
+    private Integer eptid;
17
+
18
+    //考试试卷表id
19
+    private Integer epid;
20
+
21
+    //处理题型
22
+    private Integer ctype;
23
+
24
+    //试题id
25
+    private String questionid;
26
+
27
+    //题型id
28
+    private String qtypeid;
29
+
30
+    //题型名称
31
+    private String qtypename;
32
+
33
+    //试题分值
34
+    private Double score;
35
+
36
+    //试题排序
37
+    private Integer qorder;
38
+
39
+    //题号
40
+    private String qn;
41
+
42
+    //选项数量
43
+    private Integer optionnum;
44
+
45
+    //正确答案
46
+    private String answer;
47
+
48
+    //坐标
49
+    private String coord;
50
+
51
+    //作文格数
52
+    private Integer gnum;
53
+
54
+    //答题区高度
55
+    private Integer height;
56
+
57
+    //答题区富文本
58
+    private String queshtml;
59
+
60
+}

+ 7
- 0
src/main/java/com/xhkjedu/service/EPaperVerifyService.java Vedi File

@@ -33,4 +33,11 @@ public class EPaperVerifyService {
33 33
     public void correctSkip(Integer epsid) {
34 34
         ePaperVerifyMapper.correctSkip(epsid);
35 35
     }
36
+
37
+    public void correctSave(){
38
+
39
+    }
40
+
41
+
36 42
 }
43
+

+ 30
- 0
src/main/java/com/xhkjedu/vo/PaperStudentParams.java Vedi File

@@ -0,0 +1,30 @@
1
+package com.xhkjedu.vo;
2
+
3
+import com.xhkjedu.model.EPaperStudentQuestion;
4
+import lombok.Data;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * @Description
10
+ * @Author WN
11
+ * Date 2022/7/28 17:15
12
+ **/
13
+@Data
14
+public class PaperStudentParams {
15
+
16
+    private Integer epid;//试卷id
17
+
18
+    private Integer studentid;//学生id
19
+
20
+    //试卷学生id
21
+    private Integer epsid;
22
+
23
+    //学生答题卡图片
24
+    private String stupic;
25
+
26
+    private String examno;//学生准考证号
27
+
28
+    //试卷中试题
29
+    private List<EPaperStudentQuestion> questions;
30
+}

+ 28
- 9
src/main/resources/EPaperVerifyMapper.xml Vedi File

@@ -12,20 +12,33 @@
12 12
 
13 13
     <!--获取学生试卷及试题作答-->
14 14
     <resultMap id="stuPaper" type="java.util.Map">
15
-        <result column="epsid" property="epsid"></result>
16
-        <result column="stupic" property="stupic"></result>
15
+        <result column="epsid" property="epsid" />
16
+        <result column="epid" property="epid" />
17
+        <result column="stupic" property="stupic" />
18
+        <result column="studentid" property="studentid" />
19
+        <result column="username" property="username" />
20
+        <result column="examno" property="examno" />
21
+        <result column="classid" property="classid" />
22
+        <result column="classname" property="classname" />
23
+        <result column="gradeid" property="gradeid" />
17 24
         <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
18
-            <result column="qtypename" property="qtypename"></result>
19
-            <result column="epsqid" property="epsqid"></result>
20
-            <result column="qn" property="qn"></result>
21
-            <result column="ctype" property="ctype"></result>
22
-            <result column="stuanswer" property="stuanswer"></result>
25
+            <result column="qtypename" property="qtypename" />
26
+            <result column="epsqid" property="epsqid" />
27
+            <result column="epsqid" property="epsqid" />
28
+            <result column="eptqid" property="eptqid" />
29
+            <result column="qn" property="qn" />
30
+            <result column="ctype" property="ctype" />
31
+            <result column="answered" property="answered" />
32
+            <result column="answertype" property="answertype" />
33
+            <result column="stuanswer" property="stuanswer" />
23 34
         </collection>
24 35
     </resultMap>
25 36
     <select id="getStudentPaper" resultMap="stuPaper">
26
-        SELECT ps.epsid,ps.stupic,pt.qtypename,psq.epsqid,psq.qn,psq.ctype,psq.stuanswer
27
-        FROM e_paper_student0608 ps LEFT JOIN e_paper_student_question0608 psq ON ps.epsid=psq.epsid and psq.ctype in(1,2,4,5,6,7,8,10,16,17)
37
+        SELECT ps.epsid,ps.epid,ps.stupic,ps.studentid,u.username,u.examno,ps.classid,c.classname,pt.qtypename,psq.epsqid,psq.eptqid,psq.qn,psq.ctype,psq.stuanswer
38
+        FROM e_paper_student0608 ps LEFT JOIN e_paper_student_question0608 psq ON ps.epsid=psq.epsid
28 39
         left JOIN e_paper_qtype_question pt ON psq.eptqid=pt.eptid
40
+        left join t_user u on ps.studentid=u.userid
41
+        left join t_class c on ps.classid=c.classid
29 42
         WHERE ps.examid=#{ps.examid} AND ps.subjectid=#{ps.subjectid} AND ps.studentid=#{ps.studentid} and ps.verified=#{ps.verified}
30 43
     </select>
31 44
     <!--识别正确跳过-->
@@ -33,4 +46,10 @@
33 46
         UPDATE e_paper_student0608 ps LEFT JOIN e_paper_student ps2 ON ps.epsid=ps2.epsid
34 47
         SET ps.verified=1,ps2.verified=1 WHERE ps.epsid=#{epsid}
35 48
     </update>
49
+
50
+    <!--获取原试卷中试题正确答案-->
51
+    <select id="listPaperAnswer" resultType="com.xhkjedu.model.EPaperQtypeQuestion">
52
+        select eptqid,eptid,epid,ctype,questionid,qtypeid,qtypename,qn,score,qorder,answer
53
+        from e_paper_qtype_question where epid=#{epid} order by qorder
54
+    </select>
36 55
 </mapper>

Loading…
Annulla
Salva