<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng  
    $Date: 2017-8-7 下午2:35:53  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t1.record_id,
                    t1.node_id,
                    t1.instance_id,
                    t1.action_type_desc,
                    t1.comment_text,
                    t1.approver,
                    t1.action_desc,
                    t1.node_code,
                    t1.create_date_fmt,
                    nvl(t1.comment_text,t1.action_type_desc) approve_comment
                FROM
                    (SELECT
                        tt1.*
                    FROM
                        zj_wfl_approve_history_v tt1,
                        zj_wfl_workflow_instance i
                    WHERE
                        tt1.instance_id            = i.instance_id AND
                        tt1.instance_approve_count = tt1.record_approve_count
                    )t1 #WHERE_CLAUSE#
                ORDER BY
                    1 
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
