|
@@ -1896,7 +1896,7 @@
|
|
|
FROM student_attendance sa
|
|
|
LEFT JOIN course_schedule cs ON cs.id_ = sa.course_schedule_id_
|
|
|
LEFT JOIN sys_user su ON su.id_ = sa.user_id_
|
|
|
- WHERE DATE_FORMAT(cs.class_date_,'%Y-%m') >= #{totalMonth} AND sa.status_ = 'LEAVE' AND cs.pre_course_flag_ = 0 and cs.tenant_id_ = #{tenantId}
|
|
|
+ WHERE DATE_FORMAT(cs.class_date_,'%Y-%m') BETWEEN #{totalMonth} AND #{currentMonth} AND sa.status_ = 'LEAVE' AND cs.pre_course_flag_ = 0 and cs.tenant_id_ = #{tenantId}
|
|
|
<if test="organIds != null">
|
|
|
AND FIND_IN_SET(cs.organ_id_,#{organIds})
|
|
|
</if>
|
|
@@ -1909,7 +1909,8 @@
|
|
|
<if test="search != null and search != ''">
|
|
|
AND (sa.user_id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
</if>
|
|
|
- GROUP BY sa.user_id_,DATE_FORMAT(cs.class_date_,'%Y-%m') HAVING COUNT(sa.id_) >= #{studentErrorLeaveNum} AND COUNT(sa.id_) > SUM(sa.leave_visit_flag_) ORDER BY cs.class_date_ DESC)c
|
|
|
+ GROUP BY sa.user_id_,DATE_FORMAT(cs.class_date_,'%Y-%m')
|
|
|
+ HAVING COUNT(DATE_FORMAT(cs.class_date_,'%Y-%m-%d')) >= #{studentErrorLeaveNum} AND COUNT(sa.id_) > SUM(sa.leave_visit_flag_) ORDER BY cs.class_date_ DESC)c
|
|
|
GROUP BY c.user_id_
|
|
|
</select>
|
|
|
|