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