<?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
                    cc.finance_amount,--融资金额
                    cc.total_rental,  --租金金额
                    cc.lease_times,   --租赁期
                    (SELECT
                        cb.ebank_name
                    FROM
                        csh_ebank cb
                    WHERE
                        cb.ebank_id = cc.DIRECT_DEBIT_BANK_ID
                    ) bank_name,             --扣款银行
                    cc.dd_bank_account_name, --扣款账户
                    cc.dd_bank_account_num   --扣款账号
                FROM
                    con_contract cc
                WHERE
                    cc.contract_id = ${@contract_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="finance_amount"/>
        <bm:field name="total_rental"/>
        <bm:field name="lease_times"/>
        <bm:field name="bank_name"/>
        <bm:field name="dd_bank_account_name"/>
        <bm:field name="dd_bank_account_num"/>
    </bm:fields>
</bm:model>