Files
platform/ruoyi-system/src/main/resources/mapper/wgz/WgzDailyClockMapper.xml
2025-02-27 15:16:33 +08:00

74 lines
3.0 KiB
XML

<?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>
<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,
a.auditor_type
FROM
wgz_daily_clock a
LEFT JOIN wgz_user b ON (a.user_id = b.user_id and b.del_flag = 0)
WHERE
a.user_id = #{req.userId} and a.del_flag = 0
ORDER BY
a.id DESC
</select>
<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,
wu.username
from wgz_daily_clock wdc
left join wgz_user wu on wdc.user_id = wu.user_id
where wdc.auditor_user_id = #{dto.auditorUserId}
and wdc.recruit_id in (select id from bgt_project_recruit where task_id = #{dto.taskId})
<if test="dto.username != null and dto.username != ''">
and wu.username like concat('%', #{dto.username}, '%')
</if>
<if test="dto.auditorType != null and dto.auditorType != ''">
and wdc.auditor_type = #{dto.auditorType}
</if>
<if test="dto.recruit_id != null">
and DATE(wdc.dily_time) = #{dto.dilyTime}
</if>
</select>
</mapper>