This commit is contained in:
zt
2025-03-13 18:04:13 +08:00
parent ee0411263f
commit eeada32164
8 changed files with 42 additions and 21 deletions

View File

@ -109,8 +109,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
wu.avatar_name,
wu.username,
wu.type_of_work,
wu.identity_card,
bpr.recruit_name,
fpt.task_name,
bpra.task_id,
bpra.recruit_id,
CASE
WHEN wa.leave_mark_id = 1 THEN '请假'
WHEN wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0 THEN '正常'
@ -123,12 +126,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN wgz_user wu ON bpra.user_id = wu.user_id
LEFT JOIN wgz_attendance wa ON wa.user_id = wu.user_id AND wa.recruit_id = bpra.recruit_id AND wa.date = #{dto.date}
WHERE bpra.entry_time <= #{dto.date} and ((bpra.leave_time is null and bpra.status = '5')or leave_time>=#{dto.date})
and bpra.recruit_id IN (SELECT id FROM bgt_project_recruit WHERE task_id = #{dto.taskId})
and bpra.task_id = #{dto.taskId}
<if test="dto.attendanceType !=null and dto.attendanceType ==1 ">
and (wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0) and leave_mark_id is null
</if>
<if test="dto.attendanceType !=null and dto.attendanceType ==2 ">
(wa.late = 1 or wa.early_leave = 1 or wa.missed_in = 1 or wa.missed_out = 1) and leave_mark_id is null
and (wa.late = 1 or wa.early_leave = 1 or wa.missed_in = 1 or wa.missed_out = 1) and leave_mark_id is null
</if>
<if test="dto.attendanceType !=null and dto.attendanceType ==3 ">
and wa.leave_mark_id = 1