|
@ -15,28 +15,11 @@ import org.springframework.data.repository.PagingAndSortingRepository;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
public interface HospitalDao extends PagingAndSortingRepository<Hospital, Long>,JpaSpecificationExecutor<Hospital> {
|
|
public interface HospitalDao extends PagingAndSortingRepository<Hospital, Long>,JpaSpecificationExecutor<Hospital> {
|
|
// 根據CODE查詢医院名称
|
|
|
|
@Query("select p from Hospital p where p.code = ?1")
|
|
|
|
Hospital findByCode(String code);
|
|
|
|
|
|
|
|
@Query("select a from Hospital a where a.name like ?1 and a.id<?2")
|
|
|
|
Page<Hospital> getHospitalList(String query, long id, Pageable pageRequest);
|
|
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level in (1,2) ")
|
|
|
|
List<Hospital> findAllHospital();
|
|
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level = 2 ")
|
|
|
|
List<Hospital> findAllSqHospital();
|
|
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level = 2 and town = ?1")
|
|
|
|
List<Hospital> findAreaSqHospital(String town);
|
|
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level =2 and p.centerSite='00'")
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level =2 and p.centerSite='00' and length(p.code) = 10 ")
|
|
List<Hospital> findHospital2();
|
|
List<Hospital> findHospital2();
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level =2 and p.centerSite='00'")
|
|
|
|
|
|
@Query("select p from Hospital p where p.del = 1 and p.level =2 and p.centerSite='00' and length(p.code) = 10 ")
|
|
List<Hospital> findHospitalzxFWZ();
|
|
List<Hospital> findHospitalzxFWZ();
|
|
|
|
|
|
@Query("select p from Hospital p where p.town = ?1 and p.del='1' and p.level =2 and p.centerSite='00'")
|
|
|
|
List<Hospital> findByTownCode(String town);
|
|
|
|
}
|
|
}
|