<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming 
    $Date: 2015-5-25 下午12:26:01  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="YONDA_REPORT_GPS_V">
    <bm:fields>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="YONDA_REPORT_GPS_V.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="合同编号"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="合同名称"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID" prompt="YONDA_REPORT_GPS_V.UNIT_ID"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT_NAME" prompt="4s店"/>
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="YONDA_REPORT_GPS_V.OWNER_USER_ID"/>
        <bm:field name="owner_user_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OWNER_USER_NAME" prompt="金融专员"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="YONDA_REPORT_GPS_V.BP_ID"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="承租人"/>
        <bm:field name="brand_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BRAND_ID" prompt="YONDA_REPORT_GPS_V.BRAND_ID"/>
        <bm:field name="brand_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BRAND_NAME" prompt="品牌"/>
        <bm:field name="series_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SERIES_ID" prompt="YONDA_REPORT_GPS_V.SERIES_ID"/>
        <bm:field name="series_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERIES_NAME" prompt="车系"/>
        <bm:field name="model_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MODEL_ID" prompt="YONDA_REPORT_GPS_V.MODEL_ID"/>
        <bm:field name="model_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MODEL_NAME" prompt="车型"/>
        <bm:field name="item_frame_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_FRAME_NUMBER" prompt="车架号"/>
        <bm:field name="gps_install_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_INSTALL_FLAG" prompt="是否需要安装"/>
        <bm:field name="gps_absolution_apply_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_ABSOLUTION_APPLY_STATUS" prompt="YONDA_REPORT_GPS_V.GPS_ABSOLUTION_APPLY_STATUS"/>
        <bm:field name="gps_absolution_apply_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_ABSOLUTION_APPLY_FLAG" prompt="是否免除安装"/>
        <bm:field name="gps_installed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_INSTALLED_FLAG" prompt="是否已安装"/>
        <bm:field name="gps_enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_ENABLED_FLAG" prompt="GPS是否启用"/>
        <bm:field name="install_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSTALL_DATE" prompt="安装日期"/>
        <bm:field name="gps_fee" databaseType="NUMBER" datatype="java.lang.Double" physicalName="GPS_FEE" prompt="支出费用"/>
        <bm:field name="install_address" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSTALL_ADDRESS" prompt="安装地址"/>
        <bm:field name="imei" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IMEI" prompt="设备号"/>
        <bm:field name="install_location" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSTALL_LOCATION" prompt="安装位置"/>
        <bm:field name="gps_provider_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_PROVIDER_ID" prompt="YONDA_REPORT_GPS_V.GPS_PROVIDER_ID"/>
        <bm:field name="gps_provider_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GPS_PROVIDER_NAME" prompt="提供商"/>
        <bm:field name="remove_date" databaseType="DATE" datatype="java.lang.String" physicalName="REMOVE_DATE" prompt="拆除日期"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" 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="contract_name" queryExpression="upper(t1.contract_name) like &apos;%&apos; || upper(${@contract_name}) || &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="install_address" queryExpression="upper(t1.install_address) like &apos;%&apos; || upper(${@install_address}) || &apos;%&apos;"/>
        <bm:query-field field="imei" queryExpression="upper(t1.imei) like &apos;%&apos; || upper(${@imei}) || &apos;%&apos;"/>
        <bm:query-field field="install_location" queryExpression="upper(t1.install_location) like &apos;%&apos; || upper(${@install_location}) || &apos;%&apos;"/>
        <bm:query-field field="owner_user_name" queryExpression="upper(t1.owner_user_name) like &apos;%&apos; || upper(${@owner_user_name}) || &apos;%&apos;"/>
        <bm:query-field name="install_date_from" queryExpression="t1.install_date &gt;= ${@install_date_from}"/>
        <bm:query-field name="install_date_to" queryExpression="t1.install_date &lt;= ${@install_date_to}"/>
        <bm:query-field name="gps_fee_from" queryExpression="t1.gps_fee &gt;= ${@gps_fee_from}"/>
        <bm:query-field name="gps_fee_to" queryExpression="t1.gps_fee &lt;= ${@gps_fee_to}"/>
        <bm:query-field name="remove_date_from" queryExpression="t1.remove_date &gt;= ${@remove_date_from}"/>
        <bm:query-field name="remove_date_to" queryExpression="t1.remove_date &lt;= ${@remove_date_to}"/>
        <bm:query-field field="unit_id" queryOperator="="/>
        <bm:query-field field="owner_user_id" queryOperator="="/>
        <bm:query-field field="bp_id" queryOperator="="/>
        <bm:query-field field="brand_id" queryOperator="="/>
        <bm:query-field field="series_id" queryOperator="="/>
        <bm:query-field field="model_id" queryOperator="="/>
        <bm:query-field field="gps_install_flag" queryOperator="="/>
        <bm:query-field field="gps_absolution_apply_flag" queryOperator="="/>
        <bm:query-field field="gps_installed_flag" queryOperator="="/>
        <bm:query-field field="gps_enabled_flag" queryOperator="="/>
        <bm:query-field field="gps_provider_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
