forked from github/dataease
fix(X-Pack): 定时报告导出excel包含ip地址最后的0字符串被忽略
This commit is contained in:
parent
62c2b8f0a6
commit
b258361a42
@ -104,12 +104,21 @@ public class CoreVisualizationExportManage {
|
||||
Object objectTableRow = chart.get("tableRow");
|
||||
List<Map<String, Object>> tableRow = (List<Map<String, Object>>) objectTableRow;
|
||||
|
||||
List<List<String>> details = tableRow.stream().map(row -> headKeys.stream().map(key -> {
|
||||
Object val = row.get(key);
|
||||
if (ObjectUtils.isEmpty(val))
|
||||
return StringUtils.EMPTY;
|
||||
return filterInvalidDecimal(val.toString());
|
||||
}).collect(Collectors.toList())).collect(Collectors.toList());
|
||||
List<List<String>> details = tableRow.stream().map(row -> {
|
||||
List<String> tempList = new ArrayList<>();
|
||||
for (int i = 0; i < headKeys.size(); i++) {
|
||||
String key = headKeys.get(i);
|
||||
Object val = row.get(key);
|
||||
if (ObjectUtils.isEmpty(val))
|
||||
tempList.add(StringUtils.EMPTY);
|
||||
if (fieldTypes.get(i) == 3) {
|
||||
tempList.add(filterInvalidDecimal(val.toString()));
|
||||
} else {
|
||||
tempList.add(val.toString());
|
||||
}
|
||||
}
|
||||
return tempList;
|
||||
}).collect(Collectors.toList());
|
||||
result.setHeads(heads);
|
||||
result.setData(details);
|
||||
result.setFiledTypes(fieldTypes);
|
||||
|
Loading…
Reference in New Issue
Block a user