|
@@ -323,6 +323,12 @@
|
|
|
<if test="classEndDate != null and classEndDate != ''">
|
|
|
AND cs.class_date_ <= #{classEndDate}
|
|
|
</if>
|
|
|
+ <if test="cloudHomeworkFlag != null and cloudHomeworkFlag == true">
|
|
|
+ AND sch.music_score_id_ IS NOT NULL AND sch.music_score_id_ != ''
|
|
|
+ </if>
|
|
|
+ <if test="cloudHomeworkFlag != null and cloudHomeworkFlag == false">
|
|
|
+ AND (sch.music_score_id_ IS NULL OR sch.music_score_id_ = '')
|
|
|
+ </if>
|
|
|
<if test="search != null and search != ''">
|
|
|
AND (cs.id_ = #{search} OR cs.name_ LIKE CONCAT('%',#{search},'%')
|
|
|
OR mg.name_ LIKE CONCAT('%',#{search},'%')
|
|
@@ -331,8 +337,9 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<select id="findHomeCount" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(ch.id_)
|
|
|
+ SELECT COUNT(DISTINCT ch.id_)
|
|
|
FROM course_homework ch
|
|
|
+ LEFT JOIN student_course_homework sch ON ch.id_ = sch.course_homework_id_
|
|
|
LEFT JOIN course_schedule cs ON cs.id_ = ch.course_schedule_id_
|
|
|
LEFT JOIN sys_user su ON su.id_ = cs.actual_teacher_id_
|
|
|
LEFT JOIN organization o ON o.id_ = cs.organ_id_
|