forked from github/dataease
Merge pull request #12711 from dataease/dev-v2@fixexportdata
fix: 数据导出超过100w时,分多个sheet
This commit is contained in:
commit
4ba403795f
@ -509,7 +509,7 @@ public class ExportCenterManage implements BaseExportApi {
|
|||||||
for (Long s = 1L; s < sheetCount + 1; s++) {
|
for (Long s = 1L; s < sheetCount + 1; s++) {
|
||||||
Long sheetSize;
|
Long sheetSize;
|
||||||
if (s.equals(sheetCount)) {
|
if (s.equals(sheetCount)) {
|
||||||
sheetSize = totalCount - sheetCount * (s - 1) * sheetLimit;
|
sheetSize = totalCount - (s - 1) * sheetLimit;
|
||||||
} else {
|
} else {
|
||||||
sheetSize = sheetLimit;
|
sheetSize = sheetLimit;
|
||||||
}
|
}
|
||||||
@ -590,8 +590,8 @@ public class ExportCenterManage implements BaseExportApi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exportTask.setExportStatus("IN_PROGRESS");
|
exportTask.setExportStatus("IN_PROGRESS");
|
||||||
double exportRogress2 = (double) ((double) s - 1 / (double) sheetCount);
|
double exportRogress2 = (double) ((double) s - 1) / ((double) sheetCount);
|
||||||
double exportRogress = (double) ((double) p / (double) pageSize) * ((double) 1 / sheetCount);
|
double exportRogress = (double) ((double) (p + 1) / (double) pageSize) * ((double) 1 / sheetCount);
|
||||||
DecimalFormat df = new DecimalFormat("#.##");
|
DecimalFormat df = new DecimalFormat("#.##");
|
||||||
String formattedResult = df.format((exportRogress + exportRogress2) * 100);
|
String formattedResult = df.format((exportRogress + exportRogress2) * 100);
|
||||||
exportTask.setExportProgress(formattedResult);
|
exportTask.setExportProgress(formattedResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user