Explorar el Código

轮胎商城:出库完成融资非融资判断未区分

纪新园 hace 10 meses
padre
commit
a435cdb317

+ 4 - 3
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/ship/service/impl/ShipServiceImpl.java

@@ -965,7 +965,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 					String secondProportion = sysClient.getParamService("second.month.proportion");
 					String financingDays = sysClient.getParamService("financing.days");
 					int days = -90;
-					if(ObjectUtils.isNotNull(financingDays) && !"获取数据失败".equals(financingDays)){
+					if (ObjectUtils.isNotNull(financingDays) && !"获取数据失败".equals(financingDays)) {
 						days = -Integer.parseInt(financingDays);
 					}
 					PjpfFunding pjpfFunding = pjpfFundingService.getOne(new LambdaQueryWrapper<PjpfFunding>()
@@ -1029,7 +1029,8 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 							}
 							BigDecimal number = shipItems.getSendNumFinancing();
 							//获取出库明细商品对应融资采购商品明细
-							List<PjOrderItems> orderItemList = orderItemsList.stream().filter(e -> e.getGoodsId().equals(shipItems.getGoodsId())).collect(Collectors.toList());
+							List<PjOrderItems> orderItemList = orderItemsList.stream().filter(e -> e.getGoodsId().equals(shipItems.getGoodsId())
+								&& new BigDecimal("0").compareTo(shipItems.getSendNumFinancing()) != 0).collect(Collectors.toList());
 							if (orderItemList.isEmpty()) {
 								throw new RuntimeException("商品:" + shipItems.getGoodsName() + "超过90天未赎回,请确认在出库");
 							}
@@ -3899,7 +3900,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			String secondProportion = sysClient.getParamService("second.month.proportion");
 			String financingDays = sysClient.getParamService("financing.days");
 			int days = -90;
-			if(ObjectUtils.isNotNull(financingDays) && !"获取数据失败".equals(financingDays)){
+			if (ObjectUtils.isNotNull(financingDays) && !"获取数据失败".equals(financingDays)) {
 				days = -Integer.parseInt(financingDays);
 			}
 			PjpfFunding pjpfFunding = pjpfFundingService.getOne(new LambdaQueryWrapper<PjpfFunding>()