fix: 过滤器多条件异常问题;编辑数据集切换到添加数据集界面异常问题

This commit is contained in:
junjie 2021-07-28 11:41:06 +08:00
parent 62301c881d
commit 89a7d4b311
2 changed files with 9 additions and 7 deletions

View File

@ -138,14 +138,16 @@ public class ChartViewService {
}.getType());
List<ChartFieldCustomFilterDTO> fieldCustomFilter = new Gson().fromJson(view.getCustomFilter(), new TypeToken<List<ChartFieldCustomFilterDTO>>() {
}.getType());
List<ChartCustomFilterDTO> customFilter = fieldCustomFilter.stream().map(ele -> {
List<ChartCustomFilterDTO> customFilter = new ArrayList<>();
for (ChartFieldCustomFilterDTO ele : fieldCustomFilter) {
List<ChartCustomFilterDTO> collect = ele.getFilter().stream().map(f -> {
ChartCustomFilterDTO dto = new ChartCustomFilterDTO();
ele.getFilter().forEach(f -> {
BeanUtils.copyBean(dto, f);
dto.setField(dataSetTableFieldsService.get(f.getFieldId()));
});
return dto;
}).collect(Collectors.toList());
customFilter.addAll(collect);
}
if (StringUtils.equalsIgnoreCase("text", view.getType()) || StringUtils.equalsIgnoreCase("gauge", view.getType())) {
xAxis = new ArrayList<>();