|
@@ -4110,6 +4110,8 @@
|
|
|
|
|
|
<resultMap id="ExportExcelMapByDept" type="com.diagbot.dto.ExportExcelByDeptDTO">
|
|
|
<result column="behDeptName" property="behDeptName"/>
|
|
|
+ <result column="wardName" property="wardName"/>
|
|
|
+ <result column="medoupName" property="medoupName"/>
|
|
|
<result column="doctorName" property="doctorName"/>
|
|
|
<result column="avgScore" property="avgScore"/>
|
|
|
<collection property="excelBehospitalDTOS"
|
|
@@ -5366,7 +5368,7 @@
|
|
|
|
|
|
<!-- 条目缺陷质控评分页-科室(内页)-->
|
|
|
<select id="qcResultShortByDeptPage" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
|
- SELECT t.*
|
|
|
+ SELECT t.*,t3.name as medoupName
|
|
|
FROM
|
|
|
(SELECT DISTINCT
|
|
|
t1.hospital_id AS hospitalId,
|
|
@@ -5491,6 +5493,9 @@
|
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
|
</if>
|
|
@@ -5591,7 +5596,17 @@
|
|
|
AND t3.is_deleted = 'N'
|
|
|
</if>
|
|
|
) t
|
|
|
- where 1=1
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
+ where
|
|
|
+ <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
+ t2.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
+ and t3.name = #{qcResultShortPageVO.medoupName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
@@ -9417,7 +9432,7 @@
|
|
|
|
|
|
<!--缺陷详情质控评分页导出-科室-->
|
|
|
<select id="qcResultShortByDeptPageExport" resultMap="ExportExcelMapByDept">
|
|
|
- SELECT * from(
|
|
|
+ SELECT m.*, t3.name as medoupName from(
|
|
|
SELECT
|
|
|
f1.*,
|
|
|
f2.avgScore
|
|
@@ -9550,6 +9565,9 @@
|
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
|
</if>
|
|
@@ -9821,6 +9839,9 @@
|
|
|
<if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.wardName != null and qcResultShortPageVO.wardName != ''">
|
|
|
+ AND a.ward_name LIKE CONCAT( '%', #{qcResultShortPageVO.wardName}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
|
</if>
|
|
@@ -9953,7 +9974,18 @@
|
|
|
WHERE
|
|
|
f1.doctorId = f2.doctorId
|
|
|
AND f1.doctorName = f2.doctorName
|
|
|
- )m
|
|
|
+ AND f1.doctorName = f2.doctorName
|
|
|
+ )m LEFT JOIN bas_doctor_info t2 ON m.doctorId = t2.doctor_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
+ where
|
|
|
+ <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
+ t2.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
+ AND t3.name LIKE CONCAT( '%', #{qcResultShortPageVO.medoupName}, '%' )
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<!-- 条目缺陷评分详情页导出-->
|
|
|
<select id="qcResultShortPageExport" resultMap="ExportExcelMap">
|