Commit 76d14f55 authored by jiaorz's avatar jiaorz

发票

parent 236d2c92
......@@ -800,16 +800,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
public BigDecimal getAllOrderCost(Integer orderId) {
List<OrderAccount> list = getByOrderId(orderId);
BigDecimal bigDecimal = new BigDecimal("0");
if (list != null && list.size() > 0) {
list.parallelStream().forEach(result -> {
double amount = 0;
if(result.getAccountAmount() != null && result.getAccountStatus() == 1) {
amount = amount + result.getAccountAmount().doubleValue();
for (OrderAccount orderAccount : list) {
if(orderAccount.getAccountAmount() != null && orderAccount.getAccountStatus() == 1) {
bigDecimal.add(orderAccount.getAccountAmount());
}
log.info("amount: {}", amount);
bigDecimal.add(new BigDecimal(amount+""));
});
}
log.info("bigDecimal: {}", 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