|
@@ -783,4 +783,90 @@
|
|
|
</where>
|
|
|
order by mp.course_id
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="listOutlineSemester"
|
|
|
+ resultType="com.qmth.teachcloud.common.bean.result.DictionaryResult">
|
|
|
+ SELECT
|
|
|
+ id AS id, name AS name, code AS code
|
|
|
+ FROM
|
|
|
+ basic_semester bs
|
|
|
+ <where>
|
|
|
+ AND EXISTS( SELECT
|
|
|
+ 1
|
|
|
+ FROM
|
|
|
+ obe_course_outline oco
|
|
|
+ LEFT JOIN
|
|
|
+ obe_culture_program ocp ON oco.culture_program_id = ocp.id
|
|
|
+ LEFT JOIN
|
|
|
+ sys_user su ON oco.user_id = su.id
|
|
|
+ WHERE
|
|
|
+ oco.semester_id = bs.id
|
|
|
+ <if test="schoolId != null">
|
|
|
+ AND oco.school_id = #{schoolId}
|
|
|
+ </if>
|
|
|
+ <if test="professionalId != null">
|
|
|
+ AND ocp.professional_id = #{professionalId}
|
|
|
+ </if>
|
|
|
+ <if test="cultureProgramId != null">
|
|
|
+ AND oco.culture_program_id = #{cultureProgramId}
|
|
|
+ </if>
|
|
|
+ <if test="dpr != null">
|
|
|
+ <if test="dpr.requestUserId != null">
|
|
|
+ AND oco.user_id = #{dpr.requestUserId}
|
|
|
+ </if>
|
|
|
+ <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
+ AND su.org_id IN
|
|
|
+ <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="listCultureProgramCourse"
|
|
|
+ resultType="com.qmth.teachcloud.common.entity.BasicCourse">
|
|
|
+ SELECT
|
|
|
+ bc.*
|
|
|
+ FROM
|
|
|
+ basic_course bc
|
|
|
+ <where>
|
|
|
+ AND EXISTS( SELECT
|
|
|
+ 1
|
|
|
+ FROM
|
|
|
+ obe_course_outline oco
|
|
|
+ LEFT JOIN
|
|
|
+ obe_culture_program ocp ON oco.culture_program_id = ocp.id
|
|
|
+ LEFT JOIN
|
|
|
+ sys_user su ON oco.user_id = su.id
|
|
|
+ WHERE
|
|
|
+ bc.id = oco.course_id
|
|
|
+ <if test="schoolId != null">
|
|
|
+ AND oco.school_id = #{schoolId}
|
|
|
+ </if>
|
|
|
+ <if test="professionalId != null">
|
|
|
+ AND ocp.professional_id = #{professionalId}
|
|
|
+ </if>
|
|
|
+ <if test="cultureProgramId != null">
|
|
|
+ AND oco.culture_program_id = #{cultureProgramId}
|
|
|
+ </if>
|
|
|
+ <if test="semesterId != null">
|
|
|
+ AND oco.semester_id = #{semesterId}
|
|
|
+ </if>
|
|
|
+ <if test="dpr != null">
|
|
|
+ <if test="dpr.requestUserId != null">
|
|
|
+ AND oco.user_id = #{dpr.requestUserId}
|
|
|
+ </if>
|
|
|
+ <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
+ AND su.org_id IN
|
|
|
+ <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|