Browse Source

病案首页合格率占比增加deptId、doctorId条件查询

chengyao 3 years ago
parent
commit
06c4841a29

+ 5 - 0
src/main/java/com/diagbot/vo/FilterPageVO.java

@@ -61,6 +61,11 @@ public class FilterPageVO extends Page {
      */
     private String doctorName;
 
+    /**
+     * 医生id
+     */
+    private String doctorId;
+
     /**
      * 模块id:243=病案首页
      */

+ 5 - 0
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -64,6 +64,11 @@ public class QcResultShortPageVO extends Page {
      * 科室名称
      */
     private String deptName;
+
+    /**
+     * 科室id
+     */
+    private String deptId;
     /**
      * 医生姓名
      */

+ 17 - 11
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -5492,6 +5492,9 @@
         <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
         </if>
+        <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
+            AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
+        </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
         </if>
@@ -5514,9 +5517,9 @@
             AND d.cases_id = #{qcResultShortPageVO.casesId}
         </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
-            AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
-            OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
-            OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
+            AND (a.doctor_id = #{qcResultShortPageVO.doctorId}
+            OR a.beh_doctor_id = #{qcResultShortPageVO.doctorId}
+            OR a.director_doctor_id = #{qcResultShortPageVO.doctorId})
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
             AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
@@ -9575,13 +9578,13 @@
         <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
         </if>
-        <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
-            AND a.doctor_name = #{qcResultShortPageVO.doctorName}
+        <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
+            AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
         </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
-            AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
-            OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
-            OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
+            AND (a.doctor_id = #{qcResultShortPageVO.doctorId}
+            OR a.beh_doctor_id = #{qcResultShortPageVO.doctorId}
+            OR a.director_doctor_id = #{qcResultShortPageVO.doctorId})
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
             AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
@@ -9846,6 +9849,9 @@
         <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
             AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
         </if>
+        <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
+            AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
+        </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
         </if>
@@ -9868,9 +9874,9 @@
             AND d.cases_id = #{qcResultShortPageVO.casesId}
         </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
-            AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
-            OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
-            OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
+            AND (a.doctor_id = #{qcResultShortPageVO.doctorId}
+            OR a.beh_doctor_id = #{qcResultShortPageVO.doctorId}
+            OR a.director_doctor_id = #{qcResultShortPageVO.doctorId})
         </if>
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
             AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )

+ 12 - 0
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -2134,6 +2134,12 @@
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
         </if>
+        <if test="filterPageByDeptVO.deptId != null and filterPageByDeptVO.deptId != ''">
+            AND a.beh_dept_id = #{filterPageByDeptVO.deptId}
+        </if>
+        <if test="filterPageByDeptVO.doctorId != null and filterPageByDeptVO.doctorId != ''">
+            AND a.doctor_id = #{filterPageByDeptVO.doctorId}
+        </if>
         <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
             AND a.doctor_name  like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
         </if>
@@ -2212,6 +2218,12 @@
         <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
             AND a.doctor_name  like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
         </if>
+        <if test="filterPageByDeptVO.deptId != null and filterPageByDeptVO.deptId != ''">
+            AND a.beh_dept_id = #{filterPageByDeptVO.deptId}
+        </if>
+        <if test="filterPageByDeptVO.doctorId != null and filterPageByDeptVO.doctorId != ''">
+            AND a.doctor_id = #{filterPageByDeptVO.doctorId}
+        </if>
         <if test="filterPageByDeptVO.isReject != null">
             AND d.is_reject = #{filterPageByDeptVO.isReject}
         </if>