|
@@ -4,11 +4,11 @@
|
4
|
4
|
|
5
|
5
|
<!--学生进行中考试列表-->
|
6
|
6
|
<select id="listExamPapersForStudent" resultType="java.util.Map">
|
7
|
|
- select es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
|
|
7
|
+ select eps.epsid, es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
|
8
|
8
|
e.examname,e.gradeid,e.examtype,ep.epid
|
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
|
|
- where eps.studentid=#{studentid} and e.examstate=1
|
|
11
|
+ where e.deleted=1 and eps.studentid=#{studentid} and e.examstate=1 GROUP BY eps.epsid
|
12
|
12
|
order by abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())
|
13
|
13
|
</select>
|
14
|
14
|
|
|
@@ -32,11 +32,121 @@
|
32
|
32
|
<!--学生已结束考试列表-->
|
33
|
33
|
<select id="listExamsEndForStudent" resultMap="examsEndForStu">
|
34
|
34
|
select e.examid,e.examname,e.examdate,e.gradeid,e.examtype,e.exammode,e.examcomm,
|
35
|
|
- es.esid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime
|
|
35
|
+ es.esid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime
|
36
|
36
|
from e_subject es left join e_base e on es.examid=e.examid
|
37
|
|
- left join e_class_student cs on es.examid=cs.examid
|
38
|
|
- where cs.studentid=#{studentid} and e.examstate=2 group by es.esid
|
|
37
|
+ left join e_paper_student eps on es.examid=eps.examid
|
|
38
|
+ where e.deleted=1 and eps.studentid=#{studentid} and e.examstate=2 group by es.esid
|
39
|
39
|
order by e.examdate desc,es.sdate desc,es.begintime desc
|
40
|
40
|
</select>
|
41
|
41
|
|
|
42
|
+ <!--考试试卷基本信息-->
|
|
43
|
+ <select id="getExamSubjectByEpsid" resultType="com.xhkjedu.sexam.vo.paperstudent.EPaperStudentVo">
|
|
44
|
+ select ps.epsid,ps.examid,ps.esid,ps.classid,ps.studentid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
|
|
45
|
+ e.examname,ps.epid,p.ptype,p.pnum,p.pscore
|
|
46
|
+ from e_paper_student ps left join e_subject es on ps.esid=es.esid
|
|
47
|
+ left join e_base e on ps.examid=ps.examid
|
|
48
|
+ left join e_paper p on ps.epid=p.epid
|
|
49
|
+ where ps.epsid=#{epsid}
|
|
50
|
+ </select>
|
|
51
|
+ <!--学生试卷题库(android)-->
|
|
52
|
+ <select id="listStuPaperQuestionsForAndroid" resultType="java.util.Map">
|
|
53
|
+ select distinct psq.epsqid,psq.questionid,psq.qn,psq.qorder,psq.answered,psq.ansertype,psq.stuanswer,
|
|
54
|
+ psq.stuanswertxt,psq.eptqid,pq.score,q.qstem,q.qoption,q.ctype,q.hearfile,q.qtypeid,
|
|
55
|
+ q.qtypename,q.qlevel,q.snum,q.sorder,q.questionpid,mq.questionid mquestionid,mq.qstem mqstem,
|
|
56
|
+ mq.qoption mqoption,mq.ctype mctype,mq.qtypeid mqtypeid,mq.qtypename mqtypename
|
|
57
|
+ from e_paper_student_question psq left join e_paper_qtype_question pq on psq.eptqid=pq.eptqid
|
|
58
|
+ left join t_question q on psq.questionid=q.questionid
|
|
59
|
+ left join t_question mq on q.questionpid=mq.questionid
|
|
60
|
+ where psq.epsid=#{epsid} order by psq.qorder
|
|
61
|
+ </select>
|
|
62
|
+ <!--学生试卷附件(android)-->
|
|
63
|
+ <select id="listStuPaperFjQuestionsForAndroid" resultType="java.util.Map">
|
|
64
|
+ select distinct psq.epsqid,psq.questionid,psq.qn,psq.qorder,psq.answered,psq.ansertype,psq.stuanswer,
|
|
65
|
+ psq.stuanswertxt,psq.eptqid,pq.score,pq.optionnum,pq.ctype,pq.qtypeid,pq.qtypename
|
|
66
|
+ from e_paper_student_question psq left join e_paper_qtype_question pq on psq.eptqid=pq.eptqid
|
|
67
|
+ where psq.epsid=#{epsid} order by psq.qorder
|
|
68
|
+ </select>
|
|
69
|
+
|
|
70
|
+ <resultMap id="qtypesQuestion" type="com.xhkjedu.sexam.vo.paper.EPaperQtypeVo">
|
|
71
|
+ <result column="eptid" property="eptid"></result>
|
|
72
|
+ <result column="ctype" property="ctype"></result>
|
|
73
|
+ <result column="eptname" property="eptname"></result>
|
|
74
|
+ <result column="eptnum" property="eptnum"></result>
|
|
75
|
+ <result column="eptorder" property="eptorder"></result>
|
|
76
|
+ <result column="eptscore" property="eptscore"></result>
|
|
77
|
+ <collection property="questions" ofType="com.xhkjedu.sexam.vo.paper.EPaperQtypeQuestionVo" javaType="java.util.List">
|
|
78
|
+ <result column="epsqid" property="epsqid"></result>
|
|
79
|
+ <result column="questionid" property="questionid"></result>
|
|
80
|
+ <result column="qscore" property="qscore"></result>
|
|
81
|
+ <result column="qorder" property="qorder"></result>
|
|
82
|
+ <result column="answered" property="answered"></result>
|
|
83
|
+ <result column="ansertype" property="ansertype"></result>
|
|
84
|
+ <result column="stuanswer" property="stuanswer"></result>
|
|
85
|
+ <result column="stuanswertxt" property="stuanswertxt"></result>
|
|
86
|
+ <result column="eptqid" property="eptqid"></result>
|
|
87
|
+ <result column="qtypeid" property="qtypeid"></result>
|
|
88
|
+ <result column="qtypename" property="qtypename"></result>
|
|
89
|
+ <result column="qctype" property="qctype"></result>
|
|
90
|
+ <result column="qstem" property="qstem"></result>
|
|
91
|
+ <result column="qoption" property="qoption"></result>
|
|
92
|
+ <result column="qanswer" property="qanswer"></result>
|
|
93
|
+ <result column="qanalyze" property="qanalyze"></result>
|
|
94
|
+ <result column="qlevel" property="qlevel"></result>
|
|
95
|
+ <result column="sorder" property="sorder"></result>
|
|
96
|
+ <result column="snum" property="snum"></result>
|
|
97
|
+ <result column="questionpid" property="questionpid"></result>
|
|
98
|
+ <result column="mquestionid" property="mquestionid"></result>
|
|
99
|
+ <result column="mqstem" property="mqstem"></result>
|
|
100
|
+ <result column="mqtypeid" property="mqtypeid"></result>
|
|
101
|
+ <result column="mqtypename" property="mqtypename"></result>
|
|
102
|
+ <result column="mctype" property="mctype"></result>
|
|
103
|
+ </collection>
|
|
104
|
+ </resultMap>
|
|
105
|
+ <!--试题详情-->
|
|
106
|
+ <!--学生试卷题库(web)-->
|
|
107
|
+ <select id="listStuPaperQuestionsForWeb" resultMap="qtypesQuestion">
|
|
108
|
+ select pt.eptid,pt.ctype,pt.eptname,pt.eptnum,pt.eptorder,pt.eptscore,
|
|
109
|
+ psq.epsqid,psq.questionid,psq.qorder,psq.qscore,psq.answered,psq.ansertype,psq.stuanswer,
|
|
110
|
+ psq.stuanswertxt,psq.eptqid,q.qstem,q.qoption,q.ctype qctype,q.hearfile,q.qtypeid,
|
|
111
|
+ q.qtypename,q.qlevel,q.snum,q.sorder,q.questionpid,mq.questionid mquestionid,mq.qstem mqstem,
|
|
112
|
+ mq.qoption mqoption,mq.ctype mctype,mq.qtypeid mqtypeid,mq.qtypename mqtypename
|
|
113
|
+ from e_paper_student_question psq
|
|
114
|
+ left join e_paper_qtype pt on psq.epid=pt.epid
|
|
115
|
+ left join t_question q on psq.questionid=q.questionid
|
|
116
|
+ left join t_question mq on q.questionpid=mq.questionid
|
|
117
|
+ where psq.epsid=#{epsid} order by pt.eptorder,psq.qorder
|
|
118
|
+ </select>
|
|
119
|
+
|
|
120
|
+ <resultMap id="fjtypeQuestions" type="com.xhkjedu.sexam.vo.paper.EPaperQtypeVo">
|
|
121
|
+ <result column="eptid" property="eptid"></result>
|
|
122
|
+ <result column="ctype" property="ctype"></result>
|
|
123
|
+ <result column="eptname" property="eptname"></result>
|
|
124
|
+ <result column="eptnum" property="eptnum"></result>
|
|
125
|
+ <result column="eptorder" property="eptorder"></result>
|
|
126
|
+ <result column="eptscore" property="eptscore"></result>
|
|
127
|
+ <collection property="questions" ofType="java.util.Map" javaType="java.util.Map">
|
|
128
|
+ <result column="epsqid" property="epsqid"></result>
|
|
129
|
+ <result column="score" property="score"></result>
|
|
130
|
+ <result column="qorder" property="qorder"></result>
|
|
131
|
+ <result column="qn" property="qn"></result>
|
|
132
|
+ <result column="eptqid" property="eptqid"></result>
|
|
133
|
+ <result column="qtypeid" property="qtypeid"></result>
|
|
134
|
+ <result column="qtypename" property="qtypename"></result>
|
|
135
|
+ <result column="qctype" property="qctype"></result>
|
|
136
|
+ <result column="optionnum" property="optionnum"></result>
|
|
137
|
+ <result column="answered" property="answered"></result>
|
|
138
|
+ <result column="ansertype" property="ansertype"></result>
|
|
139
|
+ <result column="stuanswer" property="stuanswer"></result>
|
|
140
|
+ <result column="stuanswertxt" property="stuanswertxt"></result>
|
|
141
|
+ </collection>
|
|
142
|
+ </resultMap>
|
|
143
|
+ <!--学生试卷附件(web)-->
|
|
144
|
+ <select id="listStuPaperFjQuestionsForWeb" resultMap="fjtypeQuestions">
|
|
145
|
+ select pt.eptid,pt.ctype,pt.eptname,pt.eptnum,pt.eptorder,pt.eptscore,
|
|
146
|
+ psq.epsqid,psq.qn,psq.qorder,psq.answered,psq.ansertype,psq.stuanswer,
|
|
147
|
+ psq.stuanswertxt,psq.eptqid,psq.qscore score,pq.optionnum,pq.ctype qctype,pq.qtypeid,pq.qtypename
|
|
148
|
+ from e_paper_student_question psq left join e_paper_qtype_question pq on psq.eptqid=pq.eptqid
|
|
149
|
+ left join e_paper_qtype pt on psq.epid=pt.epid
|
|
150
|
+ where psq.epsid=#{epsid} order by pt.eptorder, psq.qorder
|
|
151
|
+ </select>
|
42
|
152
|
</mapper>
|