<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming 
    $Date: 2015-5-21 下午5:13:17  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="YONDA_REPORT_FINANCE_V">
    <bm:fields>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CONTRACT_ID" prompt="YONDA_REPORT_FINANCE_V.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="合同编号"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="COMPANY_ID" prompt="YONDA_REPORT_FINANCE_V.COMPANY_ID"/>
        <bm:field name="spv_company_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="SPV_COMPANY_ID" prompt="YONDA_REPORT_FINANCE_V.SPV_COMPANY_ID"/>
        <bm:field name="spv_company_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SPV_COMPANY_NAME" prompt="出租方"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PROJECT_ID" prompt="YONDA_REPORT_FINANCE_V.PROJECT_ID"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="项目编号"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UNIT_ID" prompt="YONDA_REPORT_FINANCE_V.UNIT_ID"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT_NAME" prompt="4s店"/>
        <bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS" prompt="YONDA_REPORT_FINANCE_V.CONTRACT_STATUS"/>
        <bm:field name="contract_status_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS_N" prompt="合同状态"/>
        <bm:field name="inception_of_lease" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INCEPTION_OF_LEASE" prompt="起租日"/>
        <bm:field name="lease_end_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_END_DATE" prompt="末期租金支付日"/>
        <bm:field name="lease_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LEASE_TIMES" prompt="租赁期数"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="YONDA_REPORT_FINANCE_V.BUSINESS_TYPE"/>
        <bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE_N" prompt="业务模式"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="YONDA_REPORT_FINANCE_V.DIVISION"/>
        <bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_N" prompt="产品类型"/>
        <bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="YONDA_REPORT_FINANCE_V.LEASE_CHANNEL"/>
        <bm:field name="lease_channel_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL_N" prompt="租赁模式"/>
        <bm:field name="invoice_price" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INVOICE_PRICE" prompt="购车价"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Double" physicalName="BP_ID_TENANT" prompt="YONDA_REPORT_FINANCE_V.BP_ID_TENANT"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="承租人"/>
        <bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS" prompt="YONDA_REPORT_FINANCE_V.BP_CLASS"/>
        <bm:field name="bp_class_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS_N" prompt="承租人分类"/>
        <bm:field name="bp_id_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_CODE" prompt="身份证/组织机构代码"/>
        <bm:field name="lease_item_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LEASE_ITEM_AMOUNT" prompt="融资总额"/>
        <bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="FINANCE_AMOUNT" prompt="风险敞口"/>
        <bm:field name="int_rate_display" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INT_RATE_DISPLAY" prompt="租赁利率"/>
        <bm:field name="irr" databaseType="NUMBER" datatype="java.lang.Double" physicalName="IRR" prompt="IRR"/>
        <bm:field name="pmt_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PMT_DATE" prompt="租金支付日"/>
        <bm:field name="pmt" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PMT" prompt="每期租金"/>
        <bm:field name="purchase_tax" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PURCHASE_TAX" prompt="购置税"/>
        <bm:field name="insurance_fee" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INSURANCE_FEE" prompt="保险费"/>
        <bm:field name="first_payment" databaseType="NUMBER" datatype="java.lang.Double" physicalName="FIRST_PAYMENT" prompt="首付款"/>
        <bm:field name="deposit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DEPOSIT" prompt="保证金"/>
        <bm:field name="purchase_price" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PURCHASE_PRICE" prompt="留购价"/>
        <bm:field name="poundage" databaseType="NUMBER" datatype="java.lang.Double" physicalName="POUNDAGE" prompt="手续费"/>
        <bm:field name="total_rent" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_RENT" prompt="租金总额"/>
        <bm:field name="total_rec_rent" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_REC_RENT" prompt="已收租金总额"/>
        <bm:field name="total_unrec_rent" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_UNREC_RENT" prompt="未收租金总额"/>
        <bm:field name="total_principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_PRINCIPAL" prompt="本金总额"/>
        <bm:field name="total_rec_principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_REC_PRINCIPAL" prompt="已收本金总额"/>
        <bm:field name="total_unrec_principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_UNREC_PRINCIPAL" prompt="未收本金总额"/>
        <bm:field name="total_interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_INTEREST" prompt="利息总额"/>
        <bm:field name="total_rec_interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_REC_INTEREST" prompt="已收利息总额"/>
        <bm:field name="total_unrec_interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_UNREC_INTEREST" prompt="未收利息总额"/>
        <bm:field name="total_confirm_finance_income" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_CONFIRM_FINANCE_INCOME" prompt="已确认利息总额"/>
        <bm:field name="total_unconfirm_finance_income" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_UNCONFIRM_FINANCE_INCOME" prompt="未确认利息总额"/>
        <bm:field name="overdue_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_TIMES" prompt="逾期期数"/>
        <bm:field name="overdue_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT" prompt="逾期租金"/>
        <bm:field name="overdue_principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_PRINCIPAL" prompt="逾期本金"/>
        <bm:field name="overdue_interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_INTEREST" prompt="逾期利息"/>
        <bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_TITLE" prompt="开票抬头"/>
        <bm:field name="taxpayer_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TAXPAYER_TYPE" prompt="YONDA_REPORT_FINANCE_V.TAXPAYER_TYPE"/>
        <bm:field name="taxpayer_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TAXPAYER_TYPE_N" prompt="纳税人类型"/>
        <bm:field name="invoice_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_TYPE" prompt="发票类型"/>
        <bm:field name="already_billing_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="ALREADY_BILLING_TIMES" prompt="已开票期数"/>
        <bm:field name="already_billing_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="ALREADY_BILLING_AMOUNT" prompt="已开票金额"/>
        <bm:field name="un_billing_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UN_BILLING_TIMES" prompt="未开票期数"/>
        <bm:field name="un_billing_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UN_BILLING_AMOUNT" prompt="未开票金额"/>
        <bm:field name="overdue_billing_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_BILLING_TIMES" prompt="逾期已开票期数"/>
        <bm:field name="overdue_billing_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_BILLING_AMOUNT" prompt="逾期已开票金额"/>
        <bm:field name="licence_rent_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LICENCE_RENT_FLAG" prompt="是否租赁牌照"/>
        <bm:field name="licence_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LICENCE_AMOUNT" prompt="每期牌照租赁费"/>
        <bm:field name="total_licence_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_LICENCE_AMOUNT" prompt="牌照租赁费总额"/>
        <bm:field name="total_rec_licence_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_REC_LICENCE_AMOUNT" prompt="已收牌照租赁费"/>
        <bm:field name="total_unrec_licence_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_UNREC_LICENCE_AMOUNT" prompt="未收牌照租赁费"/>
        <bm:field name="overdue_licence_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_LICENCE_TIMES" prompt="逾期牌照租赁费期数"/>
        <bm:field name="overdue_licence_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_LICENCE_AMOUNT" prompt="逾期牌照租赁费"/>
        <bm:field name="brand_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="BRAND_ID" prompt="YONDA_REPORT_FINANCE_V.BRAND_ID"/>
        <bm:field name="model_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="MODEL_ID" prompt="YONDA_REPORT_FINANCE_V.MODEL_ID"/>
        <bm:field name="series_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="SERIES_ID" prompt="YONDA_REPORT_FINANCE_V.SERIES_ID"/>
        <bm:field name="car_info" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CAR_INFO" prompt="租赁物信息"/>
        <bm:field name="item_frame_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_FRAME_NUMBER" prompt="车架号"/>
        <bm:field name="item_engine_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_ENGINE_NUMBER" prompt="发动机号"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="contract_number" queryExpression="upper(t1.contract_number) like &apos;%&apos; || upper(${@contract_number}) || &apos;%&apos;"/>
        <bm:query-field field="project_number" queryExpression="upper(t1.project_number) like &apos;%&apos; || upper(${@project_number}) || &apos;%&apos;"/>
        <bm:query-field field="bp_id_code" queryExpression="upper(t1.bp_id_code) like &apos;%&apos; || upper(${@bp_id_code}) || &apos;%&apos;"/>
        <bm:query-field field="invoice_title" queryExpression="upper(t1.invoice_title) like &apos;%&apos; || upper(${@invoice_title}) || &apos;%&apos;"/>
        <bm:query-field field="car_info" queryExpression="upper(t1.car_info) like &apos;%&apos; || upper(${@car_info}) || &apos;%&apos;"/>
        <bm:query-field field="item_frame_number" queryExpression="upper(t1.item_frame_number) like &apos;%&apos; || upper(${@item_frame_number}) || &apos;%&apos;"/>
        <bm:query-field field="item_engine_number" queryExpression="upper(t1.item_engine_number) like &apos;%&apos; || upper(${@item_engine_number}) || &apos;%&apos;"/>
        <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="lease_end_date_from" queryExpression="t1.lease_end_date &gt;= ${@lease_end_date_from} "/>
        <bm:query-field name="lease_end_date_to" queryExpression="t1.lease_end_date &lt;= ${@lease_end_date_to} "/>
        <bm:query-field name="invoice_price_from" queryExpression="t1.invoice_price &gt;= ${@invoice_price_from} "/>
        <bm:query-field name="invoice_price_to" queryExpression="t1.invoice_price &lt;= ${@invoice_price_to} "/>
        <bm:query-field name="lease_item_amount_from" queryExpression="t1.lease_item_amount &gt;= ${@lease_item_amount_from} "/>
        <bm:query-field name="lease_item_amount_to" queryExpression="t1.lease_item_amount &lt;= ${@lease_item_amount_to} "/>
        <bm:query-field name="finance_amount_from" queryExpression="t1.finance_amount &gt;= ${@finance_amount_from} "/>
        <bm:query-field name="finance_amount_to" queryExpression="t1.finance_amount &lt;= ${@finance_amount_to} "/>
        <bm:query-field field="company_id" queryOperator="="/>
        <bm:query-field field="contract_id" queryOperator="="/>
        <bm:query-field field="spv_company_id" queryOperator="="/>
        <bm:query-field field="project_id" queryOperator="="/>
        <bm:query-field field="unit_id" queryOperator="="/>
        <bm:query-field field="contract_status" queryOperator="="/>
        <bm:query-field field="lease_times" queryOperator="="/>
        <bm:query-field field="business_type" queryOperator="="/>
        <bm:query-field field="division" queryOperator="="/>
        <bm:query-field field="lease_channel" queryOperator="="/>
        <bm:query-field field="bp_id_tenant" queryOperator="="/>
        <bm:query-field field="bp_class" queryOperator="="/>
        <bm:query-field field="pmt_date" queryOperator="="/>
        <bm:query-field field="taxpayer_type" queryOperator="="/>
        <bm:query-field field="invoice_type" queryOperator="="/>
        <bm:query-field field="licence_rent_flag" queryOperator="="/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="1" enforceOperations="query" expression="t1.contract_status not in (&apos;CANCEL&apos;)"/>
    </bm:data-filters>
</bm:model>
