|
@@ -686,15 +686,22 @@
|
|
|
</select>
|
|
|
|
|
|
<!-- 条目缺陷占比-科室(内页) -->
|
|
|
- <select id="entryGroupByEntryAndDeptInnerPage" resultType="com.diagbot.dto.DeptNumDTO">
|
|
|
- SELECT t.*
|
|
|
+ <select id="entryGroupByEntryAndDeptInnerPage" resultType="com.diagbot.dto.DeptEntryNumDTO">
|
|
|
+ SELECT
|
|
|
+ t.*
|
|
|
FROM
|
|
|
- (SELECT
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
t1.deptId AS deptId,
|
|
|
t1.deptName AS deptName,
|
|
|
+ t1.id AS id,
|
|
|
t1.NAME AS NAME,
|
|
|
+ t1.casesId AS casesId,
|
|
|
+ t1.casesName AS casesName,
|
|
|
t1.num AS num,
|
|
|
t2.mrNum AS totleNum,
|
|
|
+ t1.score AS score,
|
|
|
+ t1.isReject AS isReject,
|
|
|
Round( t1.num / t2.mrNum, 4 ) AS percent,
|
|
|
CONCAT( Round( t1.num / t2.mrNum * 100, 2 ), '%' ) AS percentStr
|
|
|
FROM
|
|
@@ -704,26 +711,34 @@
|
|
|
e.NAME,
|
|
|
a.beh_dept_id AS deptId,
|
|
|
a.beh_dept_name AS deptName,
|
|
|
- count(*) AS num
|
|
|
+ e.cases_id AS casesId,
|
|
|
+ e.cases_name AS casesName,
|
|
|
+ count(*) AS num,
|
|
|
+ g.score,
|
|
|
+ g.is_reject AS isReject
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
med_qcresult_info c,
|
|
|
med_qcresult_detail d,
|
|
|
qc_cases_entry e,
|
|
|
- sys_user_dept f
|
|
|
+ sys_user_dept f,
|
|
|
+ qc_cases_entry_hospital g
|
|
|
WHERE
|
|
|
a.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 = c.hospital_id
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
|
+ AND a.hospital_id = g.hospital_id
|
|
|
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 e.id = g.cases_entry_id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
AND a.is_placefile = '1'
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
@@ -745,11 +760,19 @@
|
|
|
<if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
|
|
|
AND e.name like CONCAT('%', #{filterPageByDeptVO.name},'%')
|
|
|
</if>
|
|
|
+ <if test="filterPageByDeptVO.casesName != null and filterPageByDeptVO.casesName != ''">
|
|
|
+ AND e.cases_name = #{filterPageByDeptVO.casesName}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageByDeptVO.isReject != null">
|
|
|
+ AND g.is_reject = #{filterPageByDeptVO.isReject}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
e.id,
|
|
|
e.NAME,
|
|
|
a.beh_dept_id,
|
|
|
- a.beh_dept_name
|
|
|
+ a.beh_dept_name,
|
|
|
+ e.cases_id,
|
|
|
+ e.cases_name
|
|
|
) t1,
|
|
|
(
|
|
|
SELECT
|
|
@@ -770,7 +793,6 @@
|
|
|
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">
|
|
|
AND f.user_id = #{filterPageByDeptVO.userId}
|
|
|
</if>
|