|
@@ -582,8 +582,9 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getAttendanceError" resultType="int">
|
|
|
- SELECT COUNT(DISTINCT ta.id_) FROM teacher_attendance ta
|
|
|
- LEFT JOIN course_schedule cs ON ta.course_schedule_id_ = cs.id_
|
|
|
+ SELECT COUNT(csts.id_) FROM course_schedule_teacher_salary csts
|
|
|
+ LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
|
|
|
+ LEFT JOIN teacher_attendance ta ON ta.course_schedule_id_ = csts.course_schedule_id_ AND ta.teacher_id_ = csts.user_id_
|
|
|
WHERE (ta.sign_in_status_ = 0 OR ta.sign_out_status_ = 0) AND cs.status_ = 'OVER' AND cs.del_flag_ = 0 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
|
|
|
AND (ta.sign_in_time_ IS NOT NULL OR ta.sign_out_time_ IS NOT NULL) AND ta.dispose_content_ IS NULL AND cs.class_date_ >= #{startTime}
|
|
|
<if test="organIds != null and organIds != ''">
|
|
@@ -591,10 +592,11 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getNoAttendance" resultType="int">
|
|
|
- SELECT COUNT(DISTINCT ta.id_) FROM teacher_attendance ta
|
|
|
- LEFT JOIN course_schedule cs ON ta.course_schedule_id_ = cs.id_
|
|
|
+ SELECT COUNT(csts.id_) FROM course_schedule_teacher_salary csts
|
|
|
+ LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
|
|
|
+ LEFT JOIN teacher_attendance ta ON ta.course_schedule_id_ = csts.course_schedule_id_ AND ta.teacher_id_ = csts.user_id_
|
|
|
WHERE ta.sign_in_time_ IS NULL AND cs.status_ = 'OVER' AND ta.sign_out_time_ IS NULL AND ta.dispose_content_ IS NULL
|
|
|
- AND cs.del_flag_ = 0 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_) AND DATE_FORMAT( cs.class_date_, '%Y-%m-%d' ) >= #{startTime}
|
|
|
+ AND cs.del_flag_ = 0 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_) AND cs.class_date_ >= #{startTime}
|
|
|
<if test="organIds != null and organIds != ''">
|
|
|
AND FIND_IN_SET(cs.organ_id_,#{organIds})
|
|
|
</if>
|