diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index d96de1ad7..dd2c7b160 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -6334,7 +6334,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl !Objects.equals(f.getQuantity(), f.getRealityQuantity())).collect(Collectors.toList()).get(0); - deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); + int updateNum = deliveryDetails.getQuantity() - 1; + if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) { + deliveryDetails.setStockStatus("3"); + } + deliveryDetails.setQuantity(updateNum); distributionDeliveryDetailsService.updateById(deliveryDetails); distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1); distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1); @@ -6353,6 +6357,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl !Objects.equals(r.getQuantity(), r.getRealityQuantity())).collect(Collectors.toList()).get(0); - deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); + int updateNum = deliveryDetails.getQuantity() - 1; + if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) { + deliveryDetails.setStockStatus("3"); + } + deliveryDetails.setQuantity(updateNum); distributionDeliveryDetailsService.updateById(deliveryDetails); } }