<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Administrator  
    $Date: 2014-8-25 下午4:09:20  
    $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 * from (select distinct t1.unit_id, t1.unit_code, t2.description_text as unit_name,t1.company_id
  from exp_org_unit t1, fnd_descriptions t2
 where t1.description_id = t2.description_id
   and t2.language = 'ZHS'
 order by t1.unit_id) t #WHERE_CLAUSE#]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID"/>
        <bm:field name="unit_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="UNIT_CODE" prompt="部门代码"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="UNIT_NAME" prompt="部门名称"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="unit_code" queryOperator="="/>
        <bm:query-field field="company_id" queryOperator="="/>
        <bm:query-field field="unit_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
