<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2014-12-25 上午9:35:52  
    $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 t1.company_id,
       t1.company_short_name,
       decode(t1.company_code,
              '1000',
              'SHANGHAI',
              'OUT_OF_SHANGHAI') DISTRICT,
     (select a.code_value_name from sys_code_values_v a where a.code='PRJ500N_DISTRICT_AREAS'
     and a.code_value=  decode(t1.company_code,
              '1000',
              'SHANGHAI',
              'OUT_OF_SHANGHAI')) DISTRICT_N        
  FROM fnd_companies t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="company_id" queryExpression="t1.company_id=${@company_id}"/>
    </bm:query-fields>
</bm:model>
