Files
platform/ruoyi-system/src/main/resources/mapper/wgz/WgzDailyClockMapper.xml

97 lines
3.7 KiB
XML
Raw Normal View History

2025-02-19 16:10:02 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wgz.mapper.WgzDailyClockMapper">
<resultMap type="com.ruoyi.wgz.domain.WgzDailyClock" id="WgzDailyClockResult">
<result property="id" column="id"/>
<result property="recruitId" column="recruit_id"/>
<result property="userId" column="user_id"/>
<result property="dilyTime" column="dily_time"/>
<result property="dailyMark" column="daily_mark"/>
<result property="pnchOsition" column="pnch_osition"/>
<result property="finishToday" column="finish_today"/>
<result property="unfinished" column="unfinished"/>
<result property="workTomorrow" column="work_tomorrow"/>
<result property="coordinate" column="coordinate"/>
<result property="attachment" column="attachment"/>
<result property="auditorUserId" column="auditor_user_id"/>
<result property="auditorType" column="auditor_type"/>
<result property="auditorOpinion" column="auditor_opinion"/>
<result property="auditorTime" column="auditor_time"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
2025-02-20 10:41:00 +08:00
<select id="userDailyRecordListPage" resultType="com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes">
SELECT
a.id,
a.recruit_id,
a.user_id,
b.username,
b.avatar_name,
a.dily_time,
a.finish_today,
2025-03-14 18:31:32 +08:00
a.auditor_type,
a.status
2025-02-20 10:41:00 +08:00
FROM
wgz_daily_clock a
2025-02-27 15:16:33 +08:00
LEFT JOIN wgz_user b ON (a.user_id = b.user_id and b.del_flag = 0)
2025-02-20 10:41:00 +08:00
WHERE
2025-03-17 09:49:22 +08:00
a.user_id = #{req.userId} and
2025-03-17 11:45:27 +08:00
<if test="req.rq!=null">
DATE_FORMAT(a.dily_time, '%Y-%m-%d') = #{req.rq} and
</if>
2025-03-17 09:49:22 +08:00
<if test="req.types != 2">
2025-03-17 11:45:27 +08:00
a.status = #{req.types} and
2025-03-17 09:49:22 +08:00
</if>
a.del_flag = 0
2025-02-20 10:41:00 +08:00
ORDER BY
a.id DESC
</select>
2025-02-22 17:22:24 +08:00
<select id="appQueryPageList" resultType="com.ruoyi.bgt.domain.vo.BgtDailyClockListVO">
select wdc.id,
wdc.finish_today,
wdc.auditor_type,
wdc.dily_time,
wu.avatar_name,
2025-03-14 18:22:17 +08:00
wu.username,
2025-03-19 17:41:29 +08:00
wdc.status,
wdc.create_time
2025-02-22 17:22:24 +08:00
from wgz_daily_clock wdc
left join wgz_user wu on wdc.user_id = wu.user_id
where wdc.auditor_user_id = #{dto.auditorUserId}
2025-03-14 18:22:17 +08:00
<if test="dto.recruitId != null">
and wdc.recruit_id = #{dto.recruitId}
</if>
2025-02-22 17:22:24 +08:00
<if test="dto.username != null and dto.username != ''">
and wu.username like concat('%', #{dto.username}, '%')
</if>
2025-03-19 19:56:10 +08:00
<if test="dto.auditorType != null and dto.auditorType != '' ">
<choose>
<when test="dto.isRead">
and wdc.status = '0' and wdc.auditor_type ='1'
</when>
<when test="dto.isAudit">
and wdc.auditor_type = '1' and wdc.status = '1'
</when>
<otherwise>
and wdc.auditor_type = #{dto.auditorType}
</otherwise>
</choose>
2025-02-22 17:22:24 +08:00
</if>
2025-03-14 18:22:17 +08:00
<if test="dto.dilyTime != null">
2025-02-22 17:22:24 +08:00
and DATE(wdc.dily_time) = #{dto.dilyTime}
</if>
2025-03-13 11:46:47 +08:00
order by wdc.create_time desc
2025-02-22 17:22:24 +08:00
</select>
2025-02-19 16:10:02 +08:00
</mapper>