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 Details

    • order

      @NotNull(message="{owms.wms.shp.order}", groups=Create.class) private @NotNull(message="{owms.wms.shp.order}",groups=Create.class) ShippingOrder order
      The 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 positionNo
      The position number is a unique index within a single Order instance.
    • orderState

      private OrderState orderState
      Current position state, inherited from the Order.
    • locked

      private boolean locked
      Property to lock/unlock an Position. This is usually done via the Order.
      • true: locked
      • false: unlocked
      Default is false
    • priority

      private int priority
      Current priority of the Position.
    • latestDueDate

      private ZonedDateTime latestDueDate
      Latest finish date of this Position - inherited from the Order.
    • problem

      private Problem problem
      Latest problem that is occurred on this Position.
    • earliestStartDate

      private ZonedDateTime 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 product
      The ordered Product.
    • 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 qtyDemanded
      The quantity that was originally demanded.
    • qtyCrossdock

      private org.openwms.core.units.api.Measurable qtyCrossdock
      The quantity planned for cross-docking.
    • qtyAllocated

      private org.openwms.core.units.api.Measurable qtyAllocated
      The quantity that has been allocated.
    • nextAllocationDate

      private ZonedDateTime nextAllocationDate
      Date when the Position will be tried to be allocated next time.
    • startMode

      private OrderStartMode startMode
      Defines how the Position is started - inherited from the Order.
    • sourceLocationGroupNames

      @Size(max=1024) private @Size(max=1024) List<String> sourceLocationGroupNames
      A list of LocationGroup names where the demanded quantity for the position shall be search in.
    • orderPositionSplits

      private Set<ShippingOrderPositionSplit> orderPositionSplits
      All Splits created from this Position.
    • details

      private Map<String,String> details
    • target

      private Target 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 Order
      posNo - The position number
      qtyDemanded - The ordered quantity
      prod - 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 this ShippingOrderPosition.
      Parameters:
      translator - An instance of Translator to translate messages
      orderState - The new order state to set
      Throws:
      org.ameba.exception.BusinessRuntimeException - In case a state change is not allowed
    • addSplits

      public void addSplits(ShippingOrderPositionSplit... splits)
      Add one or more Splits to this Position.
      Parameters:
      splits - Splits to add
    • addSplits

      void addSplits(List<ShippingOrderPositionSplit> splits)
      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 a startMode set or not.
      Returns:
      true if startMode is set otherwise false
    • getSourceLocationGroupNames

      public List<String> getSourceLocationGroupNames()
    • setSourceLocationGroupNames

      public void setSourceLocationGroupNames(List<String> sourceLocationGroupNames)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.ameba.integration.jpa.ApplicationEntity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.ameba.integration.jpa.ApplicationEntity
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOrder

      public ShippingOrder getOrder()
    • setOrder

      void setOrder(ShippingOrder order)
    • getPositionNo

      public Integer getPositionNo()
    • getOrderState

      public OrderState getOrderState()
    • setOrderState

      void setOrderState(OrderState orderState)
    • isLocked

      public boolean isLocked()
    • setLocked

      void setLocked(boolean locked)
    • getPriority

      public int getPriority()
    • setPriority

      void setPriority(int priority)
    • getLatestDueDate

      public ZonedDateTime getLatestDueDate()
    • setLatestDueDate

      void setLatestDueDate(ZonedDateTime latestDueDate)
    • getProblem

      public Problem getProblem()
    • setProblem

      void setProblem(Problem problem)
    • getEarliestStartDate

      public ZonedDateTime getEarliestStartDate()
    • setEarliestStartDate

      void setEarliestStartDate(ZonedDateTime earliestStartDate)
    • getProduct

      public Product getProduct()
    • setProduct

      public void setProduct(Product product)
    • 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

      public ZonedDateTime getNextAllocationDate()
    • setNextAllocationDate

      void setNextAllocationDate(ZonedDateTime nextAllocationDate)
    • getStartMode

      public OrderStartMode getStartMode()
    • setStartMode

      void setStartMode(OrderStartMode startMode)
    • getOrderPositionSplits

      public Set<ShippingOrderPositionSplit> getOrderPositionSplits()
    • getTarget

      public Target getTarget()
    • setTarget

      public void setTarget(Target target)
    • getDetails

      public Map<String,String> getDetails()
    • setDetails

      public void setDetails(Map<String,String> details)