<?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 ee.employee_code,ee.name,ee.email from exp_employees ee 
where ee.enabled_flag = 'Y'
and exists (select 1 from exp_employee_assigns eea,exp_org_position eop 
where eea.position_id = eop.position_id
and eea.employee_id = ee.employee_id
and eop.position_code = '1052'
and eop.company_id = ${/session/@company_id})]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter inputPath="/session/@company_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="employee_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="EMPLOYEE_CODE" prompt="员工号"/>
        <bm:field name="name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="NAME" prompt="名称"/>
        <bm:field name="email" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="EMAIL" prompt="邮箱地址"/>
    </bm:fields>
</bm:model>
