fix(视图-下钻): 修复部分视图下钻异常

This commit is contained in:
wisonic-s 2023-03-21 15:11:56 +08:00
parent 59b116217d
commit a17d4eb03e

View File

@ -882,7 +882,7 @@ public class ChartViewService {
Map<String, String> dimValMap = head.getDimensionList().stream().collect(Collectors.toMap(ChartDimensionDTO::getId, ChartDimensionDTO::getValue));
Map<String, ChartViewFieldDTO> fieldMap = Stream.of(xAxisBase, xAxisExt, extStack).
flatMap(Collection::stream).
collect(Collectors.toMap(ChartViewFieldDTO::getId, o -> o));
collect(Collectors.toMap(ChartViewFieldDTO::getId, o -> o, ((p, n) -> p)));
for (int i = 0; i < drillRequestList.size(); i++) {
ChartDrillRequest request = drillRequestList.get(i);
ChartViewFieldDTO chartViewFieldDTO = drill.get(i);
@ -893,6 +893,7 @@ public class ChartViewService {
fieldsToFilter.add(chartViewFieldDTO);
dimValMap.put(requestDimension.getId(), requestDimension.getValue());
if (!checkDrillExist(xAxis, extStack, requestDimension.getId(), view)) {
fieldMap.put(chartViewFieldDTO.getId(), chartViewFieldDTO);
xAxis.add(chartViewFieldDTO);
}
if (i == drillRequestList.size() - 1) {