提交 0fe02ef7 authored 作者: huyufan's avatar huyufan

开发:35吨展示优化

上级 8f0c7f34
......@@ -285,7 +285,11 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
orderGoodsResidueWeight = orderGoodsList.stream().map(OrderGoods::getResidueTransportWeight).reduce(BigDecimal.ZERO, BigDecimal::add);
}
ans = orderGoodsResidueWeight.add(new BigDecimal(residueWeight));
if (ans.compareTo(new BigDecimal("35")) <= 0) {
return BigDecimal.ZERO;
} else {
return ans.subtract(new BigDecimal("35"));
}
case "3":
List<OrderChild> orderChildList = orderChildDao.selectResidueWeight(orderNo, OrderChildEnum.Status.ARRIVE_SEND.getCode());
BigDecimal childResidueWeight = BigDecimal.ZERO;
......@@ -298,16 +302,13 @@ public class OrderGoodsServiceImpl implements OrderGoodsService, InitializingBea
orderGoodsResidueWeight = orderGoodsList.stream().map(OrderGoods::getResidueTransportWeight).reduce(BigDecimal.ZERO, BigDecimal::add);
}
ans = ans.add(orderGoodsResidueWeight).add(childResidueWeight);
default:throw new RuntimeException("参数错误");
}
if (ans.compareTo(new BigDecimal("35")) <= 0) {
return BigDecimal.ZERO;
} else {
return ans.subtract(new BigDecimal("35"));
}
default:throw new RuntimeException("参数错误");
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论