Interface PackagingUnitRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<PackagingUnit,Long>, org.springframework.data.jpa.repository.JpaRepository<PackagingUnit,Long>, org.springframework.data.repository.PagingAndSortingRepository<PackagingUnit,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<PackagingUnit>, org.springframework.data.querydsl.QuerydslPredicateExecutor<PackagingUnit>, org.springframework.data.repository.Repository<PackagingUnit,Long>

interface PackagingUnitRepository extends org.springframework.data.jpa.repository.JpaRepository<PackagingUnit,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<PackagingUnit>
A PackagingUnitRepository.
Author:
Heiko Scherrer
  • 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\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)
    • 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)