<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang 
    $Date: 2015-8-26 下午03:58:46  
    $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
                    eop.position_id,
                    eop.description position_id_n,
                    'EMPLOYEE' payee_category,
                    (SELECT
                        sc.code_value_name
                    FROM
                        sys_code_values_v sc
                    WHERE
                        sc.code                    = 'PAYMENT_OBJECT' AND
                        sc.code_enabled_flag       = 'Y' AND
                        sc.code_value_enabled_flag = 'Y' AND
                        sc.code_value              = 'EMPLOYEE'
                    ) payee_category_n,
                    eea.employee_id,
                    eea.employee_code
                    ||'-'
                    ||eea.employee_name employee_id_n
                FROM
                    exp_employee_assigns_v eea,
                    exp_org_position_vl eop
                WHERE
                    eea.employee_id           = ${/parameter/@employee_id} AND
                    eea.enabled_flag          = 'Y' AND
                    eea.primary_position_flag = 'Y' AND
                    eea.position_id           = eop.position_id AND
                    eop.enabled_flag          = 'Y'
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
