<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT t1.employee_id   code,  t1.employee_name code_name,       t1.unit_id       unit_id,
       t1.unit_name     unit_id_n,
    hlo.lease_organization,
    hlo.description as lease_organization_n
  FROM exp_employee_assigns_v t1,
       hls_lease_organization hlo,
       exp_org_unit_v         t
 WHERE hlo.lease_organization = t.lease_organization
   AND t.unit_id = t1.unit_id


            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CODE" required="true"/>
        <bm:field name="code_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NAME"/>
        <bm:field name="lease_organization"/>
        <bm:field name="lease_organization_n"/>
        <bm:field name="unit_id"/>
        <bm:field name="unit_id_n"/>
    </bm:fields>
</bm:model>
