|  | @@ -268,7 +268,11 @@
 | 
											
												
													
														|  |  		SUM(ss.no_schedule_num_) 'noScheduleNum'
 |  |  		SUM(ss.no_schedule_num_) 'noScheduleNum'
 | 
											
												
													
														|  |  		FROM student_statistics ss
 |  |  		FROM student_statistics ss
 | 
											
												
													
														|  |  		LEFT JOIN sys_user_cash_account suca ON ss.user_id_ = suca.user_id_
 |  |  		LEFT JOIN sys_user_cash_account suca ON ss.user_id_ = suca.user_id_
 | 
											
												
													
														|  | 
 |  | +		LEFT JOIN student_basic_info sbi ON ss.user_id_ = sbi.user_id_
 | 
											
												
													
														|  |  		WHERE ss.group_type_ = #{groupType}
 |  |  		WHERE ss.group_type_ = #{groupType}
 | 
											
												
													
														|  | 
 |  | +		<if test="organId != null and organId != ''">
 | 
											
												
													
														|  | 
 |  | +			AND FIND_IN_SET(sbi.organ_id_,#{organId})
 | 
											
												
													
														|  | 
 |  | +		</if>
 | 
											
												
													
														|  |  	</select>
 |  |  	</select>
 | 
											
												
													
														|  |      <select id="countAddStudentNum" resultType="java.lang.Integer">
 |  |      <select id="countAddStudentNum" resultType="java.lang.Integer">
 | 
											
												
													
														|  |  		SELECT COUNT(extend_info_) FROM (
 |  |  		SELECT COUNT(extend_info_) FROM (
 | 
											
										
											
												
													
														|  | @@ -284,6 +288,9 @@
 | 
											
												
													
														|  |  			'STUDENT_PRACTICE_ORDER_NUM'
 |  |  			'STUDENT_PRACTICE_ORDER_NUM'
 | 
											
												
													
														|  |  		</if>
 |  |  		</if>
 | 
											
												
													
														|  |  		AND extend_info_ IS NOT NULL
 |  |  		AND extend_info_ IS NOT NULL
 | 
											
												
													
														|  | 
 |  | +		<if test="organId != null and organId != ''">
 | 
											
												
													
														|  | 
 |  | +			AND FIND_IN_SET(organ_id_,#{organId})
 | 
											
												
													
														|  | 
 |  | +		</if>
 | 
											
												
													
														|  |  		GROUP BY extend_info_
 |  |  		GROUP BY extend_info_
 | 
											
												
													
														|  |  		<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
 |  |  		<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
 | 
											
												
													
														|  |  			HAVING COUNT(CASE WHEN month_ < #{startDate} THEN 1 ELSE NULL END) < 1
 |  |  			HAVING COUNT(CASE WHEN month_ < #{startDate} THEN 1 ELSE NULL END) < 1
 | 
											
										
											
												
													
														|  | @@ -314,6 +321,9 @@
 | 
											
												
													
														|  |  		<if test="groupType == 'PRACTICE'">
 |  |  		<if test="groupType == 'PRACTICE'">
 | 
											
												
													
														|  |  			'网管课回访'
 |  |  			'网管课回访'
 | 
											
												
													
														|  |  		</if>
 |  |  		</if>
 | 
											
												
													
														|  | 
 |  | +		<if test="organId != null and organId != ''">
 | 
											
												
													
														|  | 
 |  | +			AND FIND_IN_SET(organ_id_,#{organId})
 | 
											
												
													
														|  | 
 |  | +		</if>
 | 
											
												
													
														|  |  	</select>
 |  |  	</select>
 | 
											
												
													
														|  |  	<select id="countLostStudentNum" resultType="java.lang.Integer">
 |  |  	<select id="countLostStudentNum" resultType="java.lang.Integer">
 | 
											
												
													
														|  |  		SELECT SUM(total_num_) FROM index_base_month_data
 |  |  		SELECT SUM(total_num_) FROM index_base_month_data
 | 
											
										
											
												
													
														|  | @@ -324,6 +334,9 @@
 | 
											
												
													
														|  |  		<if test="endDate != null and endDate != ''">
 |  |  		<if test="endDate != null and endDate != ''">
 | 
											
												
													
														|  |  			AND month_ <= #{startDate}
 |  |  			AND month_ <= #{startDate}
 | 
											
												
													
														|  |  		</if>
 |  |  		</if>
 | 
											
												
													
														|  | 
 |  | +		<if test="organId != null and organId != ''">
 | 
											
												
													
														|  | 
 |  | +			AND FIND_IN_SET(organ_id_,#{organId})
 | 
											
												
													
														|  | 
 |  | +		</if>
 | 
											
												
													
														|  |  	</select>
 |  |  	</select>
 | 
											
												
													
														|  |  	<select id="queryTeacherIds" resultType="java.lang.Integer">
 |  |  	<select id="queryTeacherIds" resultType="java.lang.Integer">
 | 
											
												
													
														|  |  		SELECT DISTINCT teacher_id_ FROM student_statistics WHERE group_type_ = #{groupType} AND teacher_id_ IS NOT NULL
 |  |  		SELECT DISTINCT teacher_id_ FROM student_statistics WHERE group_type_ = #{groupType} AND teacher_id_ IS NOT NULL
 |