<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2015-1-16 下午1:10:28  
    $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
                    *
                FROM
                    (SELECT
                        hb.bp_name,
                        hb.bp_id
                    FROM
                        hls_bp_master hb
                    WHERE
                        hb.enabled_flag = 'Y' AND
                        hb.bp_category  = 'AGENT'
                    ) v #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="bp_id" databaseType="VARCHAR" datatype="java.lang.String" displayWidth="350" forDisplay="true" forQuery="true" physicalName="bp_id" prompt="经销商ID"/>
        <bm:field name="bp_name" databaseType="VARCHAR" datatype="java.lang.String" displayWidth="350" forDisplay="true" forQuery="true" physicalName="bp_name" prompt="经销商名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="bp_id" queryExpression="v.bp_id=${@bp_id}"/>
        <bm:query-field name="bp_name" queryExpression="v.bp_name like ${@bp_name}"/>
    </bm:query-fields>
</bm:model>
