|
@@ -3,24 +3,39 @@
|
3
|
3
|
<mapper namespace="com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper">
|
4
|
4
|
|
5
|
5
|
<!--学生进行中考试列表-->
|
6
|
|
- <select id="listExamPaperForStudent" resultType="java.util.Map">
|
7
|
|
- select es.esid,es.examid,es.subjectid,ts.subjectname,es.sdate,es.begintime,es.endtime,
|
8
|
|
- e.examname,e.gradeid,e.examtype,ep.epid
|
9
|
|
- from e_subject es left join e_paper ep on es.esid=ep.esid
|
10
|
|
- left join e_base e on es.examid=e.examid
|
11
|
|
- left join e_class_student s on es.examid=s.examid
|
12
|
|
- left join t_subject ts on es.subjectid=ts.subjectid
|
13
|
|
- where s.studentid=#{eps.studentid} and e.examstate=1
|
|
6
|
+ <select id="listExamPapersForStudent" resultType="java.util.Map">
|
|
7
|
+ select es.esid,es.examid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,
|
|
8
|
+ e.examname,e.gradeid,e.examtype,ep.epid
|
|
9
|
+ from e_paper_student eps left join e_subject es on eps.esid=es.esid
|
|
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
|
14
|
12
|
order by abs(UNIX_TIMESTAMP(concat(es.sdate,' ',es.begintime))-UNIX_TIMESTAMP())
|
15
|
13
|
</select>
|
16
|
14
|
|
17
|
|
- <!--学生及已结束考试-->
|
18
|
|
- <select id="listExamsForStudent" resultType="java.util.Map">
|
|
15
|
+ <resultMap id="examsEndForStu" type="java.util.Map">
|
|
16
|
+ <result property="examid" column="examid"></result>
|
|
17
|
+ <result property="examname" column="examname"></result>
|
|
18
|
+ <result property="examdate" column="examdate"></result>
|
|
19
|
+ <result property="gradeid" column="gradeid"></result>
|
|
20
|
+ <result property="examtype" column="examtype"></result>
|
|
21
|
+ <result property="exammode" column="exammode"></result>
|
|
22
|
+ <result property="examcomm" column="examcomm"></result>
|
|
23
|
+ <collection property="subjects" ofType="java.util.Map" javaType="java.util.List">
|
|
24
|
+ <result property="esid" column="esid"></result>
|
|
25
|
+ <result property="subjectid" column="subjectid"></result>
|
|
26
|
+ <result property="subjectname" column="subjectname"></result>
|
|
27
|
+ <result property="sdate" column="sdate"></result>
|
|
28
|
+ <result property="begintime" column="begintime"></result>
|
|
29
|
+ <result property="endtime" column="endtime"></result>
|
|
30
|
+ </collection>
|
|
31
|
+ </resultMap>
|
|
32
|
+ <!--学生已结束考试列表-->
|
|
33
|
+ <select id="listExamsEndForStudent" resultMap="examsEndForStu">
|
19
|
34
|
select e.examid,e.examname,e.examdate,e.gradeid,e.examtype,e.exammode,e.examcomm,
|
20
|
35
|
es.esid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime
|
21
|
36
|
from e_subject es left join e_base e on es.examid=e.examid
|
22
|
37
|
left join e_class_student cs on es.examid=cs.examid
|
23
|
|
- where cs.studentid=14 and e.examstate=0 group by es.esid
|
|
38
|
+ where cs.studentid=#{studentid} and e.examstate=2 group by es.esid
|
24
|
39
|
order by e.examdate desc,es.sdate desc,es.begintime desc
|
25
|
40
|
</select>
|
26
|
41
|
|