소스 검색

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

wangxingwang 6 년 전
부모
커밋
60ad67fac2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/main/java/com/yihu/ehr/basic/org/dao/OrganizationRepository.java

+ 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)