<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2014-11-7 下午1:23:33  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    company_id,
                    project_id,
                    document_type,          -- 合同类型
                    document_category,      -- 合同类别
                    contract_id,            -- 合同ID
                    contract_lease_item_id, -- 合同租赁物汇总ID
                    brand_id,               --品牌ID
                    series_id,              --车系ID
                    model_id,               --车型ID
                    contract_name,          -- 合同名称
                    contract_number,        --合同编号
                    color_of_apprearance,   -- 外饰颜色
                    color_of_decoration,    --内饰颜色
                    purchase_tax,           -- 购置税
                    purchase_fee,           -- 购车杂费
                    badge_price,            -- 牌照费
                    badge_license_fee,      -- 拍牌手续费
                    insurance_price,        -- 保险费
                    badge_fee,              -- 上牌杂费
                    gps_fee,                -- GPS安装费+年费
                    purchase_flag,
                    key_flag,
                    registration_flag,
                    insurance_flag,
                    bp_name,
                    bp_id_tenant,
                    item_detail_id
                FROM
                    CON_CONTRACT_ITEM_V 
                    #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="INS_INSURANCE_POLICY.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="contract_number" prompt="INS_INSURANCE_POLICY.ENGINE_NUMBER"/>
        <bm:field name="bp_name"/>
        <bm:field name="item_detail_id"/>
        <!--          <bm:field name="series_dis"/>
        <bm:field name="model_dis"/> -->
        <bm:field name="color_of_apprearance"/>
        <bm:field name="color_of_decoration"/>
        <!--         <bm:field name="item_engine_number"/> -->
        <bm:field name="key_flag"/>
        <bm:field name="registration_flag"/>
        <bm:field name="purchase_flag"/>
        <bm:field name="insurance_flag"/>
        <bm:field name="bp_id_tenant"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="contract_id" queryOperator="="/>
        <bm:query-field field="contract_number" queryOperator="like"/>
        <bm:query-field field="bp_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
