Package org.openwms.wms.inventory.impl
Class PackagingUnitFinderImpl
java.lang.Object
org.openwms.wms.inventory.impl.PackagingUnitFinderImpl
- All Implemented Interfaces:
PackagingUnitFinder
A PackagingUnitFinderImpl is a Spring managed transactional bean that is responsible for all query operations on
PackagingUnit
s.- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoadUnitService
private final org.openwms.common.location.api.LocationGroupApi
private final LocationService
private static final org.slf4j.Logger
private final ProductService
private final PackagingUnitRepository
private final org.ameba.i18n.Translator
private final TransportUnitService
-
Constructor Summary
ConstructorsConstructorDescriptionPackagingUnitFinderImpl
(org.ameba.i18n.Translator translator, PackagingUnitRepository repository, ProductService productService, LoadUnitService loadUnitService, LocationService locationService, TransportUnitService transportUnitService, org.openwms.common.location.api.LocationGroupApi locationGroupApi) -
Method Summary
Modifier and TypeMethodDescription@NotNull org.openwms.core.units.api.Measurable
findAmountOfProductByPKey
(@NotBlank String productPKey, @NotBlank String locationGroupName) Find and return the quantity of allPackagingUnit
s.@NotNull org.openwms.core.units.api.Measurable
findAmountOfProductBySKU
(@NotBlank String sku, @NotBlank String locationGroupName) Find and return the quantity of allPackagingUnit
s.@NotNull org.openwms.core.units.api.Measurable
findAmountOfProductBySKUOnLocation
(@NotBlank String sku, @NotBlank String locationErpCode) Find and return the quantity of allPackagingUnit
s.@NotNull List<PackagingUnit>
findAvailablesForProductInLoadUnitsOnly
(@NotNull Product product) @NotNull List<PackagingUnit>
findAvailablesForProductOnLocationsOnly
(@NotNull Product product) findByPKey
(@NotEmpty String pKey) Find and return aPackagingUnit
.private PackagingUnit
findByPKeyInternal
(String pKey) @NotNull List<PackagingUnit>
findForSku
(@NotEmpty String sku) Find and return allPackagingUnit
s for the givenSKU
.@NotNull List<PackagingUnit>
findForSku
(@NotEmpty String sku, int amount, String sortDirection, String sortProperty) @NotNull List<PackagingUnit>
findOfProductInLG
(@NotBlank String productPKey, List<String> locationGroupNames, String sortDirection, String sortProperty) Find and return allPackagingUnit
s of aProduct
identified by the givenproductPKey
that is located within a particularLocationGroup
identified by the givenlocationGroupName
.@NotNull List<PackagingUnit>
findOnLocation
(@NotEmpty String erpCode) Find and return allPackagingUnit
s that are located on aLocation
.@NotNull List<PackagingUnit>
Find and return allPackagingUnit
s that are located on aTransportUnit
.@NotNull List<PackagingUnit>
findOnTUandLU
(@NotEmpty String transportUnitBK, @NotEmpty String luPos) Find and return allPackagingUnit
s that are located on aTransportUnit
within a particularLoadUnit
.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
translator
private final org.ameba.i18n.Translator translator -
repository
-
productService
-
loadUnitService
-
locationService
-
transportUnitService
-
locationGroupApi
private final org.openwms.common.location.api.LocationGroupApi locationGroupApi
-
-
Constructor Details
-
PackagingUnitFinderImpl
PackagingUnitFinderImpl(org.ameba.i18n.Translator translator, PackagingUnitRepository repository, ProductService productService, LoadUnitService loadUnitService, LocationService locationService, TransportUnitService transportUnitService, org.openwms.common.location.api.LocationGroupApi locationGroupApi)
-
-
Method Details
-
findByPKey
Find and return aPackagingUnit
.- Specified by:
findByPKey
in interfacePackagingUnitFinder
- Parameters:
pKey
- The persistent identifier- Returns:
- The instance
-
findByPKeyInternal
-
findOnLocation
@Measured @NotNull public @NotNull List<PackagingUnit> findOnLocation(@NotEmpty @NotEmpty String erpCode) Find and return allPackagingUnit
s that are located on aLocation
.- Specified by:
findOnLocation
in interfacePackagingUnitFinder
- Parameters:
erpCode
- The business key of the Location the PackagingUnits are placed on- Returns:
- A list of all PackagingUnits, never null
-
findOnTU
@Measured @NotNull public @NotNull List<PackagingUnit> findOnTU(@NotEmpty @NotEmpty String transportUnitBK) Find and return allPackagingUnit
s that are located on aTransportUnit
.- Specified by:
findOnTU
in interfacePackagingUnitFinder
- Parameters:
transportUnitBK
- The business key of the TransportUnit the PackagingUnits are carried on- Returns:
- A list of all PackagingUnits, never null
-
findOnTUandLU
@Measured @NotNull public @NotNull List<PackagingUnit> findOnTUandLU(@NotEmpty @NotEmpty String transportUnitBK, @NotEmpty @NotEmpty String luPos) Find and return allPackagingUnit
s that are located on aTransportUnit
within a particularLoadUnit
.- Specified by:
findOnTUandLU
in interfacePackagingUnitFinder
- Parameters:
transportUnitBK
- The business key of the TransportUnit the PackagingUnits are carried onluPos
- The position of the LoadUnit within the TransportUnit- Returns:
- A list of all PackagingUnits, never null
-
findForSku
Find and return allPackagingUnit
s for the givenSKU
.- Specified by:
findForSku
in interfacePackagingUnitFinder
- Parameters:
sku
- The Products SKU- Returns:
- A list of PackagingUnits, never null
-
findForSku
@Measured @NotNull public @NotNull List<PackagingUnit> findForSku(@NotEmpty @NotEmpty String sku, int amount, String sortDirection, String sortProperty) - Specified by:
findForSku
in interfacePackagingUnitFinder
- Parameters:
sku
- The Products SKUamount
- The number of returned hitssortDirection
- The sort direction either ASC or DESC or nullsortProperty
- The property to sort the result list or null- Returns:
- A list of PackagingUnits, never null
-
findOfProductInLG
@Measured @NotNull public @NotNull List<PackagingUnit> findOfProductInLG(@NotBlank @NotBlank String productPKey, List<String> locationGroupNames, String sortDirection, String sortProperty) Find and return allPackagingUnit
s of aProduct
identified by the givenproductPKey
that is located within a particularLocationGroup
identified by the givenlocationGroupName
.- Specified by:
findOfProductInLG
in interfacePackagingUnitFinder
- Parameters:
productPKey
- The Product persistent keylocationGroupNames
- The identifying names of the LocationGroupssortDirection
- Either ASC or DESCsortProperty
- The name of the property to sort for- Returns:
- A list of PackagingUnits
-
findAmountOfProductByPKey
@Measured @NotNull public @NotNull org.openwms.core.units.api.Measurable findAmountOfProductByPKey(@NotBlank @NotBlank String productPKey, @NotBlank @NotBlank String locationGroupName) Find and return the quantity of allPackagingUnit
s.- Specified by:
findAmountOfProductByPKey
in interfacePackagingUnitFinder
- Parameters:
productPKey
- The Product's persistent keylocationGroupName
- The identifying name of the LocationGroup and children to search for- Returns:
- The sum of quantities of all PackagingUnits
-
findAmountOfProductBySKU
@Measured @NotNull public @NotNull org.openwms.core.units.api.Measurable findAmountOfProductBySKU(@NotBlank @NotBlank String sku, @NotBlank @NotBlank String locationGroupName) Find and return the quantity of allPackagingUnit
s.- Specified by:
findAmountOfProductBySKU
in interfacePackagingUnitFinder
- Parameters:
sku
- or the Product's SKUlocationGroupName
- The identifying name of the LocationGroup and children to search for- Returns:
- The sum of quantities of all PackagingUnits
-
findAmountOfProductBySKUOnLocation
@Measured @NotNull public @NotNull org.openwms.core.units.api.Measurable findAmountOfProductBySKUOnLocation(@NotBlank @NotBlank String sku, @NotBlank @NotBlank String locationErpCode) Find and return the quantity of allPackagingUnit
s.- Specified by:
findAmountOfProductBySKUOnLocation
in interfacePackagingUnitFinder
- Parameters:
sku
- or the Product's SKUlocationErpCode
- The identifying name of the Location to search for- Returns:
- The sum of quantities of all PackagingUnits
-
findAvailablesForProductOnLocationsOnly
@Measured @NotNull public @NotNull List<PackagingUnit> findAvailablesForProductOnLocationsOnly(@NotNull @NotNull Product product) - Specified by:
findAvailablesForProductOnLocationsOnly
in interfacePackagingUnitFinder
-
findAvailablesForProductInLoadUnitsOnly
@Measured @NotNull public @NotNull List<PackagingUnit> findAvailablesForProductInLoadUnitsOnly(@NotNull @NotNull Product product) - Specified by:
findAvailablesForProductInLoadUnitsOnly
in interfacePackagingUnitFinder
-