Kaynağa Gözat

fix(apCheck): 统计付款记录增加为空判断

hejq 7 yıl önce
ebeveyn
işleme
a8ee1cfa9c

+ 1 - 1
src/main/java/com/uas/platform/b2b/service/impl/PurchaseApCheckServiceImpl.java

@@ -896,7 +896,7 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
         if (null != totalTrades && !CollectionUtils.isEmpty(totalTrades)) {
             Set<String> currencySet = totalTrades.parallelStream().map(ApCheckAmount::getCurrency).collect(Collectors.toSet());
             currencySet.forEach(currency -> {
-                Double amount = totalTrades.stream().filter(tradeCount -> null != tradeCount && currency.equals(tradeCount.getCurrency()))
+                Double amount = totalTrades.stream().filter(tradeCount -> null != tradeCount && currency.equals(tradeCount.getCurrency()) && null != tradeCount.getCount())
                     .mapToDouble(ApCheckAmount::getCount).sum();
                 resultCounts.add(new ApCheckAmount(currency, DecimalUtils.decimalPoint(amount, 2)));
             });