Commit 2d75e14f authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'master-fix' into release

parents 164fce4e 84dae49f
......@@ -1083,11 +1083,11 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
return paramMap;
}).collect(Collectors.toList());
//订单项合计
int totalNum = orderItemVOList.stream().filter(item -> item.getWarehouseInInfoVO() != null).mapToInt(item -> item.getWarehouseInInfoVO().getCartonsNum()).sum();
int totalNum = orderItemVOList.stream().filter(item -> item.getWarehouseInInfoVO() != null && item.getWarehouseInInfoVO().getCartonsNum() > 0).mapToInt(item -> item.getWarehouseInInfoVO().getCartonsNum()).sum();
BigDecimal totalVolume = BigDecimal.ZERO;
BigDecimal totalWeight = BigDecimal.ZERO;
for (OrderItemDO orderItemDO : orderItemVOList) {
if (orderItemDO.getWarehouseInInfoVO() != null) {
if (orderItemDO.getWarehouseInInfoVO() != null && orderItemDO.getWarehouseInInfoVO().getCartonsNum() > 0) {
totalVolume = totalVolume.add(orderItemDO.getWarehouseInInfoVO().getWeight());
if (Objects.nonNull(orderItemDO.getChargeWeight()) && orderItemDO.getChargeWeight().compareTo(orderItemDO.getMinMeteringWeight()) > 0) {
totalWeight = totalWeight.add(orderItemDO.getChargeWeight());
......
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