@ -2666,21 +2666,24 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
. ne ( DistributionParcelListEntity : : getOrderPackageReservationStatus , OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) )
. notIn ( DistributionParcelListEntity : : getOrderPackageStatus , new String [ ] { OrderPackageStatusConstant . yichuku . getValue ( ) , OrderPackageStatusConstant . yiqianshou . getValue ( ) } ) ) ;
distributionParcelListEntities . forEach ( p - > {
if ( ! Func . equals ( p . getOrderPackageFreezeStatus ( ) , OrderPackageFreezeStatusConstant . yidongjie . getValue ( ) ) & & ! Func . equals ( p . getOrderPackageFreezeStatus ( ) , OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ) {
DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity ( ) ;
distributionReservationPackageEntity . setReservationId ( reservationId ) ;
distributionReservationPackageEntity . setParceListId ( p . getId ( ) ) ;
distributionReservationPackageEntity . setStockArticleId ( s . getId ( ) ) ;
distributionReservationPackageEntity . setPacketBarCode ( p . getOrderPackageCode ( ) ) ;
//维护订单下包件信息
distributionReservationPackageService . save ( distributionReservationPackageEntity ) ;
//此时订单下的所有包件都处于预约状态,可用数为0
packageNum . getAndAdd ( p . getQuantity ( ) ) ;
//修改订单下的包件状态
if ( p . getOrderPackageStatus ( ) . equals ( OrderPackageStatusConstant . yiqianshou . getValue ( ) ) ) {
if ( ! Func . equals ( p . getOrderPackageFreezeStatus ( ) , OrderPackageFreezeStatusConstant . yidongjie . getValue ( ) ) & & ! Func . equals ( p . getOrderPackageReservationStatus ( ) , OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ) {
DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity ( ) ;
distributionReservationPackageEntity . setReservationId ( reservationId ) ;
distributionReservationPackageEntity . setParceListId ( p . getId ( ) ) ;
distributionReservationPackageEntity . setStockArticleId ( s . getId ( ) ) ;
distributionReservationPackageEntity . setPacketBarCode ( p . getOrderPackageCode ( ) ) ;
//维护订单下包件信息
distributionReservationPackageService . save ( distributionReservationPackageEntity ) ;
//此时订单下的所有包件都处于预约状态,可用数为0
packageNum . getAndAdd ( p . getQuantity ( ) ) ;
//修改订单下的包件状态
// p.setOrderPackageReservationStatus();
p . setOrderPackageReservationStatus ( OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ;
distributionParcelListService . updateById ( p ) ;
p . setOrderPackageReservationStatus ( OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ;
distributionParcelListService . updateById ( p ) ;
}
}
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
} ) ;
s . setReservationStatus ( OrderReservationStatusConstant . yiyueyue . getValue ( ) ) ;
@ -2688,16 +2691,20 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else {
//维护选中的包件信息
packageList . forEach ( p - > {
DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity ( ) ;
distributionReservationPackageEntity . setReservationId ( reservationId ) ;
distributionReservationPackageEntity . setParceListId ( p . getId ( ) ) ;
distributionReservationPackageEntity . setStockArticleId ( s . getId ( ) ) ;
distributionReservationPackageEntity . setPacketBarCode ( p . getOrderPackageCode ( ) ) ;
distributionReservationPackageService . save ( distributionReservationPackageEntity ) ;
packageNum . getAndAdd ( p . getQuantity ( ) ) ;
p . setOrderPackageReservationStatus ( OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ;
if ( ! p . getOrderPackageStatus ( ) . equals ( OrderPackageStatusConstant . yiqianshou . getValue ( ) ) ) {
if ( ! Func . equals ( p . getOrderPackageFreezeStatus ( ) , OrderPackageFreezeStatusConstant . yidongjie . getValue ( ) ) & & ! Func . equals ( p . getOrderPackageReservationStatus ( ) , OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ) {
DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity ( ) ;
distributionReservationPackageEntity . setReservationId ( reservationId ) ;
distributionReservationPackageEntity . setParceListId ( p . getId ( ) ) ;
distributionReservationPackageEntity . setStockArticleId ( s . getId ( ) ) ;
distributionReservationPackageEntity . setPacketBarCode ( p . getOrderPackageCode ( ) ) ;
distributionReservationPackageService . save ( distributionReservationPackageEntity ) ;
packageNum . getAndAdd ( p . getQuantity ( ) ) ;
p . setOrderPackageReservationStatus ( OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ;
// p.setBrandId(p.getBrandId());
distributionParcelListService . updateById ( p ) ;
distributionParcelListService . updateById ( p ) ;
}
}
} ) ;
// s.setReservationStatus(ServiceConstant.ORDER_RESERVATION_STATE_PART);
//设置订单可用数量为