<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    (
                    (SELECT
                        COUNT(1)
                    FROM
                        con_contract_approver t1
                    WHERE
                        t1.approval_id   =${@approval_id} AND
                        t1.approve_status='agree'
                    )
                    ||'/'
                    ||
                    (SELECT
                        COUNT(1)
                    FROM
                        con_contract_approver t1
                    WHERE
                        t1.approval_id =${@approval_id}
                    ))agree_perecent,
                    (
                    (SELECT
                        COUNT(1)
                    FROM
                        con_contract_approver t1
                    WHERE
                        t1.approval_id   =${@approval_id} AND
                        t1.approve_status='refuse'
                    )
                    ||'/'
                    ||
                    (SELECT
                        COUNT(1)
                    FROM
                        con_contract_approver t1
                    WHERE
                        t1.approval_id =${@approval_id}
                    ) )refuse_perecent,
                    sdic_con_change_cashflow_pkg.get_approver_name(${@approval_id},'agree') agree_name,
                    sdic_con_change_cashflow_pkg.get_approver_name(${@approval_id},'refuse') refuse_name
                FROM
                    dual
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
