<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-12-20 下午02:59:33  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select m.bp_id,
			       m.bp_code,
			       m.bp_name,
			       m.bp_category,
			       m.bp_type,
			       m.bp_class
			  from hls_bp_master m, hls_bp_master_company c
			 #WHERE_CLAUSE#
   ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"/>
        <bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="承租人编号"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="150" forDisplay="true" forQuery="true" prompt="承租人名称" queryWidth="150"/>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY"/>
        <bm:field name="bp_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TYPE"/>
        <bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="m.bp_id = c.bp_id  and c.company_id = ${/session/@company_id}  and m.enabled_flag = &apos;Y&apos;  and c.enabled_flag = &apos;Y&apos;  and m.bp_category=&apos;TENANT&apos;"/>
    </bm:data-filters>
    <bm:query-fields>
        <bm:query-field name="bp_code" queryExpression="m.bp_code like ${@bp_code}"/>
        <bm:query-field name="bp_name" queryExpression="m.bp_name like ${@bp_name}"/>
    </bm:query-fields>
</bm:model>
