|
@@ -346,9 +346,10 @@
|
|
LIMIT 1
|
|
LIMIT 1
|
|
</select>
|
|
</select>
|
|
<select id="getTotalMinutes" resultType="java.lang.Integer">
|
|
<select id="getTotalMinutes" resultType="java.lang.Integer">
|
|
- SELECT ROUND((UNIX_TIMESTAMP(CONCAT(ta.sign_out_time_)) - UNIX_TIMESTAMP(ta.sign_in_time_)) / 60)
|
|
|
|
|
|
+ SELECT ROUND((UNIX_TIMESTAMP(CONCAT(ta.sign_out_time_)) - UNIX_TIMESTAMP(CONCAT(cs.class_date_,' ',cs.start_class_time_))) / 60)
|
|
FROM teacher_attendance ta
|
|
FROM teacher_attendance ta
|
|
- WHERE ta.course_schedule_id_ = #{courseId} AND ta.teacher_id_ = #{teacherId};
|
|
|
|
|
|
+ LEFT JOIN course_schedule cs ON cs.id_ = ta.course_schedule_id_
|
|
|
|
+ WHERE ta.course_schedule_id_ = #{courseId} AND ta.teacher_id_ = #{teacherId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="updateViPSignOutStatus" parameterType="string">
|
|
<update id="updateViPSignOutStatus" parameterType="string">
|