zcloud-gbs-eightwork/web-infrastructure/src/main/resources/mapper/EightworkInfoMapper.xml

51 lines
2.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.zcloud.eightwork.persistence.mapper.EightworkInfoMapper">
<select id="listPage" resultType="com.zcloud.eightwork.persistence.dataobject.EightworkInfoDO">
select t.*
from eightwork_info t
where t.delete_enum = 'FALSE'
<if test="params.eqWorkType != null and params.eqWorkType != ''">
and t.work_type = #{params.eqWorkType}
</if>
<if test="params.eqCheckNo != null and params.eqCheckNo != ''">
and t.check_no = #{params.eqCheckNo}
</if>
<if test="params.eqStatus != null">
and t.status = #{params.eqStatus}
</if>
<if test="params.eqDepartmentId != null">
and t.department_id = #{params.eqDepartmentId}
</if>
<if test="params.eqCreateId != null">
and t.create_id = #{params.eqCreateId}
</if>
<if test="params.eqXgfFlag != null">
and t.xgf_flag = #{params.eqXgfFlag}
</if>
<if test="params.eqInternalOperationFlag != null">
and t.internal_operation_flag = #{params.eqInternalOperationFlag}
</if>
<if test="params.eqProjectId != null and params.eqProjectId != ''">
and t.project_id = #{params.eqProjectId}
</if>
<if test="params.eqWorkDepartmentId != null">
and exists (select 1
from task_log log
where log.work_id = t.work_id
and log.act_user_department = #{params.eqWorkDepartmentId})
</if>
<if test="params.eqWorkUserId != null">
and exists (select 1
from task_log log
where log.work_id = t.work_id
and log.act_user = #{params.eqWorkUserId})
</if>
order by t.create_time desc
</select>
</mapper>