|
@@ -975,7 +975,7 @@
|
|
|
</select>
|
|
|
|
|
|
<!-- 缺陷详情(分页) -->
|
|
|
- <select id="entryCountGroupByEntryPage" resultType="com.diagbot.dto.CaseNumDTO">
|
|
|
+ <select id="entryCountGroupByEntryPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
SELECT t.*
|
|
|
FROM
|
|
|
(SELECT
|
|
@@ -983,6 +983,8 @@
|
|
|
t1.NAME,
|
|
|
t1.casesId,
|
|
|
t1.casesName,
|
|
|
+ t1.ruleType,
|
|
|
+ t1.isReject,
|
|
|
count(*) AS num,
|
|
|
t2.totleNum,
|
|
|
ROUND( count(*) /t2.totleNum , 4 ) AS percent,
|
|
@@ -993,7 +995,9 @@
|
|
|
e.id AS id,
|
|
|
e.NAME AS NAME,
|
|
|
e.cases_id as casesId,
|
|
|
- e.cases_name as casesName
|
|
|
+ e.cases_name as casesName,
|
|
|
+ e.rule_type as ruleType,
|
|
|
+ f.is_reject as isReject
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
|
|
@@ -1003,14 +1007,17 @@
|
|
|
med_qcresult_info c,
|
|
|
</if>
|
|
|
med_qcresult_detail d,
|
|
|
- qc_cases_entry e
|
|
|
+ qc_cases_entry e,
|
|
|
+ qc_cases_entry_hospital f
|
|
|
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 a.hospital_id = c.hospital_id
|
|
|
and a.hospital_id = d.hospital_id
|
|
|
+ and a.hospital_id = f.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND a.is_placefile = '1'
|
|
@@ -1019,6 +1026,7 @@
|
|
|
</if>
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
+ and e.id = f.cases_entry_id
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId != 0">
|
|
|
AND d.cases_id = #{filterPageVO.casesId}
|
|
@@ -1041,6 +1049,12 @@
|
|
|
<if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{filterPageVO.deptName},'%')
|
|
|
</if>
|
|
|
+ <if test="filterPageVO.ruleType != null">
|
|
|
+ AND e.rule_type = #{filterPageVO.ruleType}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isReject != null">
|
|
|
+ AND f.is_reject = #{filterPageVO.isReject}
|
|
|
+ </if>
|
|
|
) t1,(
|
|
|
SELECT
|
|
|
count(*) AS totleNum
|
|
@@ -1053,14 +1067,17 @@
|
|
|
med_qcresult_info c,
|
|
|
</if>
|
|
|
med_qcresult_detail d,
|
|
|
- qc_cases_entry e
|
|
|
+ qc_cases_entry e,
|
|
|
+ qc_cases_entry_hospital f
|
|
|
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 a.hospital_id = c.hospital_id
|
|
|
and a.hospital_id = d.hospital_id
|
|
|
+ and a.hospital_id = f.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND a.is_placefile = '1'
|
|
@@ -1069,6 +1086,7 @@
|
|
|
</if>
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
+ and e.id = f.cases_entry_id
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId != 0">
|
|
|
AND d.cases_id = #{filterPageVO.casesId}
|
|
@@ -1091,6 +1109,12 @@
|
|
|
<if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{filterPageVO.deptName},'%')
|
|
|
</if>
|
|
|
+ <if test="filterPageVO.ruleType != null">
|
|
|
+ AND e.rule_type = #{filterPageVO.ruleType}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isReject != null">
|
|
|
+ AND f.is_reject = #{filterPageVO.isReject}
|
|
|
+ </if>
|
|
|
) t2
|
|
|
GROUP BY
|
|
|
t1.id,
|
|
@@ -1324,7 +1348,7 @@
|
|
|
</select>
|
|
|
|
|
|
<!-- 缺陷详情-科室(分页) -->
|
|
|
- <select id="entryCountGroupByEntryAndDeptPage" resultType="com.diagbot.dto.CaseAndDeptNumDTO">
|
|
|
+ <select id="entryCountGroupByEntryAndDeptPage" resultType="com.diagbot.dto.DeptEntryNumDTO">
|
|
|
SELECT
|
|
|
t.*
|
|
|
FROM
|
|
@@ -1334,6 +1358,8 @@
|
|
|
t1.NAME,
|
|
|
t1.casesId,
|
|
|
t1.casesName,
|
|
|
+ t1.ruleType,
|
|
|
+ t1.isReject,
|
|
|
t1.deptId,
|
|
|
t1.deptName,
|
|
|
count(*) AS num,
|
|
@@ -1347,6 +1373,8 @@
|
|
|
e.NAME,
|
|
|
e.cases_id as casesId,
|
|
|
e.cases_name as casesName,
|
|
|
+ e.rule_type as ruleType,
|
|
|
+ g.is_reject as isReject,
|
|
|
a.beh_dept_id AS deptId,
|
|
|
a.beh_dept_name AS deptName
|
|
|
FROM
|
|
@@ -1359,16 +1387,19 @@
|
|
|
</if>
|
|
|
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 a.is_placefile = '1'
|
|
@@ -1377,6 +1408,7 @@
|
|
|
</if>
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
+ AND g.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId != 0">
|
|
@@ -1406,6 +1438,12 @@
|
|
|
<if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
|
|
|
AND a.doctor_name like CONCAT('%', #{filterPageByDeptVO.doctorName},'%')
|
|
|
</if>
|
|
|
+ <if test="filterPageByDeptVO.ruleType != null ">
|
|
|
+ AND e.rule_type = #{filterPageByDeptVO.ruleType}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageByDeptVO.isReject != null ">
|
|
|
+ AND g.is_reject = #{filterPageByDeptVO.isReject}
|
|
|
+ </if>
|
|
|
) t1,(
|
|
|
SELECT
|
|
|
count(*) AS totleNum
|
|
@@ -1419,16 +1457,19 @@
|
|
|
</if>
|
|
|
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 a.is_placefile = '1'
|
|
@@ -1437,6 +1478,7 @@
|
|
|
</if>
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
+ AND g.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId != 0">
|
|
@@ -1466,6 +1508,12 @@
|
|
|
<if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
|
|
|
AND a.doctor_name like CONCAT('%', #{filterPageByDeptVO.doctorName},'%')
|
|
|
</if>
|
|
|
+ <if test="filterPageByDeptVO.ruleType != null ">
|
|
|
+ AND e.rule_type = #{filterPageByDeptVO.ruleType}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageByDeptVO.isReject != null">
|
|
|
+ AND g.is_reject = #{filterPageByDeptVO.isReject}
|
|
|
+ </if>
|
|
|
) t2
|
|
|
GROUP BY
|
|
|
t1.id,
|