Bläddra i källkod

sql逻辑调整

chengyao 3 år sedan
förälder
incheckning
6785448419

+ 6 - 18
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -6044,9 +6044,7 @@
             AND a.doctor_id = #{qcResultShortPageVO.doctorId}
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+            AND a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
         </if>
         <if test="qcResultShortPageVO.isReject != null">
             AND c.is_reject = #{qcResultShortPageVO.isReject}
@@ -10107,9 +10105,7 @@
             AND a.doctor_id = #{qcResultShortPageVO.doctorId}
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+            AND a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -10397,9 +10393,7 @@
             AND a.doctor_id = #{qcResultShortPageVO.doctorId}
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+            AND a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
         </if>
         <if test="qcResultShortPageVO.isReject != null">
             AND c.is_reject = #{qcResultShortPageVO.isReject}
@@ -12304,9 +12298,7 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         <if test="doctorName != null and doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{doctorName}, '%'))
+            AND a.doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
         </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -14306,9 +14298,7 @@
             AND a.doctor_id = #{qcResultShortPageVO.doctorId}
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+            AND a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
         </if>
         )be
         left join med_check_info mci
@@ -14529,9 +14519,7 @@
             AND a.doctor_id = #{qcResultShortPageVO.doctorId}
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
-            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
-            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+            AND a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
         </if>
         )be
         left join med_check_info mci

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

@@ -2347,7 +2347,7 @@
             AND a.doctor_id = #{filterPageByDeptVO.doctorId}
         </if>
         <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            AND a.doctor_name  like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
+            AND a.doctor_name =  #{filterPageByDeptVO.doctorName}
         </if>
         <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId != 0">
             AND d.cases_id = #{filterPageByDeptVO.casesId}
@@ -2423,7 +2423,7 @@
             AND a.beh_dept_name  =  #{filterPageByDeptVO.deptName}
         </if>
         <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            AND a.doctor_name  like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
+            AND a.doctor_name = #{filterPageByDeptVO.doctorName}
         </if>
         <if test="filterPageByDeptVO.deptId != null and filterPageByDeptVO.deptId != ''">
             AND a.beh_dept_id = #{filterPageByDeptVO.deptId}