Browse Source

查询区县机构列表添加机构类型为hospital的条件

wangxingwang 6 years ago
parent
commit
60ad67fac2

+ 2 - 2
src/main/java/com/yihu/ehr/basic/org/dao/OrganizationRepository.java

@ -71,10 +71,10 @@ public interface OrganizationRepository extends PagingAndSortingRepository<Organ
    @Query(value = "SELECT org.* from Organizations org WHERE org.administrative_division in(SELECT id from address_dict where pid = :pid)", nativeQuery = true)
    List<Organization> getOrgListByAddressPid(@Param("pid") Integer pid);
    @Query(value = "SELECT org.* from Organizations org WHERE org.administrative_division in(SELECT id from address_dict where pid = :pid) and org.full_name like %:fullName%", nativeQuery = true)
    @Query(value = "SELECT org.* from Organizations org WHERE org.administrative_division in(SELECT id from address_dict where pid = :pid) and org.org_type = 'Hospital' and org.full_name like %:fullName%", nativeQuery = true)
    List<Organization> getOrgListByAddressPidAndParam(@Param("pid") Integer pid, @Param("fullName") String fullName);
    @Query(value = "SELECT org.* from Organizations org WHERE org.administrative_division in(SELECT id from address_dict where pid = :pid) and org.administrative_division = :orgArea", nativeQuery = true)
    @Query(value = "SELECT org.* from Organizations org WHERE org.administrative_division in(SELECT id from address_dict where pid = :pid) and org.administrative_division = :orgArea and org.org_type = 'Hospital'", nativeQuery = true)
    List<Organization> getOrgListByAddressPidAndOrgArea(@Param("pid") Integer pid, @Param("orgArea") String orgArea);
    @Query(value = "SELECT org.* from Organizations org WHERE org.administrative_division = :administrativeDivision and org.full_name like %:fullName% ", nativeQuery = true)