Sfoglia il codice sorgente

1.海运保存报错问题修改

纪新园 2 mesi fa
parent
commit
a0c2e498ed

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -535,7 +535,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				feeCenterListAll.add(item);
 			}
 			oceanFreightCr = bills.getFeeCenterListC().stream().filter(e -> "C".equals(e.getDc()) &&
-				"HYF".equals(e.getFeeCode())).map(FeeCenter::getAmountLoc).reduce(BigDecimal.ZERO, BigDecimal::add);
+				"HYF".equals(e.getFeeCode())).map(FeeCenter::getAmountLoc).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 		}
 		//应收
 		int statusD = 0;
@@ -607,7 +607,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				feeCenterListAll.add(item);
 			}
 			oceanFreightDr = bills.getFeeCenterListD().stream().filter(e -> "D".equals(e.getDc()) &&
-				"HYF".equals(e.getFeeCode())).map(FeeCenter::getAmountLoc).reduce(BigDecimal.ZERO, BigDecimal::add);
+				"HYF".equals(e.getFeeCode())).map(FeeCenter::getAmountLoc).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 		}
 		if (!feeCenterListAll.isEmpty()) {
 			feeCenterService.submitListOptimization(feeCenterListAll);