public class DefaultAllocationService extends java.lang.Object implements AllocationService
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
PICKUP_CODE |
protected static java.lang.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(). |
protected void |
consolidateConsignmentEntries(java.util.List<ConsignmentModel> newConsignments,
ConsignmentModel consignment,
AbstractOrderModel order,
DeclineConsignmentEntryEventModel event)
Consolidates the
ConsignmentEntryModel if they belong to the same WarehouseModel |
ConsignmentModel |
createConsignment(AbstractOrderModel order,
java.lang.String code,
SourcingResult result)
This implementation assumes that all order entries in SourcingResult have the same delivery POS.
|
protected ConsignmentEntryModel |
createConsignmentEntry(AbstractOrderEntryModel orderEntry,
java.lang.Long quantity,
ConsignmentModel consignment)
Create a consignment entry.
|
java.util.Collection<ConsignmentModel> |
createConsignments(AbstractOrderModel order,
java.lang.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 java.util.Optional<DeclineConsignmentEntryEventModel> |
declineConsignmentEntry(DeclineEntry declineEntry)
Decline a single consignment entry.
|
protected WarehousingCommentService |
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 java.lang.Long |
getQuantityToDecline(DeclineEntry declineEntry)
Get the quantity of items to decline.
|
protected ShippingDateStrategy |
getShippingDateStrategy() |
protected StockLevelDao |
getStockLevelDao() |
protected WarehousingConsignmentWorkflowService |
getWarehousingConsignmentWorkflowService() |
protected WarehousingFulfillmentConfigDao |
getWarehousingFulfillmentConfigDao() |
java.util.Collection<ConsignmentModel> |
manualReallocate(DeclineEntries declinedEntries)
Manually reallocate the consignment entries provided to a new point of service.
|
protected void |
reallocateAllocationEvent(DeclineEntry declineEntry,
java.lang.Long quantityToDecline)
Delete or update the allocation event which has been created for a specific entry to decline
|
void |
setConsignmentEntryCommentService(WarehousingCommentService consignmentEntryCommentService) |
void |
setDeliveryModeService(DeliveryModeService deliveryModeService) |
void |
setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator) |
void |
setInventoryEventService(InventoryEventService inventoryEventService) |
void |
setModelService(ModelService modelService) |
void |
setShippingDateStrategy(ShippingDateStrategy shippingDateStrategy) |
void |
setStockLevelDao(StockLevelDao stockLevelDao) |
void |
setWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService) |
void |
setWarehousingFulfillmentConfigDao(WarehousingFulfillmentConfigDao warehousingFulfillmentConfigDao) |
protected java.lang.Long |
useQuantityPending(ConsignmentEntryModel consignmentEntry,
DeclineEntry declineEntry) |
protected static final java.lang.String PICKUP_CODE
protected static final java.lang.String REALLOCATE_COMMENT_SUBJECT
public java.util.Collection<ConsignmentModel> createConsignments(AbstractOrderModel order, java.lang.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, java.lang.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 nullpublic java.util.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 reallocatedAllocationExceptionprotected void consolidateConsignmentEntries(java.util.List<ConsignmentModel> newConsignments, ConsignmentModel consignment, AbstractOrderModel order, DeclineConsignmentEntryEventModel event)
ConsignmentEntryModel if they belong to the same WarehouseModelnewConsignments - the list of new consignmentsconsignment - the original ConsignmentModelorder - the related AbstractOrderModelevent - the DeclineConsignmentEntryEventModelpublic 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 java.util.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 java.lang.Long getQuantityToDecline(DeclineEntry declineEntry)
declineEntry - - the consignment entry being declinedprotected java.lang.Long useQuantityPending(ConsignmentEntryModel consignmentEntry, DeclineEntry declineEntry)
protected ConsignmentEntryModel createConsignmentEntry(AbstractOrderEntryModel orderEntry, java.lang.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, java.lang.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 getConsignmentEntryCommentService()
public void setConsignmentEntryCommentService(WarehousingCommentService consignmentEntryCommentService)
protected InventoryEventService getInventoryEventService()
public void setInventoryEventService(InventoryEventService inventoryEventService)
protected GuidKeyGenerator getGuidKeyGenerator()
public void setGuidKeyGenerator(GuidKeyGenerator guidKeyGenerator)
protected ShippingDateStrategy getShippingDateStrategy()
public void setShippingDateStrategy(ShippingDateStrategy shippingDateStrategy)
protected WarehousingConsignmentWorkflowService getWarehousingConsignmentWorkflowService()
public void setWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)
protected WarehousingFulfillmentConfigDao getWarehousingFulfillmentConfigDao()
public void setWarehousingFulfillmentConfigDao(WarehousingFulfillmentConfigDao warehousingFulfillmentConfigDao)
protected StockLevelDao getStockLevelDao()
public void setStockLevelDao(StockLevelDao stockLevelDao)
Copyright © 2018 SAP SE. All Rights Reserved.