|
@@ -523,20 +523,24 @@
|
|
|
) t
|
|
|
</select>
|
|
|
|
|
|
- <!-- 条目缺陷占比(分页) -->
|
|
|
- <select id="entryCountGroupByEntryPage" resultType="com.diagbot.dto.NumDTO">
|
|
|
+ <!-- 缺陷详情(分页) -->
|
|
|
+ <select id="entryCountGroupByEntryPage" resultType="com.diagbot.dto.CaseNumDTO">
|
|
|
SELECT t.*
|
|
|
FROM
|
|
|
(SELECT
|
|
|
t1.id,
|
|
|
t1.NAME,
|
|
|
+ t1.casesId,
|
|
|
+ t1.casesName,
|
|
|
count(*) AS num,
|
|
|
t2.totleNum
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
e.id AS id,
|
|
|
- e.NAME AS NAME
|
|
|
+ e.NAME AS NAME,
|
|
|
+ e.cases_id as casesId,
|
|
|
+ e.cases_name as casesName
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
med_home_page b,
|
|
@@ -569,6 +573,9 @@
|
|
|
<if test="filterPageVO.casesId != null and filterPageVO.casesId != 0">
|
|
|
AND d.cases_id = #{filterPageVO.casesId}
|
|
|
</if>
|
|
|
+ <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
|
+ AND e.cases_name like CONCAT('%', #{filterPageVO.casesName},'%')
|
|
|
+ </if>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -616,9 +623,12 @@
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
- <if test="filterPageVO.casesId != null and filterPageVO.casesId != ''">
|
|
|
+ <if test="filterPageVO.casesId != null and filterPageVO.casesId != 0">
|
|
|
AND d.cases_id = #{filterPageVO.casesId}
|
|
|
</if>
|
|
|
+ <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
|
+ AND e.cases_name like CONCAT('%', #{filterPageVO.casesName},'%')
|
|
|
+ </if>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -637,9 +647,10 @@
|
|
|
) t2
|
|
|
GROUP BY
|
|
|
t1.id,
|
|
|
- t1.NAME
|
|
|
- ORDER BY
|
|
|
- count(*) DESC)t
|
|
|
+ t1.NAME,
|
|
|
+ t1.casesId,
|
|
|
+ t1.casesName
|
|
|
+ )t
|
|
|
</select>
|
|
|
|
|
|
<!-- 质控平均分按科室统计(分页) -->
|
|
@@ -877,8 +888,8 @@
|
|
|
) t
|
|
|
</select>
|
|
|
|
|
|
- <!-- 条目缺陷占比-科室(分页) -->
|
|
|
- <select id="entryCountGroupByEntryAndDeptPage" resultType="com.diagbot.dto.DeptNumDTO">
|
|
|
+ <!-- 缺陷详情-科室(分页) -->
|
|
|
+ <select id="entryCountGroupByEntryAndDeptPage" resultType="com.diagbot.dto.CaseAndDeptNumDTO">
|
|
|
SELECT
|
|
|
t.*
|
|
|
FROM
|
|
@@ -886,6 +897,10 @@
|
|
|
SELECT
|
|
|
t1.id,
|
|
|
t1.NAME,
|
|
|
+ t1.casesId,
|
|
|
+ t1.casesName,
|
|
|
+ t1.deptId,
|
|
|
+ t1.deptName,
|
|
|
count(*) AS num,
|
|
|
t2.totleNum
|
|
|
FROM
|
|
@@ -893,6 +908,8 @@
|
|
|
SELECT
|
|
|
e.id,
|
|
|
e.NAME,
|
|
|
+ e.cases_id as casesId,
|
|
|
+ e.cases_name as casesName,
|
|
|
a.beh_dept_id AS deptId,
|
|
|
a.beh_dept_name AS deptName
|
|
|
FROM
|
|
@@ -928,9 +945,12 @@
|
|
|
AND d.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 != ''">
|
|
|
+ <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId != 0">
|
|
|
AND d.cases_id = #{filterPageByDeptVO.casesId}
|
|
|
</if>
|
|
|
+ <if test="filterPageByDeptVO.casesName != null and filterPageByDeptVO.casesName != ''">
|
|
|
+ AND e.cases_name like CONCAT('%', #{filterPageByDeptVO.casesName},'%')
|
|
|
+ </if>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND f.user_id = #{filterPageByDeptVO.userId}
|
|
|
</if>
|
|
@@ -988,9 +1008,12 @@
|
|
|
AND d.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 != ''">
|
|
|
+ <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId != 0">
|
|
|
AND d.cases_id = #{filterPageByDeptVO.casesId}
|
|
|
</if>
|
|
|
+ <if test="filterPageByDeptVO.casesName != null and filterPageByDeptVO.casesName != ''">
|
|
|
+ AND e.cases_name like CONCAT('%', #{filterPageByDeptVO.casesName},'%')
|
|
|
+ </if>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND f.user_id = #{filterPageByDeptVO.userId}
|
|
|
</if>
|
|
@@ -1016,10 +1039,10 @@
|
|
|
GROUP BY
|
|
|
t1.id,
|
|
|
t1.NAME,
|
|
|
+ t1.casesId,
|
|
|
+ t1.casesName,
|
|
|
t1.deptId,
|
|
|
t1.deptName
|
|
|
- ORDER BY
|
|
|
- count(*) DESC
|
|
|
)t
|
|
|
</select>
|
|
|
</mapper>
|