<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2015-2-15 上午11:40:54  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    nvl(tt.division,'##') division,
                    (SELECT d.description FROM hls_division d WHERE d.division = tt.division
                    ) AS division_n
                FROM
                    (SELECT DISTINCT
                        cc.division
                    FROM
                        con_contract cc
                    WHERE
                        1                           = 1 AND
                        cc.data_class               = 'NORMAL' AND
                        cc.contract_status          = 'TERMINATE' AND
                        NVL(cc.hd_user_col_v10,'N') = 'N' AND
                        cc.division    NOT    IN ('20')
                    ) tt
                ORDER BY
                    tt.division
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="division"/>
        <bm:field name="division_n"/>
    </bm:fields>
</bm:model>
