|
@@ -158,8 +158,12 @@ public class BigScreenDetailServiceImpl implements BigScreenDetailService {
|
|
|
List<Map<String, Object>> items = detailQuery.getData().getItems();
|
|
|
if(!CollectionUtil.isEmpty(items)){
|
|
|
List<String> yearMonthStr = items.stream().map(vo -> vo.get("yearMonthStr").toString()).collect(Collectors.toList());
|
|
|
- List<BigDecimal> avgYearMonth = items.stream().map(vo -> new BigDecimal(vo.get("averageValue").toString())).collect(Collectors.toList());
|
|
|
- jsonObject.put("yearMonthList",yearMonthStr);
|
|
|
+ List<BigDecimal> avgYearMonth = items.stream()
|
|
|
+ .map(vo -> {
|
|
|
+ BigDecimal value = new BigDecimal(vo.get("averageValue").toString());
|
|
|
+ return value.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : value;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList()); jsonObject.put("yearMonthList",yearMonthStr);
|
|
|
jsonObject.put("avgYearMonth",avgYearMonth);
|
|
|
}
|
|
|
}
|