<?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 s.user_id code, s.description code_name
  From exp_employee_assigns_v v, sys_user s
 Where v.enabled_flag = 'Y'
   And v.employee_enabled = 'Y'
   And v.employee_id = s.employee_id
  
   And v.unit_id In (Select unit_id
                       From exp_employee_assigns_v
                      Where user_id = ${@user_id}
                        And enabled_flag = 'Y')

            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="code"/>
        <bm:field name="code_name"/>
    </bm:fields>
</bm:model>
