<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-3-13 下午05:20:47  
    $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 ee.employee_id,
       ee.employee_code,
       hs.name salesman,
       hs.employee_id salesman_id
  from sys_user su, exp_employees ee, hls_salesman_v hs
 where su.user_id = ${/session/@user_id}
   and su.employee_id = ee.employee_id
   and ee.employee_id = hs.employee_id
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID"/>
        <bm:field name="employee_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_CODE"/>
        <bm:field name="salesman" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SALESMAN"/>
        <bm:field name="salesman_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SALESMAN_ID"/>
    </bm:fields>
</bm:model>
