<?xml version="1.0" encoding="UTF-8"?>
<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
                    hbm.bp_code bp_code_lately,
                    hbm.bp_name bp_agent_name
                FROM
                    hls_bp_master hbm
                WHERE
                    hbm.bp_category  = 'AGENT' AND
                    hbm.bp_type      = 'AGENT' AND
                    hbm.enabled_flag = 'Y'
                    ) t1
                    #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="bp_code_lately" forDisplay="true" forQuery="true" prompt="代理商编号"/>
        <bm:field name="bp_agent_name" forDisplay="true" forQuery="true" prompt="代理商名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="bp_code_lately" queryExpression="t1.bp_code_lately like &apos;%&apos;||${@bp_code_lately}||&apos;%&apos;"/>
        <bm:query-field name="bp_agent_name" queryExpression="t1.bp_agent_name like &apos;%&apos;||${@bp_agent_name}||&apos;%&apos;"/>
    </bm:query-fields>
</bm:model>
