<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE excels PUBLIC "-//PAOHAIJIAO//DTD API EXCEL 1.0//EN"
        "classpath:paohaijiao/dtd/Jquick-excel.dtd">
<excels namespace="com.github.paohaijiao.biz.merge.Merge0077MonthlyCostLedgerService">

    <!-- 导出：月度成本费用台账 -->
    <excel name="exportMonthlyCostLedger" returnClass="void">
        <![CDATA[
            EXPORT WITH SHEET="月度成本费用台账", HEADER=true,
                MAPPING={"a":"费用大类","b":"费用明细","c":"预算金额","d":"实际金额","e":"差异","f":"执行率"},
                FORMAT={"c":"#,##0.00","d":"#,##0.00","e":"#,##0.00","f":"0.00%"},
                FORMULAS={
                    E2:'D2-C2',F2:'D2/C2',E3:'D3-C3',F3:'D3/C3',E4:'D4-C4',F4:'D4/C4',
                    C5:'SUM(C2:C4)',D5:'SUM(D2:D4)',E5:'D5-C5',F5:'D5/C5',
                    E6:'D6-C6',F6:'D6/C6',E7:'D7-C7',F7:'D7/C7',
                    C8:'SUM(C6:C7)',D8:'SUM(D6:D7)',E8:'D8-C8',F8:'D8/C8',
                    C9:'C5+C8',D9:'D5+D8',E9:'D9-C9',F9:'D9/C9'
                },
                STYLE={
                    ROW 5:{bold:true,fillPattern:solid_foreground,fillForegroundColor:lightYellow,alignment:right,verticalAlignment:center},
                    ROW 8:{bold:true,fillPattern:solid_foreground,fillForegroundColor:lightYellow,alignment:right,verticalAlignment:center},
                    ROW 9:{bold:true,fillPattern:solid_foreground,fillForegroundColor:lightYellow,alignment:right,verticalAlignment:center}
                },
                MERGE:{
                    RANGE A2:A4 WITH MERGE_WITH_FIRST,
                    RANGE A6:A7 WITH MERGE_WITH_FIRST
                }
        ]]>
    </excel>

    <!-- 导入解析：读取导出的月度成本费用台账 -->
    <excel name="importMonthlyCostLedger" returnClass="java.util.List">
        <![CDATA[
            IMPORT WITH SHEET="月度成本费用台账", HEADER=true,
                MAPPING={"费用大类":"costCategory","费用明细":"costItem","预算金额":"budgetAmount","实际金额":"actualAmount","差异":"difference","执行率":"executionRate"}
        ]]>
    </excel>

</excels>
