<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (
                SELECT
                    ppb.prj_bp_id,
                    ppb.project_id,
                    ppb.bp_code,
                    ppb.bp_name,
                    ppb.bp_category,
                    hbc.description bp_category_desc
                FROM
                    prj_project_bp ppb,
                    hls_bp_category hbc
                WHERE
                    ppb.bp_category = hbc.bp_category) t
                    #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="prj_bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRJ_BP_ID"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_CODE" prompt="商业伙伴代码"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="商业伙伴名称"/>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY"/>
        <bm:field name="bp_category_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY_DESC"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t.project_id=${@project_id}"/>
    </bm:data-filters>
    <bm:query-fields>
        <bm:query-field field="bp_code" queryOperator="like"/>
        <bm:query-field field="bp_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
