BigDecimal类型的累加
// lastMonth.add(item.getNowMonthPlanSettle() != null ? item.getNowMonthPlanSettle() : new BigDecimal(0)); 这样累加会都是0
lastMonth = lastMonth.add(item.getNowMonthPlanSettle() != null ? item.getNowMonthPlanSettle() : new BigDecimal(0));
本文来自博客园,作者:爱吃糖的橘猫,转载请注明原文链接:https://www.cnblogs.com/sglblog/p/16308830.html