<?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 * from overdue_v #WHERE_CLAUSE#]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER"/>
        <bm:field name="product_plan_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRODUCT_PLAN_ID_N"/>
        <bm:field name="province_sp" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROVINCE_SP"/>
        <bm:field name="city_sp" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CITY_SP"/>
        <bm:field name="invoice_agent_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_AGENT_ID_N"/>
        <bm:field name="bp_class_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS_N"/>
        <bm:field name="withhold_way_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WITHHOLD_WAY_N"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" required="true"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME"/>
        <!--   <bm:field name="overdue_status_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OVERDUE_STATUS_TYPE_N"/> -->
        <bm:field name="overdue_due_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_RECEIVED_DATE"/>
        <bm:field name="contract_status_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS_N"/>
        <bm:field name="inception_of_lease" databaseType="DATE" datatype="java.util.Date" physicalName="INCEPTION_OF_LEASE"/>
        <!--  <bm:field name="risk_rank" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RISK_RANK"/>
        <bm:field name="overdue_times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OVERDUE_TIMES"/>
        <bm:field name="overdue_max_days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OVERDUE_MAX_DAYS"/> -->
        <!--   <bm:field name="overdue_amount_sum" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OVERDUE_AMOUNT_SUM"/> -->
        <bm:field name="overdue_principal" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OVERDUE_PRINCIPAL"/>
        <bm:field name="overdue_interest" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OVERDUE_INTEREST"/>
        <bm:field name="penalty" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PENALTY"/>
        <bm:field name="principal" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRINCIPAL"/>
        <bm:field name="due_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DUE_AMOUNT"/>
        <!-- <bm:field name="total_principal" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TOTAL_PRINCIPAL"/> -->
        <bm:field name="due_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DUE_DATE"/>
        <bm:field name="lease_times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_TIMES"/>
        <!--  <bm:field name="group_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GROUP_NAME"/>
        <bm:field name="staff_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STAFF_NAME"/> -->
        <bm:field name="cell_phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CELL_PHONE"/>
        <bm:field name="bp_name_sp" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME_SP"/>
        <bm:field name="cell_phone_sp" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CELL_PHONE_SP"/>
        <bm:field name="collecting_fee" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COLLECTING_FEE"/>
        <bm:field name="age" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AGE"/>
        <bm:field name="position_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSITION_N"/>
        <bm:field name="down_payment" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOWN_PAYMENT"/>
        <bm:field name="down_payment_ratio" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOWN_PAYMENT_RATIO"/>
        <bm:field name="balloon" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BALLOON"/>
        <bm:field name="balloon_ratio" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BALLOON_RATIO"/>
        <bm:field name="direct_debit_bank_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIRECT_DEBIT_BANK_ID_N"/>
        <bm:field name="dd_bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DD_BANK_ACCOUNT_NUM"/>
        <bm:field name="dd_bank_account_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DD_BANK_ACCOUNT_NAME"/>
        <bm:field name="car_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CAR_TYPE_N"/>
        <bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE_N"/>
        <bm:field name="insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_FLAG"/>
        <bm:field name="gps_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_FLAG"/>
        <bm:field name="producer" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRODUCER"/>
        <bm:field name="brand_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BRAND_ID_N"/>
        <bm:field name="series_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERIES_ID_N"/>
        <bm:field name="model_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MODEL_ID_N"/>
        <bm:field name="item_frame_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_FRAME_NUMBER"/>
        <bm:field name="color_of_apprearance" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLOR_OF_APPREARANCE"/>
        <bm:field name="item_engine_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_ENGINE_NUMBER"/>
        <bm:field name="license_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LICENSE_NUMBER"/>
        <bm:field name="invoice_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_PRICE"/>
        <bm:field name="guide_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GUIDE_PRICE"/>
        <bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FINANCE_AMOUNT"/>
        <bm:field name="int_rate_display" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INT_RATE_DISPLAY"/>
        <bm:field name="pmt" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PMT"/>
        <bm:field name="bp_info" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_INFO"/>
        <bm:field name="id_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ID_TYPE"/>
        <bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ID_CARD_NO"/>
        <bm:field name="work_unit" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WORK_UNIT"/>
        <bm:field name="work_unit_address" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WORK_UNIT_ADDRESS"/>
        <bm:field name="living_address" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LIVING_ADDRESS"/>
        <bm:field name="address_on_resident_booklit" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADDRESS_ON_RESIDENT_BOOKLIT"/>
        <bm:field name="gps1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS1"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="invoice_agent_id_n" queryExpression="invoice_agent_id_n=${@invoice_agent_id_n}"/>
        <bm:query-field name="project_number" queryExpression="upper(project_number) like &apos;%&apos; || upper(${@project_number}) || &apos;%&apos;"/>
        <bm:query-field name="contract_number" queryExpression="upper(contract_number) like &apos;%&apos; || upper(${@contract_number}) || &apos;%&apos;"/>
        <bm:query-field name="contract_status_n" queryExpression="contract_status_n=${@contract_status_n}"/>
    </bm:query-fields>
</bm:model>
