public class DefaultAllocationService extends Object implements AllocationService
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOGGER |
protected static String |
PICKUP_CODE |
protected static String |
REALLOCATE_COMMENT_SUBJECT |
| Constructor and Description |
|---|
DefaultAllocationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
autoReallocate(DeclineEntries declinedEntries)
Creates
DeclineConsignmentEntryEventModel items to represent
the reallocations that can be retrieved by ConsignmentEntryModel.getDeclineEntryEvents(). |
ConsignmentModel |
createConsignment(AbstractOrderModel order,
String code,
SourcingResult result)
This implementation assumes that all order entries in SourcingResult have the same delivery POS.
|
protected ConsignmentEntryModel |
createConsignmentEntry(AbstractOrderEntryModel orderEntry,
Long quantity,
ConsignmentModel consignment)
Create a consignment entry.
|
Collection<ConsignmentModel> |
createConsignments(AbstractOrderModel order,
String code,
SourcingResults results)
Create consignments for the sourcing results gathered from the sourcing strategies executions.
All consignments and order will be persisted after creations and updates. |
protected Optional<DeclineConsignmentEntryEventModel> |
declineConsignmentEntry(DeclineEntry declineEntry)
Decline a single consignment entry.
|
protected WarehousingCommentService<ConsignmentEntryModel> |
getConsignmentEntryCommentService() |
protected DeliveryModeService |
getDeliveryModeService() |
protected GuidKeyGenerator |
getGuidKeyGenerator() |
protected InventoryEventService |
getInventoryEventService() |
protected ModelService |
getModelService() |
protected int |
getNumDeclines(ConsignmentModel consignment)
Gets the number of decline entry event for the given consignment.
|
protected Long |
getQuantityToDecline(DeclineEntry declineEntry)
Get the quantity of items to decline.
|
protected ShippingDateStrategy |
getShippingDateStrategy() |
protected DefaultWarehouseStockService |
getWarehouseStockService() |
Collection<ConsignmentModel> |
manualReallocate(DeclineEntries declinedEntries)
Manually reallocate the consignment entries provided to a new point of service.
|
ConsignmentModel |
reallocate(DeclineEntries declinedEntries)
Deprecated.
|
protected void |
reallocateAllocationEvent(DeclineEntry declineEntry,
Long quantityToDecline)
Delete or update the allocation event which has been created for a specific entry to decline
|
void |
setConsignmentEntryCommentService(WarehousingCommentService<ConsignmentEntryModel> consignmentEntryCommentService) |
void |
setDeliveryModeService(DeliveryModeService deliveryModeService) |
void |
setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator) |
void |
setInventoryEventService(InventoryEventService inventoryEventService) |
void |
setModelService(ModelService modelService) |
void |
setShippingDateStrategy(ShippingDateStrategy shippingDateStrategy) |
void |
setWarehouseStockService(DefaultWarehouseStockService warehouseStockService) |
protected Long |
useQuantityPending(ConsignmentEntryModel consignmentEntry,
DeclineEntry declineEntry) |
protected static final Logger LOGGER
protected static final String PICKUP_CODE
protected static final String REALLOCATE_COMMENT_SUBJECT
public Collection<ConsignmentModel> createConsignments(AbstractOrderModel order, String code, SourcingResults results)
AllocationServicecreateConsignments in interface AllocationServiceorder - - the order to create consignments forcode - - the consignment code; never nullresults - - the sourcing results collected from the sourcing strategies; never nullConsignmentModel; never nullpublic ConsignmentModel createConsignment(AbstractOrderModel order, String code, SourcingResult result)
createConsignment in interface AllocationServiceorder - - the order to create consignments forcode - - the consignment code; never nullresult - - the sourcing results collected from the sourcing strategies; never nullConsignmentModel; never null@Deprecated public ConsignmentModel reallocate(DeclineEntries declinedEntries)
AllocationServiceDeclineConsignmentEntryEventModel items to represent
the reallocations that can be retrieved by ConsignmentEntryModel.getDeclineEntryEvents().
Furthermore, the service can only reallocate an item if it is pending as in
ConsignmentEntryModel.getQuantityPending().
Not applicable, if the selected new warehouses for reallocation are different. In that case, use AllocationService.manualReallocate(DeclineEntries)
reallocate in interface AllocationServicedeclinedEntries - - the collection of decline entries to be reallocatedpublic Collection<ConsignmentModel> manualReallocate(DeclineEntries declinedEntries) throws AllocationException
AllocationServiceDeclineConsignmentEntryEventModel items to represent
the reallocations that can be retrieved by ConsignmentEntryModel.getDeclineEntryEvents().
Furthermore, the service can only reallocate an item if it is pending as in
ConsignmentEntryModel.getQuantityPending().
manualReallocate in interface AllocationServicedeclinedEntries - - the collection of decline entries to be reallocatedAllocationExceptionpublic void autoReallocate(DeclineEntries declinedEntries)
AllocationServiceDeclineConsignmentEntryEventModel items to represent
the reallocations that can be retrieved by ConsignmentEntryModel.getDeclineEntryEvents().
Furthermore, the service can only reallocate an item if it is pending as in
ConsignmentEntryModel.getQuantityPending().
autoReallocate in interface AllocationServicedeclinedEntries - - the collection of decline entries to be reallocatedprotected int getNumDeclines(ConsignmentModel consignment)
consignment - - the consignmentprotected Optional<DeclineConsignmentEntryEventModel> declineConsignmentEntry(DeclineEntry declineEntry)
declineEntry - - the decline entry to process; contains the consignment entry, the new warehouse to which the items are being reallocated to and quantity to be declinedprotected Long getQuantityToDecline(DeclineEntry declineEntry)
declineEntry - - the consignment entry being declinedprotected Long useQuantityPending(ConsignmentEntryModel consignmentEntry, DeclineEntry declineEntry)
protected ConsignmentEntryModel createConsignmentEntry(AbstractOrderEntryModel orderEntry, Long quantity, ConsignmentModel consignment)
orderEntry - - the order entryquantity - - the ordered quantityconsignment - - the consignment to which the consignment entry will be added toprotected void reallocateAllocationEvent(DeclineEntry declineEntry, Long quantityToDecline)
declineEntry - the entry to decline/reallocatequantityToDecline - the quantity to decline/reallocateprotected ModelService getModelService()
public void setModelService(ModelService modelService)
protected DeliveryModeService getDeliveryModeService()
public void setDeliveryModeService(DeliveryModeService deliveryModeService)
protected WarehousingCommentService<ConsignmentEntryModel> getConsignmentEntryCommentService()
public void setConsignmentEntryCommentService(WarehousingCommentService<ConsignmentEntryModel> consignmentEntryCommentService)
protected InventoryEventService getInventoryEventService()
public void setInventoryEventService(InventoryEventService inventoryEventService)
protected GuidKeyGenerator getGuidKeyGenerator()
public void setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator)
protected DefaultWarehouseStockService getWarehouseStockService()
public void setWarehouseStockService(DefaultWarehouseStockService warehouseStockService)
protected ShippingDateStrategy getShippingDateStrategy()
public void setShippingDateStrategy(ShippingDateStrategy shippingDateStrategy)
Copyright © 2017 SAP SE. All Rights Reserved.