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
PackagingUnits.- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoadUnitServiceprivate final org.openwms.common.location.api.LocationGroupApiprivate final LocationServiceprivate static final org.slf4j.Loggerprivate final ProductServiceprivate final PackagingUnitRepositoryprivate final org.ameba.i18n.Translatorprivate 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.MeasurablefindAmountOfProductByPKey(@NotBlank String productPKey, @NotBlank String locationGroupName) Find and return the quantity of allPackagingUnits.@NotNull org.openwms.core.units.api.MeasurablefindAmountOfProductBySKU(@NotBlank String sku, @NotBlank String locationGroupName) Find and return the quantity of allPackagingUnits.@NotNull org.openwms.core.units.api.MeasurablefindAmountOfProductBySKUOnLocation(@NotBlank String sku, @NotBlank String locationErpCode) Find and return the quantity of allPackagingUnits.@NotNull List<PackagingUnit> findAvailablesForProductInLoadUnitsOnly(@NotNull Product product) @NotNull List<PackagingUnit> findAvailablesForProductOnLocationsOnly(@NotNull Product product) findByPKey(@NotEmpty String pKey) Find and return aPackagingUnit.private PackagingUnitfindByPKeyInternal(String pKey) @NotNull List<PackagingUnit> findForSku(@NotEmpty String sku) Find and return allPackagingUnits for the givenSKU.@NotNull List<PackagingUnit> findForSku(@NotEmpty String sku, int amount, String sortDirection, String sortProperty) @NotNull List<PackagingUnit> findInLocationGroup(@NotBlank String locationGroupName) Find and return allPackagingUnits that are located in the givenLocationGroup.@NotNull List<PackagingUnit> findOfProductInLG(@NotBlank String productPKey, List<String> locationGroupNames, String sortDirection, String sortProperty) Find and return allPackagingUnits of aProductidentified by the givenproductPKeythat is located within a particularLocationGroupidentified by the givenlocationGroupName.@NotNull List<PackagingUnit> findOnLocation(@NotBlank String erpCode) Find and return allPackagingUnits that are located on aLocation.@NotNull List<PackagingUnit> Find and return allPackagingUnits that are located on aTransportUnit.@NotNull List<PackagingUnit> findOnTUandLU(@NotEmpty String transportUnitBK, @NotEmpty String luPos) Find and return allPackagingUnits that are located on aTransportUnitwithin 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:
findByPKeyin interfacePackagingUnitFinder- Parameters:
pKey- The persistent identifier- Returns:
- The instance
-
findByPKeyInternal
-
findOnLocation
@Measured @NotNull public @NotNull List<PackagingUnit> findOnLocation(@NotBlank @NotBlank String erpCode) Find and return allPackagingUnits that are located on aLocation.- Specified by:
findOnLocationin interfacePackagingUnitFinder- Parameters:
erpCode- The business key of the Location the PackagingUnits are placed on- Returns:
- A list of all PackagingUnits, never null
-
findInLocationGroup
@Measured @NotNull public @NotNull List<PackagingUnit> findInLocationGroup(@NotBlank @NotBlank String locationGroupName) Find and return allPackagingUnits that are located in the givenLocationGroup.- Specified by:
findInLocationGroupin interfacePackagingUnitFinder- Parameters:
locationGroupName- The business key of the LocationGroup the PackagingUnits are stored in- Returns:
- A list of all PackagingUnits, never null
-
findOnTU
@Measured @NotNull public @NotNull List<PackagingUnit> findOnTU(@NotEmpty @NotEmpty String transportUnitBK) Find and return allPackagingUnits that are located on aTransportUnit.- Specified by:
findOnTUin 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 allPackagingUnits that are located on aTransportUnitwithin a particularLoadUnit.- Specified by:
findOnTUandLUin 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 allPackagingUnits for the givenSKU.- Specified by:
findForSkuin 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:
findForSkuin 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 allPackagingUnits of aProductidentified by the givenproductPKeythat is located within a particularLocationGroupidentified by the givenlocationGroupName.- Specified by:
findOfProductInLGin 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 allPackagingUnits.- Specified by:
findAmountOfProductByPKeyin 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 allPackagingUnits.- Specified by:
findAmountOfProductBySKUin 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 allPackagingUnits.- Specified by:
findAmountOfProductBySKUOnLocationin 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:
findAvailablesForProductOnLocationsOnlyin interfacePackagingUnitFinder
-
findAvailablesForProductInLoadUnitsOnly
@Measured @NotNull public @NotNull List<PackagingUnit> findAvailablesForProductInLoadUnitsOnly(@NotNull @NotNull Product product) - Specified by:
findAvailablesForProductInLoadUnitsOnlyin interfacePackagingUnitFinder
-