提交 f766885f authored 作者: liuhaiquan's avatar liuhaiquan

修改问题

上级 fba60c88
......@@ -1162,13 +1162,21 @@ public class OrderChildServiceImpl implements OrderChildService {
//运单完成数量
int complateNum = childList.size();
//历史装车总量
java.util.Optional<BigDecimal> reduce1 = childList.stream().map(OrderChild::getLoadNet).filter(
BigDecimal historyLoadWeight = BigDecimal.ZERO;
java.util.Optional<BigDecimal> reduce = childList.stream().map(OrderChild::getLoadNet).filter(
Objects::nonNull).reduce(BigDecimal::add);
BigDecimal historyLoadWeight = Objects.isNull(reduce1)?BigDecimal.ZERO:reduce1.get();
if (reduce.isPresent()) {
historyLoadWeight = reduce.get();
}
//完成拉运总量
java.util.Optional<BigDecimal> reduce2 = childList.stream().map(OrderChild::getUnloadNet).filter(
BigDecimal complateCarryWeight = BigDecimal.ZERO;
java.util.Optional<BigDecimal> reduce1 = childList.stream().map(OrderChild::getUnloadNet).filter(
Objects::nonNull).reduce(BigDecimal::add);
BigDecimal complateCarryWeight = Objects.isNull(reduce2)?BigDecimal.ZERO:reduce2.get();
if (reduce1.isPresent()) {
complateCarryWeight = reduce1.get();
}
//亏吨数量总计
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论