Commit b6641bae by fudahua

feat: 取数平台过滤项

parent e7679764
......@@ -934,6 +934,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
logger.info("下载耗时:{}",stopWatch.getLastTaskTimeMillis());
stopWatch.start();
List<String> xlsxFiles=new ArrayList<>();
AtomicInteger totalCount=new AtomicInteger(0);
AtomicInteger count=new AtomicInteger(0);
AtomicReference<XlsxFileInfo> currentFile=new AtomicReference<>();
readCsvFile(condition,dirName,(cells,titles,firstFlag)->{
......@@ -946,9 +947,12 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
saveXlsSplitNew(currentFile.get().filepath,cells,titles,currentFile.get(),count,false,queryDataType);
});
//结束
Integer limitSize = FileUtil.getLimitSize();
Integer total= (xlsxFiles.size()-1)*limitSize+count.get();
saveXlsSplitNew(currentFile.get().filepath,null,null,currentFile.get(),count,true,queryDataType);
stopWatch.stop();
logger.info("写入本地excel耗时:{}",stopWatch.getLastTaskTimeMillis());
logger.info("写入本地excel耗时:{}, 数量: {}-》{}",stopWatch.getLastTaskTimeMillis(),task.getAmount(),total);
stopWatch.start();
//是否压缩
boolean zipFlag = (xlsxFiles.size() > 1) ? true : false;
......@@ -974,14 +978,15 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
task.setOverTime(new Date());
task.setFilePath(cloudFileUrl);
//删除文件
delFileOrDirByTaskId(task.getId());
}catch (Exception e) {
logger.info("异常:{}",e);
task.setStatus(DownloadTaskStatus.ERROR);
}finally {
DownloadTaskServiceImpl.getInstance().updateDownloadTask(task);
//删除文件
delFileOrDirByTaskId(task.getId());
}
}
......@@ -1060,6 +1065,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
csvReader.close();
} catch (Exception e) {
logger.info("读取异常:{}",e);
throw new RuntimeException(e);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment