psr_report_mail.lsc 3.77 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:task="leaf.application.task" xmlns:s="leaf.plugin.script" xmlns:dr="leaf.plugin.excelreport" xmlns:mail="leaf.plugin.mail" xmlns:msg="leaf.application.features.msg" xmlns:t="uncertain.composite.transform" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:excel="leaf.application.task.excel" trace="true">
    <a:init-procedure>
        <s:server-script><![CDATA[
            if (!$ctx.session.user_id) {
                $ctx.session.user_id = -1;
            }
        ]]></s:server-script>
        <!-- <a:model-execute model="psr.check_table_authority"/> -->
        <!-- <a:model-update model="psr.PSR1010.psr_check_send_mail"/> -->
        <!-- <a:model-query fetchAll="true" model="psr.psr_datasource_query" rootPath="/model/datasource"/>
        <a:model-query fetchAll="true" model="psr.psr_datasource_query_result" rootPath="/model/users"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_excel_report_name" nameSpace="leaf.plugin.excelreport" recordName="excel-report" rootpath="/"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_cell_style" recordName="cell-style" rootpath="/excel-report/styles"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_font" recordName="font" rootpath="fonts"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_sheet_name" recordName="sheet" rootpath="/excel-report/sheets"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_sheet_info_query" recordName="cell-data" rootpath="/excel-report/sheets/sheet/static-content"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_dynamic_content_info" recordName="dynamic-content" rootpath="/excel-report/sheets/sheet"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_sheet_columns_query" recordName="table-column" rootpath="/excel-report/sheets/sheet/dynamic-content/columns"/>
        <a:model-query autocount="false" fetchAll="false" model="psr.psr_report_group_query" recordName="subtotal-config" rootpath="/table-column"/>
        <t:master-detail-join detailModel="/model/fonts" joinField="cell_style_id" model="/excel-report/styles"/>
        <t:master-detail-join detailModel="/table-column" detailPath="groups" joinField="report_field_id" model="/excel-report/sheets/sheet/dynamic-content/columns"/>
        <task:async-task bm="db.sys_tasks_pkg.add_task" taskDescription="生成excel" taskName="test" taskType="JAVA">
            <dr:excel-report configPath="/excel-report" enableTask="true"/>
            <a:model-insert model="psr.PSR1030.psr_task_reports"/>
            <p:switch test="/parameter/@send_mail_flag">
                <p:case value="Y"> -->
        <mail:AutoSendMail content="1212121212121" cto="kang.liu01@hand-china.com" title="邮件测试" tto="kang.liu01@hand-china.com">
            <attachments>
                <mail:attachment name="SJL0001s0116080000529-1-1764-浦发2000000807-0001994.docx" path="/home/hls/rd_dev/excel/3AB528D10E655A0EE053E50B0A0A61B3con7763"/>
            </attachments>
        </mail:AutoSendMail>
        <!-- </p:case>
                <p:case value="*">
                    <a:model-insert model="psr.PSR1010.psr_task_insert_mail_list"/>
                </p:case>
            </p:switch>
        </task:async-task>
        <msg:message-creator message="task_message" topic="task" trxType="true">
            <properties>
                <msg:property key="task_id" value="${/parameter/@task_id}"/>
                <msg:property key="cookie" value="${/request/@cookie}"/>
            </properties>
        </msg:message-creator> -->
    </a:init-procedure>
    <a:service-output output="/parameter"/>
</a:service>