forked from github/dataease
fix: 数据集导出分页错误
This commit is contained in:
parent
a136a0db7a
commit
dc116ee00c
@ -94,7 +94,7 @@ public class ExportCenterManage {
|
||||
@Value("${dataease.export.max.size:10}")
|
||||
private int max;
|
||||
|
||||
@Value("${dataease.export.dataset.limit:20}")
|
||||
@Value("${dataease.export.dataset.limit:100000}")
|
||||
private int limit;
|
||||
private final static String DATA_URL_TITLE = "data:image/jpeg;base64,";
|
||||
private static final String exportData_path = "/opt/dataease2.0/data/exportData/";
|
||||
@ -424,9 +424,10 @@ public class ExportCenterManage {
|
||||
Workbook wb = new SXSSFWorkbook();
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(dataPath + "/" + request.getFilename() + ".xlsx");
|
||||
Sheet detailsSheet = wb.createSheet("数据");
|
||||
List<List<String>> details = new ArrayList<>();
|
||||
|
||||
for (Integer p = 0; p < totalPage; p++) {
|
||||
String querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, false, p * extractPageSize, p * extractPageSize + extractPageSize);
|
||||
String querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, false, p * extractPageSize + extractPageSize, extractPageSize);
|
||||
if (totalPage == 1) {
|
||||
querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, false, 0, totalCount.intValue());
|
||||
}
|
||||
@ -448,7 +449,7 @@ public class ExportCenterManage {
|
||||
for (DatasetTableFieldDTO field : allFields) {
|
||||
header.add(field.getName());
|
||||
}
|
||||
List<List<String>> details = new ArrayList<>();
|
||||
|
||||
details.add(header);
|
||||
for (Map<String, Object> obj : data) {
|
||||
List<String> row = new ArrayList<>();
|
||||
@ -477,7 +478,7 @@ public class ExportCenterManage {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<List<String>> details = new ArrayList<>();
|
||||
details.clear();
|
||||
for (Map<String, Object> obj : data) {
|
||||
List<String> row = new ArrayList<>();
|
||||
for (DatasetTableFieldDTO field : allFields) {
|
||||
|
Loading…
Reference in New Issue
Block a user