| 
					
				 | 
			
			
				@@ -520,7 +520,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		WHERE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		mg.status_ = 'PROGRESS' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		AND mgpcd.payment_status_ = 'NON_PAYMENT' AND mgpcd.expect_amount_ > 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		AND mgpcd.payment_status_ = 'NON_PAYMENT' AND mgpcd.expect_amount_ > 0 AND mgpc.batch_no_ IS NOT NULL AND mgpc.pay_user_type_ = 'STUDENT' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<if test="organIds!=null and organIds.size()>0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			AND mg.organ_id_ IN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<foreach collection="organIds" item="organId" open="(" close=")" separator=","> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -590,7 +590,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		LEFT JOIN teacher_attendance ta ON ta.course_schedule_id_ = cs.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		WHERE ta.teacher_id_ = cs.actual_teacher_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		AND cs.status_ = 'OVER' AND cs.del_flag_ = 0 AND cs.class_date_>='2021-02-20' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		AND cs.status_ = 'OVER' AND cs.del_flag_ = 0 AND cs.class_date_>='2021-02-01' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		AND (ta.sign_in_status_ != 1 OR ta.sign_out_status_ != 1 OR sa.status_ != 'NORMAL') AND ta.dispose_content_ IS NULL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<if test="organIds != null and organIds != ''"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -602,7 +602,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		SELECT COUNT(DISTINCT cs.id_) FROM course_schedule cs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		LEFT JOIN teacher_attendance ta ON ta.course_schedule_id_ = cs.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		WHERE ta.teacher_id_ = cs.actual_teacher_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		AND cs.status_ = 'OVER' AND cs.del_flag_ = 0 AND cs.class_date_>='2021-02-20' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		AND cs.status_ = 'OVER' AND cs.del_flag_ = 0 AND cs.class_date_>='2021-02-01' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		AND ta.sign_in_time_ IS NULL AND ta.sign_out_time_ IS NULL AND ta.dispose_content_ IS NULL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<if test="organIds != null and organIds != ''"> 
			 |