|
@@ -141,6 +141,9 @@
|
|
|
<if test="search!=null">
|
|
|
AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
</if>
|
|
|
+ <if test="organIdList != null">
|
|
|
+ AND FIND_IN_SET(stu.organ_id_,#{organIdList})
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
student_id_
|
|
|
<trim prefix="HAVING" suffixOverrides="and">
|
|
@@ -177,17 +180,21 @@
|
|
|
<select id="countExercisesSituations" resultType="int">
|
|
|
SELECT COUNT(1) FROM (
|
|
|
SELECT
|
|
|
- 1
|
|
|
+ 1
|
|
|
FROM
|
|
|
- student_extracurricular_exercises_situation_ sees
|
|
|
- LEFT JOIN sys_user stu ON stu.id_=sees.student_id_
|
|
|
- LEFT JOIN sys_user tea ON tea.id_=sees.teacher_id_
|
|
|
+ student_extracurricular_exercises_situation_ sees
|
|
|
+ LEFT JOIN sys_user stu ON stu.id_=sees.student_id_
|
|
|
+ LEFT JOIN sys_user tea ON tea.id_=sees.teacher_id_
|
|
|
+ LEFT JOIN organization o ON stu.organ_id_=o.id_
|
|
|
WHERE
|
|
|
sees.monday_ >= #{monday}
|
|
|
AND sees.sunday_ <= #{sunday}
|
|
|
<if test="search!=null">
|
|
|
AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
|
|
|
</if>
|
|
|
+ <if test="organIdList != null">
|
|
|
+ AND FIND_IN_SET(stu.organ_id_, #{organIdList})
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
student_id_
|
|
|
<trim prefix="HAVING" suffixOverrides="and">
|