Browse Source

2025-1-10

master
qiezi 1 year ago
parent
commit
053d3686d9
  1. 4
      src/main/java/com/spring/modules/quote/service/impl/QuoteDetailServiceImpl.java

4
src/main/java/com/spring/modules/quote/service/impl/QuoteDetailServiceImpl.java

@ -310,7 +310,7 @@ public class QuoteDetailServiceImpl extends ServiceImpl<QuoteDetailMapper, Quote
packCost = num1.add(num2); packCost = num1.add(num2);
} }
} }
if (otherPackCost.isPresent()){
if (otherPackCost.isPresent() && Objects.nonNull(otherPackCost.get().getNumValue())){
packCost = packCost.add(otherPackCost.get().getNumValue()); packCost = packCost.add(otherPackCost.get().getNumValue());
} }
return packCost; return packCost;
@ -355,7 +355,7 @@ public class QuoteDetailServiceImpl extends ServiceImpl<QuoteDetailMapper, Quote
shippingCost = shipCost.get().getNumValue().divide(deliverQuantity.get().getNumValue()); shippingCost = shipCost.get().getNumValue().divide(deliverQuantity.get().getNumValue());
} }
} }
if (otherShipCost.isPresent()){
if (otherShipCost.isPresent() && Objects.nonNull(otherShipCost.get().getNumValue())){
shippingCost = shippingCost.add(otherShipCost.get().getNumValue()); shippingCost = shippingCost.add(otherShipCost.get().getNumValue());
} }
return shippingCost; return shippingCost;

Loading…
Cancel
Save