<?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.yida.data.form.apply.mapper.CoreApprovalProcessMapper">

    <!-- 查询审核流程节点列表数据 -->
    <select id="listApprovalProcessPage"
            resultType="com.yida.data.customForm.vo.apply.ApprovalProcessSelectPageVO">
        select
            *
        from core_approval_process
        where del_flag = 0
        and dept_id = #{dto.deptId}
        <if test='dto.approvalProcessName != null and dto.approvalProcessName != ""'>
            and approval_process_name like concat ('%', #{dto.approvalProcessName}, '%')
        </if>
        <if test='dto.approvalType !=null'>
            and approval_type = #{dto.approvalType}
        </if>
        order by
            create_date desc
    </select>

</mapper>
