Package org.openwms.wms.inventory.impl
Interface PackagingUnitRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<PackagingUnit,
,Long> org.springframework.data.jpa.repository.JpaRepository<PackagingUnit,
,Long> org.springframework.data.repository.ListCrudRepository<PackagingUnit,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<PackagingUnit,
,Long> org.springframework.data.repository.PagingAndSortingRepository<PackagingUnit,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<PackagingUnit>
,org.springframework.data.repository.Repository<PackagingUnit,
Long>
interface PackagingUnitRepository
extends org.springframework.data.jpa.repository.JpaRepository<PackagingUnit,Long>
A PackagingUnitRepository.
- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionlong
countPackagingUnits
(String transportUnitBK, String physicalPosition) findAllOfProductinLG
(String productPKey, List<AvailabilityState> puStates, List<String> tuStates, List<String> locationGroupNames, Integer plcState, Boolean locked, org.springframework.data.domain.Pageable page) findAmountOfProductByPKey
(String productPKey, List<String> locationGroupNames) findAmountOfProductBySKU
(String sku, List<String> locationGroupNames) findAmountOfProductBySKUandErpCode
(String sku, String erpCode) findAvailablesByProductInLoadUnit
(Product product) findAvailablesByProductOnLocation
(Product product) findBypKey
(String pKey) findByProduct
(Product product) findForProduct
(String sku, org.springframework.data.domain.Pageable page) findOnLocation
(String erpCode) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findBypKey
@Query(" select pu from PackagingUnit pu\n where pu.pKey = :pKey\n and pu.alive = true\n") Optional<PackagingUnit> findBypKey(@Param("pKey") String pKey) -
findByProduct
@Query(" select pu from PackagingUnit pu\n where pu.product = :product\n and pu.alive = true\n") List<PackagingUnit> findByProduct(@Param("product") Product product) -
findAvailablesByProductOnLocation
@Query("select pu from PackagingUnit pu\nwhere pu.product = :product\nand pu.alive = true\nand pu.loadUnit is null\nand pu.availabilityState = org.openwms.wms.inventory.api.AvailabilityState.AVAILABLE\nand pu.actualLocation is not null\nand pu.actualLocation.plcState = 0\n") List<PackagingUnit> findAvailablesByProductOnLocation(@Param("product") Product product) -
findAvailablesByProductInLoadUnit
@Query("select pu from PackagingUnit pu\nwhere pu.product = :product\nand pu.alive = true\nand pu.loadUnit is not null\nand pu.availabilityState = org.openwms.wms.inventory.api.AvailabilityState.AVAILABLE\nand pu.loadUnit.locked = false\nand pu.loadUnit.transportUnit.state = \'AVAILABLE\'\nand pu.loadUnit.transportUnit.actualLocation.plcState = 0\nand pu.loadUnit.transportUnit.actualLocation.description = \'Pickplatz\'\norder by pu.loadUnit.transportUnit.transportUnitBK.value\n") List<PackagingUnit> findAvailablesByProductInLoadUnit(@Param("product") Product product) -
findForProduct
@Query(" select pu from PackagingUnit pu\n where pu.product.sku = :sku\n and pu.alive = true\n") List<PackagingUnit> findForProduct(@Param("sku") String sku, org.springframework.data.domain.Pageable page) -
findAmountOfProductByPKey
@Query("select pu from PackagingUnit pu\nwhere pu.product.pKey = :productPKey\nand pu.alive = true\nand pu.loadUnit is null\nand pu.availabilityState = org.openwms.wms.inventory.api.AvailabilityState.AVAILABLE\nand pu.actualLocation is not null\nand pu.actualLocation.plcState = 0\nand pu.actualLocation.locationGroup in (:locationGroupNames)\n") List<PackagingUnit> findAmountOfProductByPKey(@Param("productPKey") String productPKey, @Param("locationGroupNames") List<String> locationGroupNames) -
findAmountOfProductBySKU
@Query("select pu from PackagingUnit pu\nwhere pu.product.sku = :sku\nand pu.alive = true\nand pu.loadUnit is null\nand pu.availabilityState = org.openwms.wms.inventory.api.AvailabilityState.AVAILABLE\nand pu.actualLocation is not null\nand pu.actualLocation.plcState = 0\nand pu.actualLocation.locationGroup in (:locationGroupNames)\n") List<PackagingUnit> findAmountOfProductBySKU(@Param("sku") String sku, @Param("locationGroupNames") List<String> locationGroupNames) -
findAmountOfProductBySKUandErpCode
@Query("select pu from PackagingUnit pu\nwhere pu.product.sku = :sku\nand pu.alive = true\nand pu.loadUnit is null\nand pu.availabilityState = org.openwms.wms.inventory.api.AvailabilityState.AVAILABLE\nand pu.actualLocation is not null\nand pu.actualLocation.plcState = 0\nand pu.actualLocation.erpCode = :erpCode\n") List<PackagingUnit> findAmountOfProductBySKUandErpCode(@Param("sku") String sku, @Param("erpCode") String erpCode) -
findAllOfProductinLG
@Query("select pu from PackagingUnit pu\nwhere pu.availabilityState in (:puStates)\nand pu.alive = true\nand pu.product.pKey = :productPKey\nand (pu.loadUnit.locked = :locked or :locked is null)\nand pu.loadUnit.transportUnit.state in (:tuStates)\nand (pu.loadUnit.transportUnit.actualLocation.plcState = :plcState or :plcState is null)\nand pu.loadUnit.transportUnit.actualLocation.locationGroup in (:locationGroupNames)\n") List<PackagingUnit> findAllOfProductinLG(@Param("productPKey") String productPKey, @Param("puStates") List<AvailabilityState> puStates, @Param("tuStates") List<String> tuStates, @Param("locationGroupNames") List<String> locationGroupNames, @Param("plcState") Integer plcState, @Param("locked") Boolean locked, org.springframework.data.domain.Pageable page) -
findOnLocation
@Query("select pu from PackagingUnit pu\nwhere pu.actualLocation.erpCode = :erpCode\nand pu.alive = true\norder by pu.quantity\n") List<PackagingUnit> findOnLocation(@Param("erpCode") String erpCode) -
countPackagingUnits
@Query("select count(pu)\nfrom PackagingUnit pu\nwhere pu.loadUnit is not null\nand pu.alive = true\nand pu.loadUnit.transportUnit.transportUnitBK.value = :transportUnitBK\nand pu.loadUnit.physicalPosition = :physicalPosition\n") long countPackagingUnits(@Param("transportUnitBK") String transportUnitBK, @Param("physicalPosition") String physicalPosition)
-