|
@@ -323,19 +323,8 @@
|
|
<if test="query.studentCodeOrName != null and query.studentCodeOrName !=''">
|
|
<if test="query.studentCodeOrName != null and query.studentCodeOrName !=''">
|
|
and (t.student_code=#{query.studentCodeOrName} or bes.student_name=#{query.studentCodeOrName})
|
|
and (t.student_code=#{query.studentCodeOrName} or bes.student_name=#{query.studentCodeOrName})
|
|
</if>
|
|
</if>
|
|
- <if test="dpr != null">
|
|
|
|
- <if test="dpr.requestUserId != null">
|
|
|
|
- AND t.create_id = #{dpr.requestUserId}
|
|
|
|
- </if>
|
|
|
|
- <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
- AND bc.teaching_room_id IN
|
|
|
|
- <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="query.markPaperStatus != null">
|
|
|
|
- and s.status = #{query.markPaperStatus}
|
|
|
|
|
|
+ <if test="dpr != null and dpr.requestUserId != null">
|
|
|
|
+ AND t.create_id = #{dpr.requestUserId}
|
|
</if>
|
|
</if>
|
|
</sql>
|
|
</sql>
|
|
<select id="queryPage"
|
|
<select id="queryPage"
|
|
@@ -362,11 +351,20 @@
|
|
t.paper_number coursePaperNumber,
|
|
t.paper_number coursePaperNumber,
|
|
c.paper_count cardPaperCount
|
|
c.paper_count cardPaperCount
|
|
from mark_student t
|
|
from mark_student t
|
|
- left join (select * from basic_exam_student where exam_id=#{query.examId}) bes on t.basic_student_id = bes.id
|
|
|
|
|
|
+ inner join basic_exam_student bes on t.basic_student_id = bes.id
|
|
left join scan_answer_card c on t.exam_id=c.exam_id and t.card_number=c.number
|
|
left join scan_answer_card c on t.exam_id=c.exam_id and t.card_number=c.number
|
|
- left join mark_paper s on s.course_paper_id=t.course_paper_id and s.exam_id=t.exam_id
|
|
|
|
|
|
+ inner join mark_paper s on s.course_paper_id=t.course_paper_id and s.exam_id=t.exam_id
|
|
|
|
+ <if test="query.markPaperStatus != null">
|
|
|
|
+ and s.status = #{query.markPaperStatus}
|
|
|
|
+ </if>
|
|
left join sys_user su on t.create_id = su.id
|
|
left join sys_user su on t.create_id = su.id
|
|
- left join basic_course bc on t.course_id = bc.id
|
|
|
|
|
|
+ inner join basic_course bc on t.course_id = bc.id
|
|
|
|
+ <if test="dpr != null and dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
+ AND bc.teaching_room_id IN
|
|
|
|
+ <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
<include refid="queryWhereAndOrder"/>
|
|
<include refid="queryWhereAndOrder"/>
|
|
order by t.id
|
|
order by t.id
|
|
</select>
|
|
</select>
|
|
@@ -374,10 +372,19 @@
|
|
select
|
|
select
|
|
t.id
|
|
t.id
|
|
from mark_student t
|
|
from mark_student t
|
|
- left join (select * from basic_exam_student where exam_id=#{query.examId}) bes on t.basic_student_id = bes.id
|
|
|
|
- left join mark_paper s on s.course_paper_id=t.course_paper_id and s.exam_id=t.exam_id
|
|
|
|
|
|
+ inner join basic_exam_student bes on t.basic_student_id = bes.id
|
|
|
|
+ inner join mark_paper s on s.course_paper_id=t.course_paper_id and s.exam_id=t.exam_id
|
|
|
|
+ <if test="query.markPaperStatus != null">
|
|
|
|
+ and s.status = #{query.markPaperStatus}
|
|
|
|
+ </if>
|
|
left join sys_user su on t.create_id = su.id
|
|
left join sys_user su on t.create_id = su.id
|
|
- left join basic_course bc on t.course_id = bc.id
|
|
|
|
|
|
+ inner join basic_course bc on t.course_id = bc.id
|
|
|
|
+ <if test="dpr != null and dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
+ AND bc.teaching_room_id IN
|
|
|
|
+ <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
<include refid="queryWhereAndOrder"/>
|
|
<include refid="queryWhereAndOrder"/>
|
|
order by t.id
|
|
order by t.id
|
|
</select>
|
|
</select>
|