|
@@ -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>
|