|
@@ -31,11 +31,11 @@
|
|
|
<select id="findPrintPlanPage"
|
|
|
resultType="com.qmth.distributed.print.business.bean.result.PrintPlanResult">
|
|
|
SELECT
|
|
|
- id,
|
|
|
- name,
|
|
|
- exam_start_time AS examStartTime,
|
|
|
- exam_end_time AS examEndTime,
|
|
|
- status,
|
|
|
+ a.id,
|
|
|
+ a.name,
|
|
|
+ a.exam_start_time AS examStartTime,
|
|
|
+ a.exam_end_time AS examEndTime,
|
|
|
+ a.status,
|
|
|
(
|
|
|
SELECT
|
|
|
COUNT(
|
|
@@ -44,34 +44,56 @@
|
|
|
exam_detail_course
|
|
|
WHERE
|
|
|
exam_detail_id IN ( SELECT id FROM exam_detail WHERE print_plan_id = 1 )) AS totalGates,
|
|
|
- print_content AS printContent,
|
|
|
- backup_method AS backupMethod,
|
|
|
- backup_count AS backupCount,
|
|
|
- draw_rule AS drawRule,
|
|
|
- variable_content AS variableContentTemp,
|
|
|
- ordinary_content AS ordinaryContentTemp,
|
|
|
- create_id AS createId,
|
|
|
- create_time AS createTime
|
|
|
+ a.print_content AS printContent,
|
|
|
+ a.backup_method AS backupMethod,
|
|
|
+ a.backup_count AS backupCount,
|
|
|
+ a.draw_rule AS drawRule,
|
|
|
+ a.variable_content AS variableContentTemp,
|
|
|
+ a.ordinary_content AS ordinaryContentTemp,
|
|
|
+ a.create_id AS createId,
|
|
|
+ a.create_time AS createTime
|
|
|
FROM
|
|
|
- exam_print_plan
|
|
|
+ exam_print_plan a
|
|
|
+ LEFT JOIN
|
|
|
+ sys_user b on a.create_id = b.id
|
|
|
<where>
|
|
|
<if test="schoolId != null and schoolId > 0">
|
|
|
- and school_id = #{schoolId}
|
|
|
+ and a.school_id = #{schoolId}
|
|
|
</if>
|
|
|
<if test="printPlanId != null and printPlanId > 0">
|
|
|
- and id = #{printPlanId}
|
|
|
+ and a.id = #{printPlanId}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and status = #{status}
|
|
|
+ and a.status = #{status}
|
|
|
</if>
|
|
|
<if test="startTime != null and startTime > 0">
|
|
|
- and create_time >= #{startTime}
|
|
|
+ and a.create_time >= #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime != null and endTime > 0">
|
|
|
- and #{endTime} >= create_time
|
|
|
+ and #{endTime} >= a.create_time
|
|
|
+ </if>
|
|
|
+ <if test="orgIds != null">
|
|
|
+ AND b.org_id IN
|
|
|
+ <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY a.update_time DESC
|
|
|
+ </select>
|
|
|
+ <select id="list" resultType="com.qmth.distributed.print.business.bean.result.PrintPlanBrief">
|
|
|
+ select a.id, a.name, a.status from exam_print_plan a left join sys_user b on a.create_id = b.id
|
|
|
+ <where>
|
|
|
+ <if test="schoolId != null and schoolId != ''">
|
|
|
+ and a.school_id = #{schoolId}
|
|
|
+ </if>
|
|
|
+ <if test="orgIds != null">
|
|
|
+ AND b.org_id IN
|
|
|
+ <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
</where>
|
|
|
- ORDER BY update_time DESC
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|