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

View File

@ -45,9 +45,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="userReplacementCardRecordDetails" resultType="com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes">
SELECT
a.*,
b.username,
b.avatar_name,
c.username as userName
b.username as auditorname,
b.avatar_name as auditorHead,
c.username as userName,
c.avatar_name
FROM
wgz_reissueacard a
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
@ -73,10 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.auditor_user_id = #{dto.auditorUserId}
and a.recruit_id in (select id from bgt_project_recruit where task_id = #{dto.taskId})
<if test="dto.auditorType != null and dto.auditorType != ''">
and w.auditor_type = #{dto.auditorType}
and a.auditor_type = #{dto.auditorType}
</if>
<if test="dto.nowTime != null">
and w.now_time = #{dto.nowTime}
and date(a.create_time) = #{dto.nowTime}
</if>
ORDER BY
a.id DESC