Parcourir la source

fix:结算验收货物,参考价格浮动价格非空判断

CAYK\miaosen.zhao il y a 6 mois
Parent
commit
2cfb3b597d

+ 1 - 1
src/main/java/com/inkasso/factoring/settlement/service/Impl/GoodsCalculateServiceImpl.java

@@ -71,7 +71,7 @@ public class GoodsCalculateServiceImpl implements GoodsCalculateService {
         if (goodsInfoList != null && goodsInfoList.size() > 0) {
             List<SettlementGoodsInfo> goodsList = goodsInfoList.stream().map(goodsInfo -> {
                 // 计算货物销售总价、销售质保金、采购总价、采购质保金信息
-                goodsInfo.setSalesPrice(goodsInfo.getReferencePrice().add(goodsInfo.getFloatingPrice()));
+                goodsInfo.setSalesPrice(goodsInfo.getReferencePrice() == null?BigDecimal.ZERO:goodsInfo.getReferencePrice().add(goodsInfo.getFloatingPrice() == null?BigDecimal.ZERO:goodsInfo.getFloatingPrice()));
                 SettlementGoodsInfo baseGoods = calculate(businessNumber, supplierId,
                         goodsInfo.getSalesPrice(), goodsInfo.getGoodsQuantity());
                 baseGoods.setAcceptanceGoodsInfoId(goodsInfo.getId());