|
@@ -1292,4 +1292,52 @@
|
|
|
t_f_flow_approve e ON a.flow_id = e.flow_id
|
|
|
where a.id = #{examTaskId}
|
|
|
</select>
|
|
|
+ <select id="listExamTaskDetailDownload"
|
|
|
+ resultType="com.qmth.distributed.print.business.bean.dto.ExamTaskDetailDto">
|
|
|
+ SELECT
|
|
|
+ a.id,
|
|
|
+ be.name examName,
|
|
|
+ bs.name semesterName,
|
|
|
+ a.course_code courseCode,
|
|
|
+ a.course_name courseName,
|
|
|
+ a.paper_number paperNumber,
|
|
|
+ b.enable,
|
|
|
+ b.paper_type paperType,
|
|
|
+ b.exposed_paper_type exposedPaperType,
|
|
|
+ b.unexposed_paper_type unexposedPaperType
|
|
|
+ FROM
|
|
|
+ exam_task a
|
|
|
+ LEFT JOIN
|
|
|
+ exam_task_detail b ON a.id = b.exam_task_id
|
|
|
+ LEFT JOIN
|
|
|
+ basic_course bc ON a.school_id = bc.school_id and a.course_code = b.code
|
|
|
+ LEFT JOIN
|
|
|
+ basic_card_rule e ON a.card_rule_id = e.id
|
|
|
+ LEFT JOIN
|
|
|
+ basic_exam be ON a.exam_id = be.id
|
|
|
+ LEFT JOIN
|
|
|
+ basic_semester bs ON be.semester_id = bs.id
|
|
|
+ LEFT JOIN
|
|
|
+ t_f_flow_approve g ON g.flow_id = a.flow_id
|
|
|
+ <where>
|
|
|
+ a.status = 'SUBMIT'
|
|
|
+ AND (a.review = 0
|
|
|
+ OR (a.review = 1 AND g.status = 'FINISH'))
|
|
|
+ <if test="semesterId != null and semesterId != ''">
|
|
|
+ and be.semester_id = #{semesterId}
|
|
|
+ </if>
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and a.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ <if test="courseName != null and courseName != ''">
|
|
|
+ and a.course_name like concat('%', #{courseName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="orgIds != null">
|
|
|
+ and bc.teaching_room_id in
|
|
|
+ <foreach collection="orgIds" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|