|
@@ -105,16 +105,14 @@
|
|
|
so.name belongOrgName,
|
|
|
bs.major_name majorName,
|
|
|
bs.clazz_name clazzName,
|
|
|
+ pst.scan_task_name scanTaskName,
|
|
|
pst.course_code courseCode,
|
|
|
pst.course_name courseName,
|
|
|
pstd.teacher_name teacherName,
|
|
|
pstd.teach_clazz_name teachClazzName,
|
|
|
pst.create_time createTime
|
|
|
FROM
|
|
|
- paper_archives pa
|
|
|
- JOIN
|
|
|
- paper_scan_task pst ON pa.school_id = pst.school_id
|
|
|
- AND pa.id = pst.paper_archives_id
|
|
|
+ paper_scan_task pst
|
|
|
LEFT JOIN
|
|
|
paper_scan_task_detail pstd ON pst.id = pstd.paper_scan_task_id
|
|
|
LEFT JOIN
|
|
@@ -122,8 +120,9 @@
|
|
|
LEFT JOIN
|
|
|
sys_org so ON bs.belong_org_id = so.id
|
|
|
<where>
|
|
|
- <if test="paperArchivesId != null">
|
|
|
- and pa.id = #{paperArchivesId}
|
|
|
+ pst.paper_archives_id = #{paperArchivesId}
|
|
|
+ <if test="paperScanTaskId != null">
|
|
|
+ and pst.id = #{paperScanTaskId}
|
|
|
</if>
|
|
|
<if test="belongOrgId != null">
|
|
|
and bs.belong_org_id = #{belongOrgId}
|
|
@@ -138,7 +137,7 @@
|
|
|
and pst.course_name = #{courseName}
|
|
|
</if>
|
|
|
<if test="teacherName != null and teacherName != ''">
|
|
|
- and pstd.teacher_name like concat('%',#{teacherName},'%')
|
|
|
+ and pstd.teacher_name like concat(#{teacherName},'%')
|
|
|
</if>
|
|
|
<if test="teachClazzName != null and teachClazzName != ''">
|
|
|
and pstd.teach_clazz_name = #{teachClazzName}
|
|
@@ -152,9 +151,10 @@
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="param != null and param != ''">
|
|
|
- and (bs.student_name like concat('%',#{param},'%') or bs.student_code like concat('%',#{param},'%'))
|
|
|
+ and (bs.student_name like concat(#{param},'%') or bs.student_code like concat(#{param},'%'))
|
|
|
</if>
|
|
|
</where>
|
|
|
+ order by pst.scan_task_name, bs.student_code
|
|
|
</select>
|
|
|
<select id="queryManagerUser" resultType="com.qmth.paper.library.business.bean.result.SelectResult">
|
|
|
SELECT
|
|
@@ -184,8 +184,7 @@
|
|
|
FROM
|
|
|
paper_archives pa
|
|
|
JOIN
|
|
|
- paper_scan_task pst ON pa.school_id = pst.school_id
|
|
|
- AND pa.id = pst.paper_archives_id
|
|
|
+ paper_scan_task pst ON pa.id = pst.paper_archives_id
|
|
|
LEFT JOIN
|
|
|
paper_scan_task_detail pstd ON pst.id = pstd.paper_scan_task_id
|
|
|
LEFT JOIN
|