You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.8 KiB
52 lines
1.8 KiB
package com.fr.plugin.xxxx.yyjm.fold; |
|
|
|
import com.fr.general.DeclareRecordType; |
|
import com.fr.intelli.record.Focus; |
|
import com.fr.intelli.record.Original; |
|
import com.fr.io.collection.ExportCollection; |
|
import com.fr.io.exporter.AppExporter; |
|
import com.fr.io.exporter.ExcelExportType; |
|
import com.fr.io.exporter.PageToSheetExcelExporter; |
|
import com.fr.plugin.context.PluginContexts; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
import com.fr.record.analyzer.EnableMetrics; |
|
import com.fr.report.core.ReportUtils; |
|
import com.fr.report.fun.impl.AbstractExcelExportAppProvider; |
|
import com.fr.stable.fun.Authorize; |
|
import com.fr.web.core.ReportSessionIDInfor; |
|
|
|
import java.util.Map; |
|
|
|
/** |
|
* @Author fr.open |
|
* @Date 2021/11/16 |
|
* @Description |
|
**/ |
|
@FunctionRecorder |
|
@Authorize(callSignKey = Constants.PLUGIN_ID) |
|
@EnableMetrics |
|
public class RenameSheetExcelExportProvider extends AbstractExcelExportAppProvider { |
|
|
|
@Override |
|
public String exportType() { |
|
return "sheet"; |
|
} |
|
|
|
@Override |
|
@Focus(id = Constants.PLUGIN_ID, text = "sheet重命名", source = Original.PLUGIN) |
|
public AppExporter<Boolean> createAppExporter(ExportCollection exportCollection, ExcelExportType excelExportType, ReportSessionIDInfor reportSessionIDInfor) { |
|
Map param = reportSessionIDInfor.getParameterMap(); |
|
AppExporter exporter; |
|
if (PluginContexts.currentContext().isAvailable()) { |
|
exporter = new MyPageToSheetExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(reportSessionIDInfor.getContextBook()), param); |
|
} else { |
|
exporter = new PageToSheetExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(reportSessionIDInfor.getContextBook())); |
|
} |
|
exportCollection.setExporter(exporter); |
|
exportCollection.setRecordType(DeclareRecordType.EXPORT_TYPE_EXCEL_PAGESHEET); |
|
return exporter; |
|
} |
|
|
|
|
|
|
|
}
|
|
|