|  | @@ -812,14 +812,36 @@
 | 
	
		
			
				|  |  |          WHERE t.user_id_ NOT IN (SELECT user_id_ FROM student WHERE subject_id_list_ REGEXP '21|25|26|27|28|29')
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="getOrgansTotalStudentNum" resultType="int">
 | 
	
		
			
				|  |  | -        SELECT count(s.`user_id_`)  FROM student s 
 | 
	
		
			
				|  |  | +    <select id="getOrgansCloudTeacherStudent" resultType="com.ym.mec.biz.dal.dto.IndexCloudStudyListDto">
 | 
	
		
			
				|  |  | +        SELECT count(s.`user_id_`) totalStudentNum,
 | 
	
		
			
				|  |  | +        sum(case when cto.student_id_ IS NULL then 0 else 1 end) waitActivateVipStudentNum,
 | 
	
		
			
				|  |  | +        sum(case when s.`membership_end_time_` > now() then 1 else 0 end) effectiveVipStudentNum 
 | 
	
		
			
				|  |  | +        FROM student s LEFT JOIN (
 | 
	
		
			
				|  |  | +		SELECT distinct cto.`student_id_`  FROM `cloud_teacher_order` cto WHERE cto.`status_` = 1
 | 
	
		
			
				|  |  | +		) cto on s.user_id_ = cto.student_id_
 | 
	
		
			
				|  |  |  		LEFT JOIN `sys_user` u on s.`user_id_` = u.`id_`
 | 
	
		
			
				|  |  |  		WHERE u.`del_flag_` = 0 
 | 
	
		
			
				|  |  | -            AND u.organ_id_ IN
 | 
	
		
			
				|  |  | +        <if test="organIds!=null and organIds.size()>0">
 | 
	
		
			
				|  |  | +            AND su.organ_id_ IN
 | 
	
		
			
				|  |  |              <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  |                  #{organId}
 | 
	
		
			
				|  |  |              </foreach>
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    <select id="getOrganCloudTeacherStudentNum" resultType="com.ym.mec.biz.dal.dto.Mapper">
 | 
	
		
			
				|  |  | +        SELECT u.organ_id_ `key`,sum(case when a.user_id_ IS NULL then 0 else 1 end) `value`  FROM student s 
 | 
	
		
			
				|  |  | +		LEFT JOIN (
 | 
	
		
			
				|  |  | +		SELECT s.`user_id_`  FROM `student` s WHERE s.`membership_end_time_` > now()
 | 
	
		
			
				|  |  | +		union
 | 
	
		
			
				|  |  | +		SELECT cto.`student_id_`  FROM `cloud_teacher_order` cto WHERE cto.`status_` = 1
 | 
	
		
			
				|  |  | +		) a on a.user_id_ = s.`user_id_` 
 | 
	
		
			
				|  |  | +		LEFT JOIN `sys_user` u on s.`user_id_` = u.`id_`
 | 
	
		
			
				|  |  | +		WHERE u.`del_flag_` = 0 AND u.`organ_id_` IN
 | 
	
		
			
				|  |  | +        <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  | +            #{organId}
 | 
	
		
			
				|  |  | +        </foreach>
 | 
	
		
			
				|  |  | +		GROUP BY u.`organ_id_` 
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="getOrgansStudentNum" resultType="map">
 | 
	
	
		
			
				|  | @@ -996,12 +1018,12 @@
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="getCloudStudyStudentOverViewList" resultType="com.ym.mec.biz.dal.dto.IndexCloudStudyListDto">
 | 
	
		
			
				|  |  | -        SELECT o.`name_` organName,o.`id_` organId,count(s.`user_id_`) totalStudentNum,sum(case when a.user_id_ IS NULL then 0 else 1 end) vipStudentNum  FROM student s 
 | 
	
		
			
				|  |  | -		LEFT JOIN (
 | 
	
		
			
				|  |  | -		SELECT s.`user_id_`  FROM `student` s WHERE s.`membership_end_time_` > now()
 | 
	
		
			
				|  |  | -		union
 | 
	
		
			
				|  |  | -		SELECT cto.`student_id_`  FROM `cloud_teacher_order` cto WHERE cto.`status_` = 1
 | 
	
		
			
				|  |  | -		) a on a.user_id_ = s.`user_id_` 
 | 
	
		
			
				|  |  | +        SELECT o.`name_` organName,o.`id_` organId,count(s.`user_id_`) totalStudentNum,
 | 
	
		
			
				|  |  | +        sum(case when cto.student_id_ IS NULL then 0 else 1 end) waitActivateVipStudentNum,
 | 
	
		
			
				|  |  | +        sum(case when s.`membership_end_time_` > now() then 1 else 0 end) effectiveVipStudentNum 
 | 
	
		
			
				|  |  | +        FROM student s LEFT JOIN (
 | 
	
		
			
				|  |  | +		SELECT distinct cto.`student_id_`  FROM `cloud_teacher_order` cto WHERE cto.`status_` = 1
 | 
	
		
			
				|  |  | +		) cto on s.user_id_ = cto.student_id_
 | 
	
		
			
				|  |  |  		LEFT JOIN `sys_user` u on s.`user_id_` = u.`id_`
 | 
	
		
			
				|  |  |  		LEFT JOIN `organization` o on o.`id_` = u.`organ_id_` 
 | 
	
		
			
				|  |  |  		WHERE u.`del_flag_` = 0 AND u.`organ_id_` IN
 |