数据报表销量导出修改
This commit is contained in:
@@ -36,7 +36,6 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
/**
|
||||
* File工具类,扩展 hutool 工具包
|
||||
@@ -233,13 +232,14 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
IoUtil.close(out);
|
||||
}
|
||||
|
||||
public static void downloadExcelAndMerge(ConcurrentLinkedQueue<Map<String, Object>> list, int colSize, HttpServletResponse response, ArrayList<Integer> mergeRowIndex) throws IOException {
|
||||
public static void downloadExcelAndMerge(List<Map<String, Object>> list, int colSize, HttpServletResponse response, ArrayList<Integer> mergeRowIndex) throws IOException {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
File file = new File(tempPath);
|
||||
BigExcelWriter writer = ExcelUtil.getBigWriter(file);
|
||||
|
||||
// 合并单元格后的标题行,使用默认标题样式.
|
||||
for (int i = 0; i < mergeRowIndex.size(); i++) {
|
||||
System.out.println(i);
|
||||
for (int i1 = 0; i1 < colSize; i1++) {
|
||||
writer.merge(i == 0 ? 0 : mergeRowIndex.get(i - 1) + 1, mergeRowIndex.get(i), i1, i1, "", true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user