|
@@ -50,7 +50,8 @@
|
|
|
a.*
|
|
|
FROM
|
|
|
exam_detail a
|
|
|
- LEFT JOIN basic_exam b ON a.exam_id = b.id
|
|
|
+ LEFT JOIN exam_print_plan epp ON a.print_plan_id = epp.id
|
|
|
+ LEFT JOIN basic_exam b ON epp.exam_id = b.id
|
|
|
<where>
|
|
|
<if test="schoolId != null">
|
|
|
and a.school_id = #{schoolId}
|
|
@@ -59,7 +60,7 @@
|
|
|
and b.semester_id = #{semesterId}
|
|
|
</if>
|
|
|
<if test="examId != null">
|
|
|
- and a.exam_id = #{examId}
|
|
|
+ and epp.exam_id = #{examId}
|
|
|
</if>
|
|
|
<if test="printPlanId != null">
|
|
|
and a.print_plan_id = #{printPlanId}
|
|
@@ -102,9 +103,10 @@
|
|
|
1
|
|
|
FROM
|
|
|
exam_detail ed
|
|
|
+ LEFT JOIN exam_print_plan epp ON ed.print_plan_id = epp.id
|
|
|
WHERE
|
|
|
edc.exam_detail_id = ed.id
|
|
|
- AND ed.exam_id = #{examId})
|
|
|
+ AND epp.exam_id = #{examId})
|
|
|
GROUP BY exam_detail_id) c ON ed.id = c.exam_detail_id
|
|
|
LEFT JOIN
|
|
|
exam_print_plan epp ON ed.print_plan_id = epp.id
|
|
@@ -123,10 +125,11 @@
|
|
|
1
|
|
|
FROM
|
|
|
exam_detail ed
|
|
|
+ LEFT JOIN exam_print_plan epp ON ed.print_plan_id = epp.id
|
|
|
WHERE
|
|
|
edc.exam_detail_id = ed.id
|
|
|
- AND ed.exam_id = #{examId})) edc
|
|
|
- JOIN
|
|
|
+ AND epp.exam_id = #{examId})) edc
|
|
|
+ LEFT JOIN
|
|
|
(SELECT
|
|
|
*
|
|
|
FROM
|
|
@@ -426,7 +429,8 @@
|
|
|
a.*
|
|
|
FROM
|
|
|
exam_detail a
|
|
|
- LEFT JOIN basic_exam b ON a.exam_id = b.id
|
|
|
+ LEFT JOIN exam_print_plan epp ON a.print_plan_id = epp.id
|
|
|
+ LEFT JOIN basic_exam b ON epp.exam_id = b.id
|
|
|
<where>
|
|
|
<if test="schoolId != null">
|
|
|
and a.school_id = #{schoolId}
|
|
@@ -435,7 +439,7 @@
|
|
|
and b.semester_id = #{semesterId}
|
|
|
</if>
|
|
|
<if test="examId != null">
|
|
|
- and a.exam_id = #{examId}
|
|
|
+ and epp.exam_id = #{examId}
|
|
|
</if>
|
|
|
<if test="printPlanId != null">
|
|
|
and a.print_plan_id = #{printPlanId}
|
|
@@ -479,9 +483,10 @@
|
|
|
1
|
|
|
FROM
|
|
|
exam_detail ed
|
|
|
+ LEFT JOIN exam_print_plan epp ON ed.print_plan_id = epp.id
|
|
|
WHERE
|
|
|
edc.exam_detail_id = ed.id
|
|
|
- AND ed.exam_id = #{examId})) edc
|
|
|
+ AND epp.exam_id = #{examId})) edc
|
|
|
JOIN
|
|
|
(SELECT
|
|
|
*
|
|
@@ -490,6 +495,7 @@
|
|
|
WHERE
|
|
|
exam_id = #{examId}) et ON edc.course_code = et.course_code
|
|
|
AND edc.paper_number = et.paper_number
|
|
|
+ left join sys_user su ON et.user_id = su.id
|
|
|
WHERE
|
|
|
ed.id = edc.exam_detail_id
|
|
|
<if test="courseCode != null and courseCode != ''">
|