Package org.openwms.wms.shipping.impl
Class ShippingOrderPosition
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.shipping.impl.ShippingOrderPosition
- All Implemented Interfaces:
Serializable
,org.ameba.integration.TypedEntity<Long>
@Entity
public class ShippingOrderPosition
extends org.ameba.integration.jpa.ApplicationEntity
implements Serializable
A OrderPosition.
- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate ZonedDateTime
Date when the Position should be started earliest - inherited from the Order.private ZonedDateTime
Latest finish date of this Position - inherited from the Order.private boolean
Property to lock/unlock an Position.private ZonedDateTime
Date when the Position will be tried to be allocated next time.private @NotNull(message="{owms.wms.shp.order}",groups=Create.class) ShippingOrder
The Order instance, the position belongs to.private Set
<ShippingOrderPositionSplit> All Splits created from this Position.private OrderState
Current position state, inherited from the Order.private @NotNull(message="{owms.wms.shp.positionNo}",groups=Create.class) Integer
The position number is a unique index within a single Order instance.private int
Current priority of the Position.private Problem
Latest problem that is occurred on this Position.private @NotNull(message="{owms.wms.shp.product}",groups=Create.class) Product
The orderedProduct
.private org.openwms.core.units.api.Measurable
The quantity that has been allocated.private org.openwms.core.units.api.Measurable
The quantity planned for cross-docking.private @NotNull(message="{owms.wms.shp.qtyDemanded}",groups=Create.class) org.openwms.core.units.api.Measurable
The quantity that was originally demanded.A list of LocationGroup names where the demanded quantity for the position shall be search in.private OrderStartMode
Defines how the Position is started - inherited from the Order.private Target
Target Location or LocationGroup where the Position should be delivered to.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID
-
Constructor Summary
ConstructorDescriptionUsed by the JPA provider.ShippingOrderPosition
(@NotNull ShippingOrder order, @NotNull Integer posNo, @NotNull org.openwms.core.units.api.Measurable qtyDemanded, @NotNull Product prod) Create a new ShippingOrderPosition. -
Method Summary
Modifier and TypeMethodDescription(package private) void
addSplits
(List<ShippingOrderPositionSplit> splits) Add one or more Splits to this Position.void
addSplits
(ShippingOrderPositionSplit... splits) Add one or more Splits to this Position.void
changeOrderState
(org.ameba.i18n.Translator translator, org.springframework.context.ApplicationEventPublisher eventPublisher, OrderState orderState) Change the state of thisShippingOrderPosition
.void
changePriority
(int priority) Change the priority of the Position and all appending Splits.boolean
int
Get the next assignable Split number.getOrder()
int
org.openwms.core.units.api.Measurable
org.openwms.core.units.api.Measurable
org.openwms.core.units.api.Measurable
int
hashCode()
boolean
Check weather this Position has astartMode
set or not.boolean
Check if the demanded quantity of this Position is fulfilled by the sum of all Splits.boolean
isLocked()
void
setDetails
(Map<String, String> details) (package private) void
setEarliestStartDate
(ZonedDateTime earliestStartDate) (package private) void
setLatestDueDate
(ZonedDateTime latestDueDate) (package private) void
setLocked
(boolean locked) (package private) void
setNextAllocationDate
(ZonedDateTime nextAllocationDate) (package private) void
setOrder
(ShippingOrder order) (package private) void
setOrderState
(OrderState orderState) (package private) void
setPriority
(int priority) (package private) void
setProblem
(Problem problem) void
setProduct
(Product product) (package private) void
setQtyAllocated
(org.openwms.core.units.api.Measurable qtyAllocated) void
setQtyCrossdock
(org.openwms.core.units.api.Measurable qtyCrossdock) void
setSourceLocationGroupNames
(List<String> sourceLocationGroupNames) (package private) void
setStartMode
(OrderStartMode startMode) void
toString()
Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onEntityPersist, onPersist, setPersistentKey
Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setOl
-
Field Details
-
order
@NotNull(message="{owms.wms.shp.order}", groups=Create.class) private @NotNull(message="{owms.wms.shp.order}",groups=Create.class) ShippingOrder orderThe Order instance, the position belongs to. -
positionNo
@NotNull(message="{owms.wms.shp.positionNo}", groups=Create.class) private @NotNull(message="{owms.wms.shp.positionNo}",groups=Create.class) Integer positionNoThe position number is a unique index within a single Order instance. -
orderState
Current position state, inherited from the Order. -
locked
private boolean lockedProperty to lock/unlock an Position. This is usually done via the Order.- true: locked
- false: unlocked
-
priority
private int priorityCurrent priority of the Position. -
latestDueDate
Latest finish date of this Position - inherited from the Order. -
problem
Latest problem that is occurred on this Position. -
earliestStartDate
Date when the Position should be started earliest - inherited from the Order. -
product
@NotNull(message="{owms.wms.shp.product}", groups=Create.class) private @NotNull(message="{owms.wms.shp.product}",groups=Create.class) Product productThe orderedProduct
. -
qtyDemanded
@NotNull(message="{owms.wms.shp.qtyDemanded}", groups=Create.class) private @NotNull(message="{owms.wms.shp.qtyDemanded}",groups=Create.class) org.openwms.core.units.api.Measurable qtyDemandedThe quantity that was originally demanded. -
qtyCrossdock
private org.openwms.core.units.api.Measurable qtyCrossdockThe quantity planned for cross-docking. -
qtyAllocated
private org.openwms.core.units.api.Measurable qtyAllocatedThe quantity that has been allocated. -
nextAllocationDate
Date when the Position will be tried to be allocated next time. -
startMode
Defines how the Position is started - inherited from the Order. -
sourceLocationGroupNames
A list of LocationGroup names where the demanded quantity for the position shall be search in. -
orderPositionSplits
All Splits created from this Position. -
details
-
target
Target Location or LocationGroup where the Position should be delivered to.
-
-
Constructor Details
-
ShippingOrderPosition
public ShippingOrderPosition()Used by the JPA provider. -
ShippingOrderPosition
public ShippingOrderPosition(@NotNull @NotNull ShippingOrder order, @NotNull @NotNull Integer posNo, @NotNull @NotNull org.openwms.core.units.api.Measurable qtyDemanded, @NotNull @NotNull Product prod) Create a new ShippingOrderPosition.- Parameters:
order
- The OrderposNo
- The position numberqtyDemanded
- The ordered quantityprod
- The ordered Product
-
-
Method Details
-
isAllocated
public boolean isAllocated()Check if the demanded quantity of this Position is fulfilled by the sum of all Splits.- Returns:
- true if demanded quantity is equal to assigned quantity, otherwise false
-
changePriority
public void changePriority(int priority) Change the priority of the Position and all appending Splits.- Parameters:
priority
- The new Priority
-
changeOrderState
public void changeOrderState(org.ameba.i18n.Translator translator, org.springframework.context.ApplicationEventPublisher eventPublisher, OrderState orderState) Change the state of thisShippingOrderPosition
.- Parameters:
translator
- An instance of Translator to translate messagesorderState
- The new order state to set- Throws:
org.ameba.exception.BusinessRuntimeException
- In case a state change is not allowed
-
addSplits
Add one or more Splits to this Position.- Parameters:
splits
- Splits to add
-
addSplits
Add one or more Splits to this Position.- Parameters:
splits
- Splits to add
-
getNextSplitNumber
public int getNextSplitNumber()Get the next assignable Split number.- Returns:
- Get 1 plus the number of Splits or start with 1 if no Splits are assigned
-
hasStartMode
public boolean hasStartMode()Check weather this Position has astartMode
set or not.- Returns:
- true if startMode is set otherwise false
-
getSourceLocationGroupNames
-
setSourceLocationGroupNames
-
equals
- Overrides:
equals
in classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()- Overrides:
hashCode
in classorg.ameba.integration.jpa.ApplicationEntity
-
toString
-
getOrder
-
setOrder
-
getPositionNo
-
getOrderState
-
setOrderState
-
isLocked
public boolean isLocked() -
setLocked
void setLocked(boolean locked) -
getPriority
public int getPriority() -
setPriority
void setPriority(int priority) -
getLatestDueDate
-
setLatestDueDate
-
getProblem
-
setProblem
-
getEarliestStartDate
-
setEarliestStartDate
-
getProduct
-
setProduct
-
getQtyDemanded
public org.openwms.core.units.api.Measurable getQtyDemanded() -
getQtyCrossdock
public org.openwms.core.units.api.Measurable getQtyCrossdock() -
setQtyCrossdock
public void setQtyCrossdock(org.openwms.core.units.api.Measurable qtyCrossdock) -
getQtyAllocated
public org.openwms.core.units.api.Measurable getQtyAllocated() -
setQtyAllocated
void setQtyAllocated(org.openwms.core.units.api.Measurable qtyAllocated) -
getNextAllocationDate
-
setNextAllocationDate
-
getStartMode
-
setStartMode
-
getOrderPositionSplits
-
getTarget
-
setTarget
-
getDetails
-
setDetails
-