소스 검색

检查数据去重

chengyao 4 년 전
부모
커밋
9ad98803f1
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/main/resources/mapper/MedPacsInfoMapper.xml

+ 2 - 2
src/main/resources/mapper/MedPacsInfoMapper.xml

@@ -40,7 +40,7 @@
     </select>
 
     <select id="getCheckInfo" resultType="com.diagbot.dto.CheckInfoDTO">
-        select b.*
+        select DISTINCT b.*
         from(
         SELECT
         t1.rep_name as checkItemName,
@@ -60,7 +60,7 @@
         t1.is_deleted = "N"
         AND t2.is_deleted = "N"
         AND t3.is_deleted = "N"
-        AND t2.rept_name IS NOT NULL
+        AND t1.rep_name IS NOT NULL
         AND t1.check_date IS NOT NULL
         and t1.hospital_id = t2.hospital_id
         and t1.hospital_id = t3.hospital_id