<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-8-23 下午04:18:57  
    $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
                        -- cc.contract_id,
                        -- cc.contract_number,
                        -- cc.contract_name,
                        -- cc.bp_id_tenant,
                        -- (SELECT bp_name FROM hls_bp_master h WHERE h.bp_id = cc.bp_id_tenant
                        -- ) bp_id_tenant_n,
                        -- cc.project_id,
                        -- cc.division
                        cc.*
                    FROM
                        CON_CONTRACT_CAL_LV cc
                    WHERE
                        cc.data_class = 'NORMAL'
                        and cc.contract_status NOT IN ('CLOSED')
                    ) t1 #WHERE_CLAUSE#
                ORDER BY
                    t1.contract_number DESC
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
