|
|
|
@ -116,8 +116,6 @@ public class ReportExcelUtil {
|
|
|
|
|
int findNum = (int) Math.ceil((count / pageSize.doubleValue())); |
|
|
|
|
// 封装查询后需要导出的数据
|
|
|
|
|
Map<Integer, List<Object>> pageMap = new ConcurrentHashMap<>(ReportConstants.HASHMAP_DEFAULT_SIZE); |
|
|
|
|
// 定义线程池,大表导出使用一个线程池
|
|
|
|
|
ExecutorService executorService = ThreadPoolUtil.getThreadPool(); |
|
|
|
|
// 控制线程全部查询完后执行导出操作
|
|
|
|
|
CountDownLatch countDownLatch = new CountDownLatch(findNum); |
|
|
|
|
ExcelWriter excelWriter = null; |
|
|
|
@ -128,7 +126,6 @@ public class ReportExcelUtil {
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
int num = 0; |
|
|
|
|
List<CompletableFuture<List>> futures = new ArrayList<>(); |
|
|
|
|
for (int i = 0; i < sheetNum; i++) { |
|
|
|
|
// sheet编号
|
|
|
|
|
int finalI = i + 1; |
|
|
|
|