<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming  
    $Date: 2015-9-3 下午3:50:31  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="EXP_ORG_UNIT_V">
    <bm:fields>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID" prompt="EXP_ORG_UNIT_V.UNIT_ID"/>
        <bm:field name="unit_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="80" forDisplay="true" forQuery="true" physicalName="UNIT_CODE" prompt="部门编码"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="160" forDisplay="true" forQuery="true" physicalName="UNIT_NAME" prompt="部门名称"/>
        <bm:field name="parent_unit_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="160" forDisplay="true" physicalName="PARENT_UNIT_NAME" prompt="上级部门"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="unit_code" queryExpression="upper(t1.unit_code) like &apos;%&apos; || upper(${@unit_code}) || &apos;%&apos;"/>
        <bm:query-field field="unit_name" queryExpression="upper(t1.unit_name) like &apos;%&apos; || upper(${@unit_name}) || &apos;%&apos;"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
    </bm:data-filters>
</bm:model>
