<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming 
    $Date: 2015-5-28 下午3:12:19  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="YONDA_REPORT_INVOICE_ADD_V">
    <bm:fields>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="YONDA_REPORT_INVOICE_ADD_V.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="合同编号"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="YONDA_REPORT_INVOICE_ADD_V.BUSINESS_TYPE"/>
        <bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE_N" prompt="商业模式"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="YONDA_REPORT_INVOICE_ADD_V.BP_ID"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="承租人"/>
        <bm:field name="spv_company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SPV_COMPANY_ID" prompt="YONDA_REPORT_INVOICE_ADD_V.SPV_COMPANY_ID"/>
        <bm:field name="spv_company_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SPV_COMPANY_NAME" prompt="出租方"/>
        <bm:field name="lease_term" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_TERM" prompt="租赁年限"/>
        <bm:field name="inception_of_lease" databaseType="DATE" datatype="java.lang.String" physicalName="INCEPTION_OF_LEASE" prompt="起租日"/>
        <bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_TITLE" prompt="开票抬头"/>
        <bm:field name="pmt" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PMT" prompt="每期租金"/>
        <bm:field name="poundage" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POUNDAGE" prompt="手续费"/>
        <bm:field name="first_payment" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIRST_PAYMENT" prompt="首付款"/>
        <bm:field name="deposit" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DEPOSIT" prompt="保证金"/>
        <bm:field name="plate_fee" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PLATE_FEE" prompt="牌照费"/>
        <bm:field name="contact_person" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTACT_PERSON" prompt="联系人"/>
        <bm:field name="phone_extra" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE_EXTRA" prompt="联系人电话"/>
        <bm:field name="invoice_send_address" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_SEND_ADDRESS" prompt="发票寄送地址"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="contract_id" queryOperator="="/>
        <bm:query-field field="business_type" queryOperator="="/>
        <bm:query-field field="bp_id" queryOperator="="/>
        <bm:query-field field="spv_company_id" queryOperator="="/>
        <bm:query-field field="lease_term" queryOperator="="/>
        <bm:query-field name="inception_of_lease_from" queryExpression="t1.inception_of_lease &gt;= ${@inception_of_lease_from}"/>
        <bm:query-field name="inception_of_lease_to" queryExpression="t1.inception_of_lease &lt;= ${@inception_of_lease_to}"/>
        <bm:query-field name="pmt_from" queryExpression="t1.pmt &gt;= ${@pmt_from}"/>
        <bm:query-field name="pmt_to" queryExpression="t1.pmt &lt;= ${@pmt_to}"/>
        <bm:query-field name="poundage_from" queryExpression="t1.poundage &gt;= ${@poundage_from}"/>
        <bm:query-field name="poundage_to" queryExpression="t1.poundage &lt;= ${@poundage_to}"/>
        <bm:query-field name="first_payment_from" queryExpression="t1.first_payment &gt;= ${@first_payment_from}"/>
        <bm:query-field name="first_payment_to" queryExpression="t1.first_payment &lt;= ${@first_payment_to}"/>
        <bm:query-field name="deposit_from" queryExpression="t1.deposit &gt;= ${@deposit_from}"/>
        <bm:query-field name="deposit_to" queryExpression="t1.deposit &lt;= ${@deposit_to}"/>
        <bm:query-field name="plate_fee_from" queryExpression="t1.plate_fee &gt;= ${@plate_fee_from}"/>
        <bm:query-field name="plate_fee_to" queryExpression="t1.plate_fee &lt;= ${@plate_fee_to}"/>
        <bm:query-field field="invoice_title" queryExpression="upper(t1.invoice_title) like &apos;%&apos; || upper(${@invoice_title}) || &apos;%&apos;"/>
        <bm:query-field field="phone_extra" queryExpression="upper(t1.phone_extra) like &apos;%&apos; || upper(${@phone_extra}) || &apos;%&apos;"/>
        <bm:query-field field="invoice_send_address" queryExpression="upper(t1.invoice_send_address) like &apos;%&apos; || upper(${@invoice_send_address}) || &apos;%&apos;"/>
        <bm:query-field field="contact_person" queryExpression="upper(t1.contact_person) like &apos;%&apos; || upper(${@contact_person}) || &apos;%&apos;"/>
        <bm:query-field field="contract_number" queryExpression="upper(t1.contract_number) like &apos;%&apos; || upper(${@contract_number}) || &apos;%&apos;"/>
    </bm:query-fields>
</bm:model>
