|
@@ -5,13 +5,18 @@
|
|
|
<mapper namespace="com.xjrsoft.module.attendance.mapper.TeacherAttendanceRecordMapper">
|
|
|
<select id="getPage" parameterType="com.xjrsoft.module.attendance.dto.TeacherDetailsDto" resultType="com.xjrsoft.module.attendance.vo.TeacherStatisticsPageVo">
|
|
|
SELECT t2.name AS teacher_name,t2.mobile,t1.attendance_status AS STATUS,t1.record_time,
|
|
|
- replace(replace(t1.attendance_mode,1, '人脸'),2,'车辆') as attendance_mode,t1.car_number,t1.user_id FROM teacher_attendance_record t1
|
|
|
+ replace(replace(t1.attendance_mode,1, '人脸'),2,'车辆') as attendance_mode,t1.car_number,t1.user_id,
|
|
|
+ (
|
|
|
+ select group_concat(c1.name) from xjr_department c1
|
|
|
+ inner join xjr_user_dept_relation c2 on c1.id = c2.dept_id
|
|
|
+ where c1.delete_mark = 0 and c2.user_id = t1.user_id
|
|
|
+ ) as dept_name
|
|
|
+ FROM teacher_attendance_record t1
|
|
|
INNER JOIN xjr_user t2 ON t1.user_id = t2.id
|
|
|
<if test="dto.deptId != null">
|
|
|
inner join xjr_user_dept_relation t3 on t2.id = t3.user_id
|
|
|
and t3.dept_id = #{dto.deptId}
|
|
|
</if>
|
|
|
-
|
|
|
WHERE t1.delete_mark = 0
|
|
|
AND DATE_FORMAT(t1.attendance_date,'%Y-%m-%d') = #{dto.date}
|
|
|
AND t1.time_interval = #{dto.timePeriod}
|