<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: liuguocai5900  
    $Date: 2015年12月29日 上午12:06:41  
    $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
                    ct.contract_number AS project_number,
                    hr.bp_name,
                    TO_CHAR(ct.finance_amount, 'FM999,999,999,999,990.00') finance_amount,
                    ct.int_rate,
                    ct.lease_term,
                    TO_CHAR(ct.deposit, 'FM999,999,999,999,990.00') deposit,
                    TO_CHAR(ct.residual_value, 'FM999,999,999,999,990.00') residual_value,
                    TO_CHAR(ct.inception_of_lease, 'YYYY"年"MM"月"DD"日"') inception_of_lease,
                    --不含税手续费
                    TO_CHAR(ct.net_lease_charge, 'FM999,999,999,999,990.00') net_lease_charge,
                    TO_CHAR(ct.lease_charge, 'FM999,999,999,999,990.00') lease_charge
                FROM
                    con_contract ct,
                    hls_bp_master hr
                WHERE
                    ct.bp_id_tenant = hr.bp_id AND
                    ct.contract_id  =${@contract_id} AND
                    ct.data_class   ='NORMAL'
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="project_number"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME"/>
        <bm:field name="finance_amount" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_AMOUNT"/>
        <bm:field name="int_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INT_RATE"/>
        <bm:field name="lease_term" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_TERM"/>
        <bm:field name="deposit" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEPOSIT"/>
        <bm:field name="residual_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RESIDUAL_VALUE"/>
        <bm:field name="inception_of_lease" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INCEPTION_OF_LEASE"/>
        <bm:field name="lease_charge" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHARGE"/>
        <bm:field name="net_lease_charge"/>
    </bm:fields>
</bm:model>
