|
|
|
@ -1609,11 +1609,9 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
if (Func.isNotEmpty(parcelNumberEntities)) { |
|
|
|
|
//在库数量
|
|
|
|
|
inWarehouseQuantity = parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getHandQuantity).sum(); |
|
|
|
|
deliveryQuantity = parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getDeliveryQuantity).sum(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((loadingQuantity + deliveryQuantity) == stockArticleEntity.getTotalNumber()) { |
|
|
|
|
//无在库数量则无法进行预约
|
|
|
|
|
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
} |
|
|
|
|
loadingQuantity = parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getOutboundQuantity).sum(); |
|
|
|
|
if (stockArticleEntity.getTotalNumber() == loadingQuantity) { |
|
|
|
|
//此时的出库和总数一致,该零担此时全部进行出库
|
|
|
|
@ -1623,6 +1621,10 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} else { |
|
|
|
|
stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue()); |
|
|
|
|
} |
|
|
|
|
if ((loadingQuantity + deliveryQuantity) == stockArticleEntity.getTotalNumber()) { |
|
|
|
|
//无在库数量则无法进行预约
|
|
|
|
|
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue()); |
|
|
|
|
} |
|
|
|
|
signingQuantity = parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getSigninQuantity).sum(); |
|
|
|
|
if (stockArticleEntity.getTotalNumber() == signingQuantity) { |
|
|
|
|
stockArticleEntity.setOrderStatus(OrderStatusConstant.qianshou.getValue()); |
|
|
|
@ -1632,7 +1634,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
//维护订单的在库件数
|
|
|
|
|
stockArticleEntity.setHandQuantity(inWarehouseQuantity); |
|
|
|
|
//维护订单的配送件数
|
|
|
|
|
deliveryQuantity = parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getDeliveryQuantity).sum() + parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getSigninQuantity).sum() + parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getOutboundQuantity).sum(); |
|
|
|
|
// deliveryQuantity = parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getDeliveryQuantity).sum() + parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getSigninQuantity).sum() + parcelNumberEntities.stream().mapToInt(DistributionParcelNumberEntity::getOutboundQuantity).sum();
|
|
|
|
|
stockArticleEntity.setDeliveryQuantity(deliveryQuantity); |
|
|
|
|
stockArticleEntity.setSigninQuantity(signingQuantity); |
|
|
|
|
stockArticleEntity.setDeliveryQuantity(deliveryQuantity); |
|
|
|
|