<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Icon  
    $Date: 2014-11-6 下午8:14:01  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (
                SELECT
                	c1.contract_number,
                    c2.contract_lease_item_id,
                    c2.color_of_apprearance,
                    c2.brand_id brand_id,   --品牌ID
                    c2.series_id series_id, --车系ID
                    c2.model_id model_id,   --车型ID
                    (SELECT v.description FROM hls_car_brands_vl v WHERE v.brand_id=c2.brand_id
                    ) brand_dis,
                    (SELECT v.description FROM hls_car_model_vl v WHERE v.model_id=c2.model_id
                    ) model_dis,
                    (SELECT v.description FROM hls_car_series_vl v WHERE v.series_id=c2.series_id
                    ) series_dis
                FROM
                    con_contract_lease_item c2,con_contract c1 where c2.contract_id=c1.contract_id ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="contract_lease_item_id" queryExpression="t1.contract_lease_item_id = ${@contract_lease_item_id}"/>
    </bm:query-fields>
</bm:model>
