<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
select *
  from (select c.contract_id,
               to_char(c.lease_item_amount, 'FM999,999,999,990.00') as lease_item_amount,
               to_char(c.lease_start_date, 'yyyy-mm-dd') as lease_start_date,
               (to_number(c.int_rate)*100||'%') as int_rate,
               (to_number(c.deposit_ratio)*100||'%') as deposit_ratio,
               to_char(c.deposit, 'FM999,999,999,990.00') as deposit,
               to_char(c.first_pay_date, 'yyyy-mm-dd') as first_pay_date,
               to_char(c.pmt, 'FM999,999,999,990.00') as pmt,
               to_char(c.lease_start_date, 'yyyy-mm-dd') as margin_date,
               c.lease_times,
               to_char(c.total_rental, 'FM999,999,999,990.00') as total_rental
          from con_contract c) t

                #WHERE_CLAUSE#
                #ORDER_BY_CLAUSE#
                ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <!--        <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
    </bm:query-fields>
</bm:model>
