You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
3.2 KiB
XML
65 lines
3.2 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.flowable.mapper.oa.BpmOALeaveMapper">
|
|
|
|
<resultMap type="com.ruoyi.flowable.domain.entity.oa.BpmOALeaveDO" id="BpmOaLeaveResult">
|
|
<result property="id" column="id" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="type" column="type" />
|
|
<result property="reason" column="reason" />
|
|
<result property="startTime" column="start_time" />
|
|
<result property="endTime" column="end_time" />
|
|
<result property="day" column="day" />
|
|
<result property="result" column="result" />
|
|
<result property="processInstanceId" column="process_instance_id" />
|
|
<result property="creator" column="creator" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updater" column="updater" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="deleted" column="deleted" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
</resultMap>
|
|
|
|
<sql id="selectBpmOaLeaveVo">
|
|
select id, user_id, type, reason, start_time, end_time, day, result, process_instance_id, creator, create_time, updater, update_time, deleted, tenant_id from bpm_oa_leave
|
|
</sql>
|
|
|
|
|
|
<select id="selectBpmOaLeavePage" parameterType="com.ruoyi.flowable.domain.entity.oa.BpmOALeaveDO"
|
|
resultMap="BpmOaLeaveResult">
|
|
select lv.*,u.nick_name as nickName from bpm_oa_leave lv
|
|
left join sys_user u on u.user_id = lv.user_id
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
<where>
|
|
|
|
<if test="entity.type != null ">
|
|
and lv.type = #{entity.type}
|
|
</if>
|
|
<if test="entity.deptId != null and entity.deptId != 0">
|
|
AND (u.dept_id = #{entity.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{entity.deptId},
|
|
ancestors) ))
|
|
</if>
|
|
<if test="entity.result != null ">
|
|
and lv.result = #{entity.result}
|
|
</if>
|
|
<if test="entity.processInstanceId != null and entity.processInstanceId != ''">
|
|
and lv.process_instance_id = #{entity.processInstanceId}
|
|
</if>
|
|
<if test="entity.creator != null and entity.creator != ''">
|
|
and lv.creator like concat('%', #{entity.creator}, '%')
|
|
</if>
|
|
<if test="entity.deleted != null ">
|
|
and lv.deleted = #{deleted}
|
|
</if>
|
|
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
|
AND date_format(lv.create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
|
</if>
|
|
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
|
AND date_format(lv.create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper>
|