<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2012-11-13 下午02:09:07  
    $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
                    1 "row",
                    'A' cell,
                    'content' type,
                    '' range,
                    '报表名' value,
                    'header' styleName
                FROM
                    dual
                UNION ALL
                SELECT
                    2 "row",
                    'A' cell,
                    'content' type,
                    '' range,
                    '制表日期' value,
                    'header' styleName
                FROM
                    dual
                UNION ALL
                SELECT
                    3 "row",
                    'A' cell,
                    'content' type,
                    '' range,
                    '制表人' value,
                    'header' styleName
                FROM
                    dual
                UNION ALL
                SELECT
                    1 "row",
                    'B' cell,
                    'content' type,
                    '' range,
                    h.report_header_description value,
                    '' styleName
                FROM
                    psr_report_headers h
                WHERE
                    h.report_header_id = ${@report_header_id}
                UNION ALL
                SELECT
                    2 "row",
                    'B' cell,
                    'content' type,
                    '' range,
                    TO_CHAR(sysdate, 'yyyy-mm-dd') value,
                    '' styleName
                FROM
                    dual
                UNION ALL
                SELECT
                    3 "row",
                    'B' cell,
                    'content' type,
                    '' range,
                    (SELECT e.name FROM exp_employees e WHERE e.employee_id = u.employee_id
                    ) value,
                    '' styleName
                FROM
                    sys_user u
                WHERE
                    u.user_id = ${/session/@user_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
