Done ticket GEPAFINBE-178

This commit is contained in:
Piyush
2025-03-05 20:31:20 +05:30
parent 2f746e503b
commit e937f33aeb
12 changed files with 208 additions and 0 deletions

View File

@@ -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);
}