| 
														
															@@ -246,7 +246,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="countStudentCourses" resultType="int"> 
														 | 
														
														 | 
														
															     <select id="countStudentCourses" resultType="int"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         SELECT count(*) FROM class_group cg 
														 | 
														
														 | 
														
															         SELECT count(*) FROM class_group cg 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         LEFT JOIN class_group_student_mapper cgsm ON cg.id_=cgsm.class_group_id_ 
														 | 
														
														 | 
														
															         LEFT JOIN class_group_student_mapper cgsm ON cg.id_=cgsm.class_group_id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        LEFT JOIN course_schedule cs ON cg.id_ = cs.class_group_id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         LEFT JOIN sys_user su ON cs.teacher_id_=su.id_ 
														 | 
														
														 | 
														
															         LEFT JOIN sys_user su ON cs.teacher_id_=su.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <include refid="studentManageCourseQueryCondition"/> 
														 | 
														
														 | 
														
															         <include refid="studentManageCourseQueryCondition"/> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </select> 
														 | 
														
														 | 
														
															     </select> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -256,14 +256,17 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL) 
														 | 
														
														 | 
														
															             (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             AND CONCAT(cs.class_date_," ",cs.start_class_time_) < NOW() 
														 | 
														
														 | 
														
															             AND CONCAT(cs.class_date_," ",cs.start_class_time_) < NOW() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="studentId!=null"> 
														 | 
														
														 | 
														
															             <if test="studentId!=null"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                and sa.user_id_ = #{studentId} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                and cssp.user_id_ = #{studentId} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             </if> 
														 | 
														
														 | 
														
															             </if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="classGroupType!=null"> 
														 | 
														
														 | 
														
															             <if test="classGroupType!=null"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 and cg.type_ = #{classGroupType} 
														 | 
														
														 | 
														
															                 and cg.type_ = #{classGroupType} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             </if> 
														 | 
														
														 | 
														
															             </if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            <if test="attendanceStatus!=null"> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="attendanceStatus != null and attendanceStatus != 'TRUANT'"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 and sa.status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} 
														 | 
														
														 | 
														
															                 and sa.status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             </if> 
														 | 
														
														 | 
														
															             </if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="attendanceStatus != null and attendanceStatus == 'TRUANT'"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                and (sa.status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} OR sa.status_ IS NULL) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            </if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="classGroupName!=null"> 
														 | 
														
														 | 
														
															             <if test="classGroupName!=null"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 and cg.name_ like CONCAT("%",#{classGroupName},"%") 
														 | 
														
														 | 
														
															                 and cg.name_ like CONCAT("%",#{classGroupName},"%") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             </if> 
														 | 
														
														 | 
														
															             </if> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -280,13 +283,13 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             cg.type_ class_group_type_, 
														 | 
														
														 | 
														
															             cg.type_ class_group_type_, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_, 
														 | 
														
														 | 
														
															             CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             su.real_name_ teacher_name_, 
														 | 
														
														 | 
														
															             su.real_name_ teacher_name_, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            sa.status_, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            IF(sa.status_ IS NULL,'TRUANT',sa.status_) status_, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             sa.current_class_times_, 
														 | 
														
														 | 
														
															             sa.current_class_times_, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             cg.total_class_times_ 
														 | 
														
														 | 
														
															             cg.total_class_times_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        FROM 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            student_attendance sa 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            LEFT JOIN class_group cg ON sa.class_group_id_=cg.id_ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            LEFT JOIN course_schedule cs ON sa.course_schedule_id_=cs.id_ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        FROM course_schedule_student_payment cssp 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LEFT JOIN student_attendance sa ON cssp.course_schedule_id_ = sa.course_schedule_id_ AND cssp.user_id_ = sa.user_id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LEFT JOIN class_group cg ON cssp.class_group_id_ = cg.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             LEFT JOIN sys_user su ON sa.teacher_id_=su.id_ 
														 | 
														
														 | 
														
															             LEFT JOIN sys_user su ON sa.teacher_id_=su.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <include refid="studentManageAttendanceQueryCondition"/> 
														 | 
														
														 | 
														
															         <include refid="studentManageAttendanceQueryCondition"/> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         ORDER BY course_date_ DESC 
														 | 
														
														 | 
														
															         ORDER BY course_date_ DESC 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -295,12 +298,12 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="countStudentAttendances" resultType="int"> 
														 | 
														
														 | 
														
															     <select id="countStudentAttendances" resultType="int"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         SELECT 
														 | 
														
														 | 
														
															         SELECT 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        count(*) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        FROM 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        student_attendance sa 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        LEFT JOIN class_group cg ON sa.class_group_id_=cg.id_ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        LEFT JOIN course_schedule cs ON sa.course_schedule_id_=cs.id_ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        LEFT JOIN sys_user su ON sa.teacher_id_=su.id_ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        count(cssp.id_) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        FROM course_schedule_student_payment cssp 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        LEFT JOIN student_attendance sa ON cssp.course_schedule_id_ = sa.course_schedule_id_ AND cssp.user_id_ = sa.user_id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        LEFT JOIN class_group cg ON cssp.class_group_id_ = cg.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        LEFT JOIN sys_user su ON sa.teacher_id_ = su.id_ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <include refid="studentManageAttendanceQueryCondition"/> 
														 | 
														
														 | 
														
															         <include refid="studentManageAttendanceQueryCondition"/> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </select> 
														 | 
														
														 | 
														
															     </select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |