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.
57 lines
1.8 KiB
57 lines
1.8 KiB
2 years ago
|
/**
|
||
|
* Copyright (C), 2015-2020
|
||
|
* FileName: ExcelPlusExporter
|
||
|
* Author: xx
|
||
|
* Date: 2020/3/17 11:50
|
||
|
* Description: ExcelPlusExporter
|
||
|
* History:
|
||
|
* <author> <time> <version> <desc>
|
||
|
*/
|
||
|
package com.fr.plugin.gb.export;
|
||
|
|
||
|
import com.fanruan.api.util.StringKit;
|
||
|
import com.fr.io.exporter.ExcelExporter;
|
||
|
import com.fr.main.workbook.ResultWorkBook;
|
||
|
import com.fr.page.PageSetCreator;
|
||
|
import com.fr.plugin.gb.utils.InteKeyHandler;
|
||
|
import com.fr.web.core.ReportRepositoryDeal;
|
||
|
|
||
|
import java.io.File;
|
||
|
import java.io.FileOutputStream;
|
||
|
import java.io.OutputStream;
|
||
|
import java.util.List;
|
||
|
|
||
|
/**
|
||
|
* 〈Function Description〉<br>
|
||
|
* 〈ExcelPlusExporter〉
|
||
|
*
|
||
|
* @author xx
|
||
|
* @since 1.0.0
|
||
|
*/
|
||
|
public class ExcelPlusExporter extends ExcelExporter {
|
||
|
|
||
|
public ExcelPlusExporter() {
|
||
|
}
|
||
|
|
||
|
public ExcelPlusExporter(List list) {
|
||
|
super(list);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void export(OutputStream outputStream, ResultWorkBook resultWorkBook, PageSetCreator pageSetCreator, ReportRepositoryDeal reportRepositoryDeal, int[] ints) throws Exception {
|
||
|
File file = File.createTempFile("InteKey", StringKit.EMPTY);
|
||
|
FileOutputStream fileOutputStream = new FileOutputStream(file);
|
||
|
super.export(fileOutputStream, resultWorkBook, pageSetCreator, reportRepositoryDeal, ints);
|
||
|
fileOutputStream.close();
|
||
|
InteKeyHandler.getInstance().encryptFile(outputStream, file);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void export(OutputStream outputStream, ResultWorkBook resultWorkBook) throws Exception {
|
||
|
File file = File.createTempFile("InteKey", StringKit.EMPTY);
|
||
|
FileOutputStream fileOutputStream = new FileOutputStream(file);
|
||
|
super.export(fileOutputStream, resultWorkBook);
|
||
|
fileOutputStream.close();
|
||
|
InteKeyHandler.getInstance().encryptFile(outputStream, file);
|
||
|
}
|
||
|
}
|