<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Clocc  
    $Date: 2015-7-31 上午10:54:39  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CUS_RPT_CON630_O">
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="CUS_RPT_CON630_O.RECORD_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CUS_RPT_CON630_O.CONTRACT_ID"/>
        <bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SEARCH_TERM_1" prompt="CUS_RPT_CON630_O.SEARCH_TERM_1"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="CUS_RPT_CON630_O.BP_ID_TENANT"/>
        <bm:field name="bp_id_vender" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_VENDER" prompt="CUS_RPT_CON630_O.BP_ID_VENDER"/>
        <bm:field name="overdue_times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_TIMES" prompt="CUS_RPT_CON630_O.OVERDUE_TIMES"/>
        <bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_N" prompt="CUS_RPT_CON630_O.DIVISION_N"/>
        <bm:field name="serial_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERIAL_NUMBER" prompt="CUS_RPT_CON630_O.SERIAL_NUMBER"/>
        <bm:field name="specification" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SPECIFICATION" prompt="CUS_RPT_CON630_O.SPECIFICATION"/>
        <bm:field name="company_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_ID_N" prompt="CUS_RPT_CON630_O.COMPANY_ID_N"/>
        <bm:field name="province_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROVINCE_ID_N" prompt="CUS_RPT_CON630_O.PROVINCE_ID_N"/>
        <bm:field name="legal_times" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEGAL_TIMES" prompt="CUS_RPT_CON630_O.LEGAL_TIMES"/>
        <bm:field name="lawsuit_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAWSUIT_FLAG" prompt="CUS_RPT_CON630_O.LAWSUIT_FLAG"/>
        <bm:field name="accounting_period" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ACCOUNTING_PERIOD" prompt="CUS_RPT_CON630_O.ACCOUNTING_PERIOD"/>
        <bm:field name="lease_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="LEASE_START_DATE" prompt="CUS_RPT_CON630_O.LEASE_START_DATE"/>
        <bm:field name="due_date" databaseType="DATE" datatype="java.util.Date" physicalName="DUE_DATE" prompt="CUS_RPT_CON630_O.DUE_DATE"/>
        <bm:field name="times" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TIMES" prompt="CUS_RPT_CON630_O.TIMES"/>
        <bm:field name="outstanding_rental" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OUTSTANDING_RENTAL" prompt="CUS_RPT_CON630_O.OUTSTANDING_RENTAL"/>
        <bm:field name="month_disposed_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="MONTH_DISPOSED_AMOUNT" prompt="CUS_RPT_CON630_O.MONTH_DISPOSED_AMOUNT"/>
        <bm:field name="overdue_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT"/>
        <bm:field name="received_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RECEIVED_AMOUNT" prompt="CUS_RPT_CON630_O.RECEIVED_AMOUNT"/>
        <bm:field name="month_disposed_date" databaseType="DATE" datatype="java.util.Date" physicalName="MONTH_DISPOSED_DATE" prompt="CUS_RPT_CON630_O.MONTH_DISPOSED_DATE"/>
        <bm:field name="month_received_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="MONTH_RECEIVED_AMOUNT" prompt="CUS_RPT_CON630_O.MONTH_RECEIVED_AMOUNT"/>
        <bm:field name="outstanding_principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OUTSTANDING_PRINCIPAL" prompt="CUS_RPT_CON630_O.OUTSTANDING_PRINCIPAL"/>
        <bm:field name="outstanding_interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OUTSTANDING_INTEREST" prompt="CUS_RPT_CON630_O.OUTSTANDING_INTEREST"/>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EMPLOYEE_ID" prompt="CUS_RPT_CON630_O.EMPLOYEE_ID"/>
        <bm:field name="collector_user_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="COLLECTOR_USER_ID" prompt="CUS_RPT_CON630_O.COLLECTOR_USER_ID"/>
        <bm:field name="overdue_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_RATE" prompt="CUS_RPT_CON630_O.OVERDUE_RATE"/>
        <bm:field name="overdue_amount_1_30" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT_1_30" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT_1_30"/>
        <bm:field name="overdue_amount_31_60" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT_31_60" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT_31_60"/>
        <bm:field name="overdue_amount_61_90" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT_61_90" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT_61_90"/>
        <bm:field name="overdue_amount_91_120" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT_91_120" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT_91_120"/>
        <bm:field name="overdue_amount_121_360" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT_121_360" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT_121_360"/>
        <bm:field name="overdue_amount_360" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OVERDUE_AMOUNT_360" prompt="CUS_RPT_CON630_O.OVERDUE_AMOUNT_360"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CUS_RPT_CON630_O.DESCRIPTION"/>
        <bm:field name="followed_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FOLLOWED_METHOD" prompt="CUS_RPT_CON630_O.FOLLOWED_METHOD"/>
        <bm:field name="et_external" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ET_EXTERNAL" prompt="CUS_RPT_CON630_O.ET_EXTERNAL"/>
        <bm:field name="unrecived_amount" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNRECIVED_AMOUNT" prompt="CUS_RPT_CON630_O.UNRECIVED_AMOUNT"/>
        <bm:field name="control_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CONTROL_ID" prompt="CUS_RPT_CON630_O.CONTROL_ID"/>
        <bm:field name="contract_number" databaseType="NVARCHAR2" physicalName="CONTRACT_NUMBER" prompt="CUS_RPT_CON630_O.CONTRACT_NUMBER"/>
        <bm:field name="bp_id_vender_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_VENDER_N" prompt="CUS_RPT_CON630_O.BP_ID_VENDER_N"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="CUS_RPT_CON630_O.DIVISION"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="COMPANY_ID" prompt="CUS_RPT_CON630_O.COMPANY_ID"/>
        <bm:field name="province_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PROVINCE_ID" prompt="CUS_RPT_CON630_O.PROVINCE_ID"/>
        <bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_TENANT_N" prompt="CUS_RPT_CON630_O.BP_ID_TENANT_N"/>
        <bm:field name="employee_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_N" prompt="CUS_RPT_CON630_O.EMPLOYEE_ID_N"/>
        <bm:field name="collector_user_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLLECTOR_USER_ID_N" prompt="CUS_RPT_CON630_O.COLLECTOR_USER_ID_N"/>
        <bm:field name="times_01" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TIMES_01" prompt="CUS_RPT_CON630_O.TIMES_01"/>
        <bm:field name="lb_pattern" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LB_PATTERN" prompt="CUS_RPT_CON630_O.LB_PATTERN"/>
        <bm:field name="branch_company" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BRANCH_COMPANY" prompt="CUS_RPT_CON630_O.BRANCH_COMPANY"/>
        <bm:field name="legal_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEGAL_STATUS" prompt="CUS_RPT_CON630_O.LEGAL_STATUS"/>
        <bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS" prompt="CUS_RPT_CON630_O.CONTRACT_STATUS"/>
        <bm:field name="legal_way" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEGAL_WAY" prompt="CUS_RPT_CON630_O.LEGAL_WAY"/>
        <bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="CUS_RPT_CON630_O.LEASE_CHANNEL"/>
        <bm:field name="lease_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="LEASE_END_DATE" prompt="CUS_RPT_CON630_O.LEASE_END_DATE"/>
        <bm:field name="risk_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RISK_FLAG_N" prompt="CUS_RPT_CON630_O.RISK_FLAG_N"/>
        <bm:field name="penalty" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PENALTY" prompt="CUS_RPT_CON630_O.PENALTY"/>
        <bm:field name="overdue_month_times"/>
        <bm:field name="lease_item_amount"/>
        <bm:field name="penalty_all"/>
        <bm:field name="lawsuit_status_n" expression="(select a.code_value_name from sys_code_values_v a,con_contract cc where a.code = &apos;LEG501_LAWSUIT_STATUS&apos; and cc.contract_id = t1.contract_id and a.code_value = cc.lawsuit_status)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field name="npl_flag" queryExpression="t1.overdue_month_times&gt;=4 and nvl(legal_status,&apos;NULL&apos;) not in (&apos;RETURN&apos;,&apos;TAKE_BACK&apos;,&apos;SELL&apos;)"/>
        <bm:query-field field="collector_user_id_n" queryOperator="like"/>
        <bm:query-field field="search_term_1" queryOperator="like"/>
        <bm:query-field field="contract_number" queryOperator="like"/>
        <bm:query-field field="serial_number" queryOperator="like"/>
        <bm:query-field name="lease_start_date_from" queryExpression="t1.lease_start_date &gt;= to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="lease_start_date_to" queryExpression="t1.lease_start_date &lt;= to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="init" enforceOperations="query" expression="t1.control_id=${@control_id}"/>
    </bm:data-filters>
</bm:model>
