mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
perf(X-Pack): 阈值告警数字格式错误
This commit is contained in:
committed by
fit2cloud-chenyw
parent
36bcc92508
commit
fd83d0d07e
@@ -283,7 +283,7 @@ public class ChartViewThresholdManage {
|
||||
String fieldDTOName = fieldDTO.getName();
|
||||
String dataeaseName = fieldDTO.getDataeaseName();
|
||||
String replacement = null;
|
||||
if (fieldDTO.getDeType().equals(DeTypeConstants.DE_FLOAT)) {
|
||||
if (fieldDTO.getDeType().equals(DeTypeConstants.DE_FLOAT) || fieldDTO.getDeType().equals(DeTypeConstants.DE_INT)) {
|
||||
List<String> valueList = rows.stream().map(row -> ObjectUtils.isEmpty(row.get(dataeaseName)) ? null : stripTrailingZeros2String(row.get(dataeaseName))).collect(Collectors.toList());
|
||||
replacement = fieldDTOName + ": " + JsonUtil.toJSONString(valueList);
|
||||
} else {
|
||||
@@ -310,7 +310,7 @@ public class ChartViewThresholdManage {
|
||||
return null;
|
||||
}
|
||||
if (!(value instanceof BigDecimal)) return value.toString();
|
||||
return ((BigDecimal) value).stripTrailingZeros().toString();
|
||||
return ((BigDecimal) value).stripTrailingZeros().toPlainString();
|
||||
}
|
||||
|
||||
private void chartDynamicMap(List<Map<String, Object>> rows, FilterTreeObj conditionTree, Map<Long, DatasetTableFieldDTO> fieldMap) {
|
||||
|
||||
Reference in New Issue
Block a user