修复合计列

This commit is contained in:
Harryxzy 2023-03-28 11:00:18 +08:00
parent e1b4927eaa
commit 952a8e845c
1 changed files with 7 additions and 1 deletions

View File

@ -2859,7 +2859,13 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
for(String numKey : numKeys){
BigDecimal value = new BigDecimal(0);
for(Map<String, Object> record : records){
value = value.add( new BigDecimal(record.get(numKey) == null ? "0" : record.get(numKey).toString()) );
BigDecimal addValue = null;
if(record.get(numKey) == null || !StringUtils.isNumeric(record.get(numKey).toString())){
addValue = new BigDecimal(0);
}else{
addValue = new BigDecimal(record.get(numKey).toString());
}
value = value.add(addValue);
}
sumRow.put(numKey,value);
}