/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.wlyy.statistics.dao;

import com.yihu.wlyy.statistics.model.hosptial.Hospital;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface HospitalDao extends PagingAndSortingRepository<Hospital, Long>,JpaSpecificationExecutor<Hospital>  {

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

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

}
