Commit 76d14f55 authored by jiaorz's avatar jiaorz

发票

parent 236d2c92
...@@ -800,16 +800,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> { ...@@ -800,16 +800,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
public BigDecimal getAllOrderCost(Integer orderId) { public BigDecimal getAllOrderCost(Integer orderId) {
List<OrderAccount> list = getByOrderId(orderId); List<OrderAccount> list = getByOrderId(orderId);
BigDecimal bigDecimal = new BigDecimal("0"); BigDecimal bigDecimal = new BigDecimal("0");
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
list.parallelStream().forEach(result -> { for (OrderAccount orderAccount : list) {
double amount = 0; if(orderAccount.getAccountAmount() != null && orderAccount.getAccountStatus() == 1) {
if(result.getAccountAmount() != null && result.getAccountStatus() == 1) { bigDecimal.add(orderAccount.getAccountAmount());
amount = amount + result.getAccountAmount().doubleValue();
} }
log.info("amount: {}", amount); }
bigDecimal.add(new BigDecimal(amount+"")); log.info("bigDecimal: {}", bigDecimal);
});
} }
return bigDecimal; return bigDecimal;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment