forked from github/dataease
fix(X-Pack): 定时报告导出视图名称相同失败
This commit is contained in:
parent
6598ad5986
commit
8ef998b03b
@ -54,14 +54,18 @@ public class CoreVisualizationExportManage {
|
|||||||
}
|
}
|
||||||
if (CollectionUtils.isEmpty(chartViewDTOS)) return null;
|
if (CollectionUtils.isEmpty(chartViewDTOS)) return null;
|
||||||
Map<String, ChartExtRequest> chartExtRequestMap = buildViewRequest(visualization, onlyDisplay);
|
Map<String, ChartExtRequest> chartExtRequestMap = buildViewRequest(visualization, onlyDisplay);
|
||||||
List<ExcelSheetModel> sheets = chartViewDTOS.stream().map(view -> {
|
List<ExcelSheetModel> sheets = new ArrayList<>();
|
||||||
|
for (int i = 0; i < chartViewDTOS.size(); i++) {
|
||||||
|
ChartViewDTO view = chartViewDTOS.get(i);
|
||||||
ChartExtRequest extRequest = chartExtRequestMap.get(view.getId().toString());
|
ChartExtRequest extRequest = chartExtRequestMap.get(view.getId().toString());
|
||||||
if (ObjectUtils.isNotEmpty(extRequest)) {
|
if (ObjectUtils.isNotEmpty(extRequest)) {
|
||||||
view.setChartExtRequest(extRequest);
|
view.setChartExtRequest(extRequest);
|
||||||
}
|
}
|
||||||
view.getChartExtRequest().setUser(AuthUtils.getUser().getUserId());
|
view.getChartExtRequest().setUser(AuthUtils.getUser().getUserId());
|
||||||
return exportViewData(view);
|
view.setTitle((i + 1) + "-" + view.getTitle());
|
||||||
}).toList();
|
sheets.add(exportViewData(view));
|
||||||
|
}
|
||||||
|
|
||||||
return VisualizationExcelUtils.exportExcel(sheets, visualization.getName(), visualization.getId().toString());
|
return VisualizationExcelUtils.exportExcel(sheets, visualization.getName(), visualization.getId().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit e22c8ef0d999bdf902fd8b5f537c0830d5261b7a
|
Subproject commit 0cf469c20f184e57c2e7e88e99896b2f6baed265
|
Loading…
Reference in New Issue
Block a user