Done ticket GEPAFINBE-178
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package net.gepafin.tendermanagement.repositories;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
@@ -21,5 +24,12 @@ public interface CompanyRepository extends JpaRepository<CompanyEntity, Long> {
|
||||
|
||||
CompanyEntity findByVatNumberAndHubId(String vatNumber, Long hubId);
|
||||
|
||||
@Query("""
|
||||
SELECT c FROM CompanyEntity c
|
||||
WHERE c.vatNumber IS NOT NULL
|
||||
AND (c.json IS NULL OR c.json = '')
|
||||
""")
|
||||
Page<CompanyEntity> findCompaniesWithMissingVatCheck(Pageable pageable);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user