<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: xuls  
    $Date: 2017-1-4 下午03:42:50  
    $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 v.* from(
                select 
                rank() over(order by cl.contract_number) rk,
                cl.contract_number,
                cl.cf_description,
                to_char(cl.actual_amount,'FM999,999,999,990.00') AS actual_amount,
                cl.bp_bank_account_name,
                cl.bp_bank_account_num,
                (SELECT hbmba.bank_branch_name
                  FROM hls_bp_master_bank_account hbmba,
                       csh_payment_req_hd         h
                 WHERE hbmba.bank_account_id = h.bp_bank_account_id
                   AND h.payment_req_id = cl.payment_req_id) bank_branch_name,
                cl.bank_full_name1
            from csh_payment_req_debt_ln_lv cl
            where cl.payment_req_id in (${:@payment_req_id})) v #WHERE_CLAUSE#
            ORDER BY
                v.rk
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
