Merge pull request #2784 from dataease/pr@dev@fix_symbol_map

fix(视图-符号地图): 同时添加标签字段和提示字段报错
This commit is contained in:
fit2cloud-chenyw 2022-08-03 21:38:43 +08:00 committed by GitHub
commit 9104a89a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -877,12 +877,11 @@ public class ChartDataBuild {
// 表格
public static Map<String, Object> transTableNormal(Map<String, List<ChartViewFieldDTO>> fieldMap, ChartViewWithBLOBs view, List<String[]> data, List<String> desensitizationList) {
// List<ChartViewFieldDTO> fields = fieldMap.entrySet().stream().map(Map.Entry::getValue).flatMap(List::stream).collect(Collectors.toList());
// 上面乱序了
List<ChartViewFieldDTO> fields = new ArrayList<>();
if (CollectionUtils.isNotEmpty(fieldMap.get("xAxis")))fields.addAll(fieldMap.get("xAxis"));
if (CollectionUtils.isNotEmpty(fieldMap.get("labelAxis")))fields.addAll(fieldMap.get("labelAxis"));
if (CollectionUtils.isNotEmpty(fieldMap.get("tooltipAxis")))fields.addAll(fieldMap.get("tooltipAxis"));
if (CollectionUtils.isNotEmpty(fieldMap.get("labelAxis")))fields.addAll(fieldMap.get("labelAxis"));
if (CollectionUtils.isNotEmpty(fieldMap.get("yAxis")))fields.addAll(fieldMap.get("yAxis"));
return transTableNormal(fields, view, data, desensitizationList);
}