|
@@ -7,7 +7,7 @@
|
|
from exam_card_model_four ecmf
|
|
from exam_card_model_four ecmf
|
|
left join basic_course bc on ecmf.course_id = bc.id
|
|
left join basic_course bc on ecmf.course_id = bc.id
|
|
left join basic_exam be on be.id = ecmf.exam_id
|
|
left join basic_exam be on be.id = ecmf.exam_id
|
|
- left join basic_exam_student bes on bes.semester_id = be.semester_id and bes.exam_id = be.id and bes.course_id = bc.id
|
|
|
|
|
|
+ left join mark_paper mp on mp.exam_id = be.id and mp.course_id = bc.id
|
|
<where>
|
|
<where>
|
|
ecmf.school_id = #{schoolId}
|
|
ecmf.school_id = #{schoolId}
|
|
<if test="semesterId != null and semesterId != ''">
|
|
<if test="semesterId != null and semesterId != ''">
|
|
@@ -20,7 +20,7 @@
|
|
AND bc.id = #{courseId}
|
|
AND bc.id = #{courseId}
|
|
</if>
|
|
</if>
|
|
<if test="paperNumber != null and paperNumber != ''">
|
|
<if test="paperNumber != null and paperNumber != ''">
|
|
- AND bes.paper_number = #{paperNumber}
|
|
|
|
|
|
+ AND mp.paper_number = #{paperNumber}
|
|
</if>
|
|
</if>
|
|
<if test="openCollegeId != null and openCollegeId != ''">
|
|
<if test="openCollegeId != null and openCollegeId != ''">
|
|
AND bc.teaching_room_id = #{openCollegeId}
|
|
AND bc.teaching_room_id = #{openCollegeId}
|
|
@@ -32,8 +32,11 @@
|
|
<if test="dpr.requestUserId != null">
|
|
<if test="dpr.requestUserId != null">
|
|
AND ecmf.create_id = #{dpr.requestUserId}
|
|
AND ecmf.create_id = #{dpr.requestUserId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="dpr.courseUserId != null">
|
|
|
|
+ AND EXISTS( SELECT 1 FROM (select course_id from teach_course where user_id = #{dpr.courseUserId}) tc WHERE tc.course_id = ecmf.course_id)
|
|
|
|
+ </if>
|
|
<if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
<if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
- AND ecmf.org_id IN
|
|
|
|
|
|
+ AND bc.teaching_room_id IN
|
|
<foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
<foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|