fix total_surcharge add tax_amount

master
eason.qian 7 years ago
parent f4ff5aa2b2
commit 24fab32043

@ -515,7 +515,7 @@ public class TradeLogServiceImpl implements TradeLogService {
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_surcharge", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("total_surcharge")))
.map(log -> getSymbol(log).multiply(log.getBigDecimal("total_surcharge").add(log.getBigDecimal("tax_amount"))))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("wechat_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)

Loading…
Cancel
Save