Class ReceivingServiceImpl

  • All Implemented Interfaces:
    ReceivingService

    @Validated
    @TxService
    class ReceivingServiceImpl
    extends Object
    implements ReceivingService
    A ReceivingServiceImpl is a Spring managed transactional Services that deals with ReceivingOrders.
    Author:
    Heiko Scherrer
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • overbookingAllowed

        private final boolean overbookingAllowed
      • translator

        private final org.ameba.i18n.Translator translator
      • publisher

        private final org.springframework.context.ApplicationEventPublisher publisher
    • Constructor Detail

      • ReceivingServiceImpl

        ReceivingServiceImpl​(@Value("${owms.receiving.unexpected-receipts-allowed:true}")
                             boolean overbookingAllowed,
                             org.ameba.i18n.Translator translator,
                             ReceivingOrderRepository repository,
                             ProductService service,
                             org.springframework.context.ApplicationEventPublisher publisher,
                             PackagingUnitApi packagingUnitApi)
    • Method Detail

      • capture

        @Measured
        @NotNull
        public @NotNull ReceivingOrder capture​(@NotEmpty
                                               @NotEmpty String pKey,
                                               @NotEmpty
                                               @NotEmpty String transportUnitId,
                                               @NotEmpty
                                               @NotEmpty String loadUnitPosition,
                                               @NotEmpty
                                               @NotEmpty String loadUnitType,
                                               @NotNull
                                               @NotNull org.openwms.core.units.api.Measurable quantityReceived,
                                               CaptureDetailsVO details,
                                               @NotNull @Valid
                                               @NotNull @Valid Product product)
        Decrease one of the ReceivingOrderPositions by the received amount of the given Product and book the received article to the TransportUnit identified by the transportUnitId.
        Specified by:
        capture in interface ReceivingService
        Parameters:
        pKey - The persistent key of the ReceivingOrder
        transportUnitId - The identifier of the TransportUnit to book the Product to
        loadUnitPosition - The position of the LoadUnit
        loadUnitType - In case the LoadUnit is created this is type for the LoadUnit
        quantityReceived - The received quantity
        product - The received Product
        Returns:
        The updated ReceivingOrder instance with updated positions
      • findByPKey

        @Measured
        @NotNull
        public @NotNull ReceivingOrder findByPKey​(@NotEmpty
                                                  @NotEmpty String pKey)
        Find and return a ReceivingOrder identified by its synthetic persistent key.
        Specified by:
        findByPKey in interface ReceivingService
        Parameters:
        pKey - The synthetic persistent key
        Returns:
        The instance