优化
This commit is contained in:
@ -115,9 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
bpra.task_id,
|
||||
bpra.recruit_id,
|
||||
CASE
|
||||
WHEN wa.leave_mark_id = 1 THEN '请假'
|
||||
WHEN wa.leave_mark_id IS NOT NULL THEN '请假'
|
||||
WHEN wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0 THEN '正常'
|
||||
WHEN wa.late = 1 or wa.early_leave = 1 or wa.clock_in_time is null or wa.clock_out_time is null THEN '异常'
|
||||
WHEN wa.late = 1 OR wa.missed_in = 1 OR wa.early_leave = 1 OR wa.missed_out = 1 THEN '异常'
|
||||
ELSE '异常'
|
||||
END AS attendance_status
|
||||
FROM bgt_project_recruit_apply bpra
|
||||
@ -131,10 +131,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
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 ">
|
||||
and (wa.late = 1 or wa.early_leave = 1 or wa.clock_in_time is null or wa.clock_out_time is null) and leave_mark_id is null
|
||||
AND ((wa.late = 1 OR wa.missed_in = 1 OR wa.early_leave = 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
|
||||
and wa.leave_mark_id IS NOT NULL
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -62,8 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
wdc.dily_time,
|
||||
wu.avatar_name,
|
||||
wu.username,
|
||||
wu.status,
|
||||
wu.create_time
|
||||
wdc.status,
|
||||
wdc.create_time
|
||||
from wgz_daily_clock wdc
|
||||
left join wgz_user wu on wdc.user_id = wu.user_id
|
||||
where wdc.auditor_user_id = #{dto.auditorUserId}
|
||||
|
@ -40,5 +40,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.id DESC
|
||||
</select>
|
||||
|
||||
<select id="bgtLeaveAudit" resultType="com.ruoyi.bgt.domain.vo.BgtAuditResultVO">
|
||||
SELECT
|
||||
a.id,
|
||||
'2' as dataType,
|
||||
a.start_time,
|
||||
a.end_time,
|
||||
a.create_time,
|
||||
a.reason,
|
||||
a.auditor_type,
|
||||
b.username
|
||||
FROM
|
||||
wgz_leave a
|
||||
LEFT JOIN wgz_user b ON (a.user_id = b.user_id and b.del_flag = 0)
|
||||
WHERE
|
||||
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 a.auditor_type = #{dto.auditorType}
|
||||
</if>
|
||||
<if test="dto.auditorType == null">
|
||||
and a.auditor_type in (0,1,2,3)
|
||||
</if>
|
||||
<if test="dto.date != null">
|
||||
and date(a.create_time) = #{dto.date}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -61,15 +61,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
<select id="appQueryPageList" resultType="com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes">
|
||||
<select id="appQueryPageList" resultType="com.ruoyi.bgt.domain.vo.BgtAuditResultVO">
|
||||
SELECT
|
||||
a.*,
|
||||
b.username as auditorname,
|
||||
b.avatar_name as auditorHead,
|
||||
c.username as userName
|
||||
a.id,
|
||||
'1' as dataType,
|
||||
a.now_time as startTime,
|
||||
a.create_time,
|
||||
a.reason,
|
||||
a.auditor_type,
|
||||
c.username
|
||||
FROM
|
||||
wgz_reissueacard a
|
||||
LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0)
|
||||
LEFT JOIN wgz_user c ON (a.user_id = c.user_id and c.del_flag = 0)
|
||||
WHERE
|
||||
a.auditor_user_id = #{dto.auditorUserId}
|
||||
@ -77,8 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dto.auditorType != null and dto.auditorType != ''">
|
||||
and a.auditor_type = #{dto.auditorType}
|
||||
</if>
|
||||
<if test="dto.nowTime != null">
|
||||
and date(a.create_time) = #{dto.nowTime}
|
||||
<if test="dto.date != null">
|
||||
and date(a.create_time) = #{dto.date}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.id DESC
|
||||
|
Reference in New Issue
Block a user