<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_BP_MASTER">
    <bm:fields>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="HLS_BP_MASTER.BP_CATEGORY"/>
        <bm:field name="bp_category_n" expression="(select bc.description from hls_bp_category bc where bc.bp_category = t1.bp_category)" forInsert="false" forUpdate="false"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="HLS_BP_MASTER.BP_ID"/>
        <bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CODE" prompt="HLS_BP_MASTER.BP_CODE"/>
        <bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS" prompt="HLS_BP_MASTER.BP_CLASS"/>
        <bm:field name="bp_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TYPE" prompt="HLS_BP_MASTER.BP_TYPE"/>
        <bm:field name="bp_class_n" expression="(SELECT v.code_value_name   FROM sys_code_values_v v  WHERE v.code = &apos;HLS211_BP_CLASS&apos;    AND v.code_enabled_flag = &apos;Y&apos;    AND v.code_value_enabled_flag = &apos;Y&apos;    AND v.code_value = t1.bp_class)" forInsert="false" forUpdate="false"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="HLS_BP_MASTER.BP_NAME"/>
        <bm:field name="kingdee_bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="KINGDEE_BP_CODE" prompt="HLS_BP_MASTER.KINGDEE_BP_CODE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="bp_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="bp_name" queryExpression="t1.bp_name like ${@bp_name}"/>
        <bm:query-field field="bp_code" queryExpression="t1.bp_code like upper(&apos;%&apos;||${@bp_code}||&apos;%&apos;)"/>
        <bm:query-field field="bp_category" queryExpression="t1.bp_category like ${@bp_category}"/>
        <bm:query-field field="bp_class" queryExpression="t1.bp_class like ${@bp_class}"/>
    </bm:query-fields>
    <bm:data-filters>
        <!-- <bm:data-filter enforceOperations="query" expression=" exists (SELECT 1 FROM con_contract cc WHERE cc.bp_id_tenant = t1.bp_id) "/> -->
        <!-- <bm:data-filter enforceOperations="query" expression="t1.bp_type = &apos;TENANT&apos;"/> --><![CDATA[
        
        
    ]]></bm:data-filters>
</bm:model>
