|
@@ -24,15 +24,11 @@
|
|
|
count(1)
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
- a.hospital_id = b.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
- AND a.hospital_id = c.hospital_id
|
|
|
+ a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
@@ -58,16 +54,13 @@
|
|
|
COUNT(*)
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -100,16 +93,13 @@
|
|
|
concat( ROUND( sum( c.`level` = '丙' )/ count(*)* 100, 2 ), '%' ) AS thirdPercent
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -133,27 +123,24 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases e,
|
|
|
qc_cases_entry f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.id
|
|
|
AND d.cases_entry_id = f.id
|
|
|
AND e.id = f.cases_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -185,24 +172,21 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases_entry e
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -222,16 +206,13 @@
|
|
|
count(*) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -265,24 +246,21 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases_entry e
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -293,6 +271,9 @@
|
|
|
<if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
|
|
|
</if>
|
|
|
+ <if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
|
+ AND e.name like CONCAT('%', #{filterPageVO.name},'%')
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
e.id,
|
|
|
e.NAME
|
|
@@ -302,16 +283,13 @@
|
|
|
count(*) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -336,16 +314,13 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -372,24 +347,21 @@
|
|
|
e.dept_name as deptClass
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
bas_dept_info d,
|
|
|
bas_dept_info e
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = e.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = d.dept_id
|
|
|
AND d.parent_dept_id = e.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -416,20 +388,17 @@
|
|
|
COUNT(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
sys_user_dept d
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = d.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND d.user_id = #{userId}
|
|
@@ -464,7 +433,6 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases e,
|
|
@@ -472,23 +440,21 @@
|
|
|
sys_user_dept g
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
AND g.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = g.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.id
|
|
|
AND d.cases_entry_id = f.id
|
|
|
AND e.id = f.cases_id
|
|
|
AND a.beh_dept_id = g.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND g.user_id = #{userId}
|
|
@@ -529,28 +495,25 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases_entry e,
|
|
|
sys_user_dept f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND f.user_id = #{userId}
|
|
@@ -577,20 +540,17 @@
|
|
|
count(*) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
sys_user_dept f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND f.user_id = #{userId}
|
|
@@ -638,28 +598,25 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases_entry e,
|
|
|
sys_user_dept f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND f.user_id = #{filterPageByDeptVO.userId}
|
|
@@ -676,6 +633,9 @@
|
|
|
<if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
|
|
|
</if>
|
|
|
+ <if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
|
|
|
+ AND e.name like CONCAT('%', #{filterPageByDeptVO.name},'%')
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
e.id,
|
|
|
e.NAME,
|
|
@@ -689,20 +649,17 @@
|
|
|
count(*) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
sys_user_dept f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
@@ -758,27 +715,24 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases e,
|
|
|
qc_cases_entry f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.id
|
|
|
AND d.cases_entry_id = f.id
|
|
|
AND e.id = f.cases_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -804,16 +758,13 @@
|
|
|
COUNT(*) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -877,7 +828,6 @@
|
|
|
e.cases_name as casesName
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
|
|
|
med_qcresult_cases c,
|
|
|
</if>
|
|
@@ -888,16 +838,14 @@
|
|
|
qc_cases_entry e
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
and e.is_deleted='N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
and a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
|
|
|
AND c.cases_id = d.cases_id
|
|
|
</if>
|
|
@@ -930,7 +878,6 @@
|
|
|
count(*) AS totleNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
|
|
|
med_qcresult_cases c,
|
|
|
</if>
|
|
@@ -941,16 +888,14 @@
|
|
|
qc_cases_entry e
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
and e.is_deleted='N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
and a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
|
|
|
AND c.cases_id = d.cases_id
|
|
|
</if>
|
|
@@ -999,16 +944,13 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -1044,16 +986,13 @@
|
|
|
concat( ROUND( sum( c.`level` = '丙' )/ count(*)* 100, 2 ), '%' ) AS thirdPercent
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -1105,7 +1044,6 @@
|
|
|
count(*) AS num
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases e,
|
|
@@ -1113,23 +1051,21 @@
|
|
|
sys_user_dept g
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
AND g.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = g.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.id
|
|
|
AND d.cases_entry_id = f.id
|
|
|
AND e.id = f.cases_id
|
|
|
AND a.beh_dept_id = g.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND g.user_id = #{filterPageByDeptVO.userId}
|
|
@@ -1162,20 +1098,17 @@
|
|
|
COUNT(*) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
med_qcresult_info c,
|
|
|
sys_user_dept d
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = d.dept_id
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND d.user_id = #{filterPageByDeptVO.userId}
|
|
@@ -1250,7 +1183,6 @@
|
|
|
a.beh_dept_name AS deptName
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
<if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
|
|
|
med_qcresult_cases c,
|
|
|
</if>
|
|
@@ -1262,18 +1194,16 @@
|
|
|
sys_user_dept f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
|
|
|
AND c.cases_id = d.cases_id
|
|
|
</if>
|
|
@@ -1313,7 +1243,6 @@
|
|
|
count(*) AS totleNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
- med_home_page b,
|
|
|
<if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
|
|
|
med_qcresult_cases c,
|
|
|
</if>
|
|
@@ -1325,18 +1254,16 @@
|
|
|
sys_user_dept f
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND b.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND f.is_deleted = 'N'
|
|
|
- AND a.hospital_id = b.hospital_id
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
- AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
+ AND a.is_placefile = '1'
|
|
|
<if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
|
|
|
AND c.cases_id = d.cases_id
|
|
|
</if>
|