forked from github/dataease
perf(系统管理-定时报告): 定时报告带模版视图数据报错
This commit is contained in:
parent
decc462dc8
commit
f9eca82ed7
@ -38,6 +38,9 @@ public class ViewExportExcel {
|
|||||||
private Type tokenType = new TypeToken<List<Map<String, Object>>>() {
|
private Type tokenType = new TypeToken<List<Map<String, Object>>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
|
|
||||||
|
private Type fieldTokenType = new TypeToken<List<ChartViewFieldDTO>>() {
|
||||||
|
}.getType();
|
||||||
|
|
||||||
@DePermissionProxy(paramIndex = 2)
|
@DePermissionProxy(paramIndex = 2)
|
||||||
public List<File> export(String panelId, List<String> viewIds, PermissionProxy proxy) throws Exception {
|
public List<File> export(String panelId, List<String> viewIds, PermissionProxy proxy) throws Exception {
|
||||||
if (CollectionUtils.isEmpty(viewIds)) {
|
if (CollectionUtils.isEmpty(viewIds)) {
|
||||||
@ -91,7 +94,7 @@ public class ViewExportExcel {
|
|||||||
Map<String, Object> chart = chartViewDTO.getData();
|
Map<String, Object> chart = chartViewDTO.getData();
|
||||||
|
|
||||||
Object objectFields = chart.get("fields");
|
Object objectFields = chart.get("fields");
|
||||||
List<ChartViewFieldDTO> fields = (List<ChartViewFieldDTO>) objectFields;
|
List<ChartViewFieldDTO> fields = gson.fromJson(gson.toJson(objectFields), fieldTokenType);
|
||||||
List<String> heads = new ArrayList<>();
|
List<String> heads = new ArrayList<>();
|
||||||
List<String> headKeys = new ArrayList<>();
|
List<String> headKeys = new ArrayList<>();
|
||||||
fields.forEach(field -> {
|
fields.forEach(field -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user