فهرست منبع

链接缺陷列表接口调整

chengyao 3 سال پیش
والد
کامیت
8cd8d63d2a
1فایلهای تغییر یافته به همراه18 افزوده شده و 2 حذف شده
  1. 18 2
      src/main/resources/mapper/QcresultInfoMapper.xml

+ 18 - 2
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -1687,7 +1687,15 @@
             AND a.beh_dept_id = #{filterPageVO.deptId}
         </if>
         <if test="filterPageVO.doctorName != null and filterPageVO.doctorName != ''">
-            AND a.doctor_name = #{filterPageVO.doctorName}
+            AND (case
+            when a.doctor_id != '' and a.doctor_id is not null then a.doctor_id
+            when (a.doctor_id = '' or a.doctor_id is null) and
+            a.director_doctor_id != '' and a.director_doctor_id is not null
+            then a.director_doctor_id
+            when (a.doctor_id = '' or a.doctor_id is null) and
+            (a.director_doctor_id = '' or a.director_doctor_id is null) and
+            a.beh_doctor_id != '' and a.beh_doctor_id is not null
+            then a.beh_doctor_id end)= #{filterPageVO.doctorName}
         </if>
         <if test="filterPageVO.casesId != null and filterPageVO.casesId != 0">
             AND d.cases_id = #{filterPageVO.casesId}
@@ -1752,7 +1760,15 @@
             </if>
         </if>
         <if test="filterPageVO.doctorName != null and filterPageVO.doctorName != ''">
-            AND a.doctor_name = #{filterPageVO.doctorName}
+            AND (case
+            when a.doctor_id != '' and a.doctor_id is not null then a.doctor_id
+            when (a.doctor_id = '' or a.doctor_id is null) and
+            a.director_doctor_id != '' and a.director_doctor_id is not null
+            then a.director_doctor_id
+            when (a.doctor_id = '' or a.doctor_id is null) and
+            (a.director_doctor_id = '' or a.director_doctor_id is null) and
+            a.beh_doctor_id != '' and a.beh_doctor_id is not null
+            then a.beh_doctor_id end)= #{filterPageVO.doctorName}
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name  =  #{filterPageVO.deptName}