fix(图表): 修复堆叠条形图,当堆叠项/维度是数值时,下钻异常的问题

This commit is contained in:
jianneng-fit2cloud
2025-12-16 14:44:15 +08:00
committed by jianneng-fit2cloud
parent eacc55d645
commit 5054d5cfcf

View File

@@ -1311,7 +1311,8 @@ public class ChartDataBuild {
if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5 || chartViewFieldDTO.getDeType() == 7) {
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
} else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3 || chartViewFieldDTO.getDeType() == 4) {
if (view.getIsExcelExport()) {
// 如果是在维度中展示导出excel时展示为字符串其它情况展示为数值类型
if (view.getIsExcelExport() || StringUtils.equalsIgnoreCase(chartViewFieldDTO.getGroupType(), "d")) {
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]);
} else {
d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP));