BigDecimal bigs=BigDecimal.ZERO;
List<BigDecimal> list=new ArrayList<>();
List<ProjectApplyBook> totalProjectList = ......;
if(!CollectionUtils.isEmpty(totalProjectList)){
for(ProjectApplyBook book:totalProjectList){
if(StringUtils.isNotBlank(book.getApplyFee())){
list.add(new BigDecimal(book.getApplyFee()));
}
}
}
for(BigDecimal big:list){
bigs=bigs.add(big);
}
return String.valueOf(bigs);
BigDecimal 加法运算
最新推荐文章于 2024-07-22 03:51:08 发布