mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 14:31:00 +08:00
fix:【数据大屏】数据大屏导出图表数据没有表头
This commit is contained in:
@@ -338,7 +338,7 @@ public class ChartDataServer implements ChartDataApi {
|
||||
|
||||
Map<String, Object> customAttr = viewInfo.getCustomAttr();
|
||||
Map<String, Object> tableHeaderMap = (Map<String, Object>) customAttr.get("tableHeader");
|
||||
if (Boolean.valueOf(tableHeaderMap.get("headerGroup").toString())) {
|
||||
if (tableHeaderMap.get("headerGroup") != null && Boolean.valueOf(tableHeaderMap.get("headerGroup").toString())) {
|
||||
tableHeader = JsonUtil.parseObject((String) JsonUtil.toJSONString(customAttr.get("tableHeader")), TableHeader.class);
|
||||
for (TableHeader.ColumnInfo column : tableHeader.getHeaderGroupConfig().getColumns()) {
|
||||
totalDepth = Math.max(totalDepth, getDepth(column, 1));
|
||||
@@ -450,10 +450,8 @@ public class ChartDataServer implements ChartDataApi {
|
||||
|
||||
Cell cell = row.createCell(j);
|
||||
if (i == 0) {// 头部
|
||||
if (tableHeader != null) {
|
||||
cell.setCellValue(cellValObj.toString());
|
||||
cell.setCellStyle(cellStyle);
|
||||
}
|
||||
cell.setCellValue(cellValObj.toString());
|
||||
cell.setCellStyle(cellStyle);
|
||||
//设置列的宽度
|
||||
detailsSheet.setColumnWidth(j, 255 * 20);
|
||||
} else if (cellValObj != null) {
|
||||
|
||||
@@ -62,6 +62,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -1458,7 +1459,7 @@ public class DatasourceServer implements DatasourceApi {
|
||||
if (exception.getCause() == null) {
|
||||
return exception.getMessage();
|
||||
}
|
||||
if (exception instanceof DEException && !(exception.getCause() instanceof DEException)) {
|
||||
if (exception instanceof DEException && (!(exception.getCause() instanceof DEException) && !(exception.getCause() instanceof InvocationTargetException))) {
|
||||
return exception.getMessage();
|
||||
}
|
||||
exception = exception.getCause();
|
||||
|
||||
Reference in New Issue
Block a user