<?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.formulas.Formulas0045PurchasePriceCompareService">

    <!-- 导出：采购价格对比分析表 -->
    <excel name="exportPurchasePriceCompare" returnClass="void">
        <![CDATA[
            EXPORT WITH SHEET="采购价格对比分析", HEADER=true,
                MAPPING={"a":"物料名称","b":"供应商","c":"基准价","d":"报价","e":"价差","f":"价差率","g":"价格评定"},
                FORMAT={"c":"#,##0.00","d":"#,##0.00","e":"#,##0.00","f":"0.00%"},
                FORMULAS={
                    E2:'D2-C2',F2:'E2/C2',
                    E3:'D3-C3',F3:'E3/C3',
                    E4:'D4-C4',F4:'E4/C4',
                    E5:'D5-C5',F5:'E5/C5',
                    E6:'D6-C6',F6:'E6/C6',
                    C7:'AVERAGE(C2:C6)',D7:'AVERAGE(D2:D6)',E7:'D7-C7',F7:'E7/C7'
                },
                STYLE={
                    ROW 7:{bold:true,fillPattern:solid_foreground,fillForegroundColor:lightYellow,alignment:right,verticalAlignment:center},
                    F4:{color:red,bold:true}
                }
        ]]>
    </excel>

    <!-- 导入解析：读取导出的采购价格对比分析表 -->
    <excel name="importPurchasePriceCompare" returnClass="java.util.List">
        <![CDATA[
            IMPORT WITH SHEET="采购价格对比分析", HEADER=true,
                MAPPING={"物料名称":"materialName","供应商":"supplier","基准价":"basePrice","报价":"quotedPrice","价差":"priceDiff","价差率":"diffRate","价格评定":"priceRating"}
        ]]>
    </excel>

</excels>
