|
@@ -430,6 +430,107 @@
|
|
|
|
|
|
<!-- 条目缺陷占比(内页) -->
|
|
|
<select id="entryGroupByEntryInnerPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
+ SELECT
|
|
|
+ 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.isReject AS isReject,
|
|
|
+ t1.score AS score,
|
|
|
+ Round( t1.num / t2.mrNum, 4 ) AS percent,
|
|
|
+ CONCAT( Round( t1.num / t2.mrNum * 100, 2 ), '%' ) AS percentStr
|
|
|
+ from(
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ name,
|
|
|
+ casesId,
|
|
|
+ casesName,
|
|
|
+ isReject,
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
|
|
|
+ score_run as score,
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
|
|
|
+ score,
|
|
|
+ </if>
|
|
|
+ count(*) num
|
|
|
+ from new_table_name
|
|
|
+ WHERE
|
|
|
+ is_deleted = 'N'
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
|
+ and is_placefile = #{filterPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
+ AND qc_type_id != 0
|
|
|
+ <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
+ AND hospital_id = #{filterPageVO.hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
|
|
|
+ <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
|
|
|
+ <![CDATA[ AND behospital_date >= #{filterPageVO.startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
+ <![CDATA[ AND behospital_date <= #{filterPageVO.endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
|
|
|
+ <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
|
|
|
+ <![CDATA[ AND leave_hospital_date >= #{filterPageVO.startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
+ <![CDATA[ AND leave_hospital_date <= #{filterPageVO.endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isReject != null">
|
|
|
+ AND is_reject = #{filterPageVO.isReject}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
|
+ AND name like CONCAT('%', #{filterPageVO.name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
|
+ AND cases_name = #{filterPageVO.casesName}
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ id,
|
|
|
+ isReject,
|
|
|
+ casesId)t1,
|
|
|
+
|
|
|
+ ( SELECT
|
|
|
+ count(*) AS mrNum
|
|
|
+ FROM
|
|
|
+ med_behospital_info a,
|
|
|
+ med_qcresult_info c
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
+ AND a.hospital_id = c.hospital_id
|
|
|
+ AND a.behospital_code = c.behospital_code
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{filterPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
+ AND a.qc_type_id != 0
|
|
|
+ <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
+ AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
|
|
|
+ <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
|
|
|
+ <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
+ <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
|
|
|
+ <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ )t2
|
|
|
+ </select>
|
|
|
+ <!-- <select id="entryGroupByEntryInnerPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
SELECT
|
|
|
t.*
|
|
|
FROM
|
|
@@ -564,7 +665,7 @@
|
|
|
) t2
|
|
|
) t
|
|
|
</select>
|
|
|
-
|
|
|
+-->
|
|
|
<!-- 单项否决缺陷占比(首页) -->
|
|
|
<select id="entryRejectPercent" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
SELECT
|