|
|
@ -5841,9 +5841,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
//订制品
|
|
|
|
//订制品
|
|
|
|
if (!packageEntityList.isEmpty() && packageEntityList.size() > 0) { |
|
|
|
if (!packageEntityList.isEmpty() && packageEntityList.size() > 0) { |
|
|
|
packageFlag = packageEntityList.stream().allMatch(a->OrderPackageStockupStatusConstant.yibeihu.getValue().equals(a.getOrderPackageStockupStatus())); |
|
|
|
packageFlag = packageEntityList.stream().allMatch(a->OrderPackageStockupStatusConstant.yibeihu.getValue().equals(a.getOrderPackageStockupStatus())); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
packageFlag = true; |
|
|
|
packageFlag = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
packageFlag = true; |
|
|
|
} |
|
|
|
} |
|
|
|
//库存品
|
|
|
|
//库存品
|
|
|
|
if (!inventoryList.isEmpty() && inventoryList.size() > 0) { |
|
|
|
if (!inventoryList.isEmpty() && inventoryList.size() > 0) { |
|
|
@ -5862,7 +5864,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
zeroFlag = true; |
|
|
|
zeroFlag = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
zeroFlag = true; |
|
|
|
zeroFlag = true; |
|
|
|
} |
|
|
|
} |
|
|
|
DistributionStockupEntity distributionStockupEntity = new DistributionStockupEntity(); |
|
|
|
DistributionStockupEntity distributionStockupEntity = new DistributionStockupEntity(); |
|
|
@ -6334,7 +6336,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
if (!stockListId.equals(disStockListDetailEntity.getStockListId())){ |
|
|
|
if (!stockListId.equals(disStockListDetailEntity.getStockListId())){ |
|
|
|
//对已有计划进行减少
|
|
|
|
//对已有计划进行减少
|
|
|
|
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(f -> !Objects.equals(f.getQuantity(), f.getRealityQuantity())).collect(Collectors.toList()).get(0); |
|
|
|
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(f -> !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); |
|
|
|
distributionDeliveryDetailsService.updateById(deliveryDetails); |
|
|
|
distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1); |
|
|
|
distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1); |
|
|
|
distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1); |
|
|
|
distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1); |
|
|
@ -6353,6 +6359,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
disStockListDetailEntity.setStockPackageCode(one.getCode()); |
|
|
|
disStockListDetailEntity.setStockPackageCode(one.getCode()); |
|
|
|
disStockListDetailEntity.setStockType(InventoryStockTypeStatusConstant.shengcheng.getValue()); |
|
|
|
disStockListDetailEntity.setStockType(InventoryStockTypeStatusConstant.shengcheng.getValue()); |
|
|
|
disStockListDetailEntity.setStockListId(distributionStockListEntity.getId()); |
|
|
|
disStockListDetailEntity.setStockListId(distributionStockListEntity.getId()); |
|
|
|
|
|
|
|
disStockListDetailService.updateById(disStockListDetailEntity); |
|
|
|
distributionStockListService.updateById(distributionStockListEntity); |
|
|
|
distributionStockListService.updateById(distributionStockListEntity); |
|
|
|
distributionStockListMapper.updateInventoryQuantityOccupied(disStockListDetailEntity.getStockListId(), disStockListDetailEntity.getNum()); |
|
|
|
distributionStockListMapper.updateInventoryQuantityOccupied(disStockListDetailEntity.getStockListId(), disStockListDetailEntity.getNum()); |
|
|
|
distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, num); |
|
|
|
distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, num); |
|
|
@ -6360,7 +6367,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution |
|
|
|
distrilbutionBillLadingService.maintenanceStockListStockup(reservationId, stockListId, myCurrentWarehouse.getId()); |
|
|
|
distrilbutionBillLadingService.maintenanceStockListStockup(reservationId, stockListId, myCurrentWarehouse.getId()); |
|
|
|
//对原计划进行减少
|
|
|
|
//对原计划进行减少
|
|
|
|
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(r -> !Objects.equals(r.getQuantity(), r.getRealityQuantity())).collect(Collectors.toList()).get(0); |
|
|
|
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(r -> !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); |
|
|
|
distributionDeliveryDetailsService.updateById(deliveryDetails); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|