<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="hm" baseTable="hls_bp_master">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
               select hm.bp_id,
               		  hm.bp_name,
               		  nvl(hm.id_card_no,hm.id_card_no_leg) id_card_no,
               		  hm.bp_class 
               from hls_bp_master hm
               #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="true" forQuery="true" physicalName="BP_ID" prompt="用户ID"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="用户名称"/>
        <bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="ID_CARD_NO" prompt="身份证号"/>
    </bm:fields>
    <bm:query-fields><![CDATA[
    ]]></bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceActions="query" expression="hm.bp_class = ${@customer_type}"/>
    </bm:data-filters>
</bm:model>
