浏览代码

统计增加qc_type_id过滤条件

zhaops 5 年之前
父节点
当前提交
dc016d80a5

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

@@ -125,6 +125,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -154,6 +155,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -195,6 +197,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -225,6 +228,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -255,6 +259,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -291,6 +296,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -323,6 +329,7 @@
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -496,6 +503,7 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -530,6 +538,7 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND b.home_page_id = c.home_page_id
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -559,6 +568,7 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
+        AND a.qc_type_id IS NOT NULL
         <if test="death!=null and death==1">
             AND b.leave_hospital_type = '死亡'
         </if>
@@ -601,6 +611,7 @@
         AND a.behospital_code = b.behospital_code
         AND b.home_page_id = d.home_page_id
         AND a.beh_dept_id = c.dept_id
+        AND a.qc_type_id IS NOT NULL
         <if test="userId!=null">
             AND c.user_id = #{userId}
         </if>

+ 2 - 0
src/main/resources/mapper/HomePageMapper.xml

@@ -154,6 +154,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -184,6 +185,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>

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

@@ -30,6 +30,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -63,6 +64,7 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -104,6 +106,7 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -147,6 +150,7 @@
         AND d.cases_id = e.id
         AND d.cases_entry_id = f.id
         AND e.id = f.cases_id
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -183,6 +187,7 @@
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -217,6 +222,7 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.qc_type_id IS NOT NULL
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -253,6 +259,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
+        AND a.qc_type_id IS NOT NULL
         <if test="userId!=null">
             AND d.user_id = #{userId}
         </if>
@@ -311,6 +318,7 @@
         AND d.cases_entry_id = f.id
         AND e.id = f.cases_id
         AND a.beh_dept_id = g.dept_id
+        AND a.qc_type_id IS NOT NULL
         <if test="userId!=null">
             AND g.user_id = #{userId}
         </if>
@@ -358,6 +366,7 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.beh_dept_id = e.dept_id
+        AND a.qc_type_id IS NOT NULL
         <if test="userId!=null">
             AND e.user_id = #{userId}
         </if>