|
@@ -430,186 +430,31 @@
|
|
|
|
|
|
<!-- 条目缺陷占比(内页) -->
|
|
<!-- 条目缺陷占比(内页) -->
|
|
<select id="entryGroupByEntryInnerPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
<select id="entryGroupByEntryInnerPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
- SELECT
|
|
|
|
- tt2.id as id,
|
|
|
|
- tt2.name as name,
|
|
|
|
- tt2.cases_id as casesId,
|
|
|
|
- tt2.cases_name as casesName,
|
|
|
|
- tt1.num as num,
|
|
|
|
- tt1.is_reject as isReject
|
|
|
|
- FROM
|
|
|
|
- (
|
|
|
|
- SELECT
|
|
|
|
- a.hospital_id,
|
|
|
|
- d.cases_entry_id,
|
|
|
|
- d.cases_id,
|
|
|
|
- count(*) as num,
|
|
|
|
- d.is_reject
|
|
|
|
- FROM
|
|
|
|
- med_behospital_info a,
|
|
|
|
- med_qcresult_detail d
|
|
|
|
- WHERE
|
|
|
|
- a.is_deleted = 'N'
|
|
|
|
- AND d.is_deleted = 'N'
|
|
|
|
- AND a.hospital_id = d.hospital_id
|
|
|
|
- AND a.behospital_code = d.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>
|
|
|
|
- <if test="filterPageVO.isReject != null">
|
|
|
|
- AND d.is_reject = #{filterPageVO.isReject}
|
|
|
|
- </if>
|
|
|
|
- GROUP BY
|
|
|
|
- d.cases_entry_id,
|
|
|
|
- d.is_reject,
|
|
|
|
- d.cases_id
|
|
|
|
- ) tt1,
|
|
|
|
- qc_cases_entry tt2
|
|
|
|
- WHERE
|
|
|
|
- tt2.is_deleted = 'N'
|
|
|
|
- AND tt1.cases_id = tt2.cases_id
|
|
|
|
- AND tt1.cases_entry_id = tt2.id
|
|
|
|
- <if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
|
|
- AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
|
|
- AND tt2.cases_name = #{filterPageVO.casesName}
|
|
|
|
- </if>
|
|
|
|
-
|
|
|
|
- </select>
|
|
|
|
- <!-- 条目缺陷占比缺陷总量(内页) -->
|
|
|
|
- <select id="entryGroupByEntrySum" resultType="java.lang.Integer">
|
|
|
|
SELECT
|
|
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="isPlacefile != null and isPlacefile != ''">
|
|
|
|
- and a.is_placefile = #{isPlacefile}
|
|
|
|
- </if>
|
|
|
|
- AND a.qc_type_id != 0
|
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
|
- AND a.hospital_id = #{hospitalId}
|
|
|
|
- </if>
|
|
|
|
- <if test="isPlacefile != null and isPlacefile == 0">
|
|
|
|
- <if test="startDate != null and startDate != ''">
|
|
|
|
- <![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
|
|
- </if>
|
|
|
|
- <if test="endDate != null and endDate != ''">
|
|
|
|
- <![CDATA[ AND a.behospital_date <= #{endDate}]]>
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="isPlacefile != null and isPlacefile == 1">
|
|
|
|
- <if test="startDate != null and startDate != ''">
|
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
|
- </if>
|
|
|
|
- <if test="endDate != null and endDate != ''">
|
|
|
|
- <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <!-- 条目缺陷占比分值统计 -->
|
|
|
|
- <select id="entryGroupByEntryScore" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
|
- SELECT
|
|
|
|
- a.hospital_id as hospitalId,
|
|
|
|
-
|
|
|
|
- <if test="isPlacefile != null and isPlacefile == 0">
|
|
|
|
- a.score_run as score,
|
|
|
|
- </if>
|
|
|
|
- <if test="isPlacefile != null and isPlacefile == 1">
|
|
|
|
- a.score,
|
|
|
|
- </if>
|
|
|
|
- a.cases_entry_id as id
|
|
|
|
- FROM
|
|
|
|
- qc_cases_entry_hospital a
|
|
|
|
- WHERE
|
|
|
|
- a.is_deleted = 'N'
|
|
|
|
- AND a.hospital_id = #{hospitalId}
|
|
|
|
- AND a.cases_entry_id IN
|
|
|
|
- <foreach collection="ids" open="(" separator="," close=")" item="item">
|
|
|
|
- ${item}
|
|
|
|
- </foreach>
|
|
|
|
- </select>
|
|
|
|
- <!-- 条目缺陷占比原始数据统计(内页) -->
|
|
|
|
- <!-- <select id="entryGroupByEntryInnerPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
|
- SELECT
|
|
|
|
- t.*
|
|
|
|
- FROM
|
|
|
|
- (
|
|
|
|
- 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.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
|
|
|
|
- (
|
|
|
|
- SELECT
|
|
|
|
- tt2.id,
|
|
|
|
- tt2.NAME,
|
|
|
|
- tt2.cases_id AS casesId,
|
|
|
|
- tt2.cases_name AS casesName,
|
|
|
|
- <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
|
|
|
|
- tt3.score_run as score,
|
|
|
|
- </if>
|
|
|
|
- <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
|
|
|
|
- tt3.score,
|
|
|
|
- </if>
|
|
|
|
- tt1.num,
|
|
|
|
- tt1.is_reject AS isReject
|
|
|
|
|
|
+ tt2.id as id,
|
|
|
|
+ tt2.name as name,
|
|
|
|
+ tt2.cases_id as casesId,
|
|
|
|
+ tt2.cases_name as casesName,
|
|
|
|
+ tt1.num as num,
|
|
|
|
+ tt1.is_reject as isReject
|
|
FROM
|
|
FROM
|
|
(
|
|
(
|
|
SELECT
|
|
SELECT
|
|
a.hospital_id,
|
|
a.hospital_id,
|
|
d.cases_entry_id,
|
|
d.cases_entry_id,
|
|
d.cases_id,
|
|
d.cases_id,
|
|
- count(*) AS num,
|
|
|
|
|
|
+ count(*) as num,
|
|
d.is_reject
|
|
d.is_reject
|
|
FROM
|
|
FROM
|
|
med_behospital_info a,
|
|
med_behospital_info a,
|
|
- med_qcresult_info c,
|
|
|
|
med_qcresult_detail d
|
|
med_qcresult_detail d
|
|
WHERE
|
|
WHERE
|
|
a.is_deleted = 'N'
|
|
a.is_deleted = 'N'
|
|
- AND c.is_deleted = 'N'
|
|
|
|
AND d.is_deleted = 'N'
|
|
AND d.is_deleted = 'N'
|
|
- AND a.hospital_id = c.hospital_id
|
|
|
|
AND a.hospital_id = d.hospital_id
|
|
AND a.hospital_id = d.hospital_id
|
|
- AND a.behospital_code = c.behospital_code
|
|
|
|
AND a.behospital_code = d.behospital_code
|
|
AND a.behospital_code = d.behospital_code
|
|
<if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
<if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
- and a.is_placefile = #{filterPageVO.isPlacefile}
|
|
|
|
|
|
+ AND a.is_placefile = #{filterPageVO.isPlacefile}
|
|
</if>
|
|
</if>
|
|
AND a.qc_type_id != 0
|
|
AND a.qc_type_id != 0
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
@@ -639,23 +484,21 @@
|
|
d.is_reject,
|
|
d.is_reject,
|
|
d.cases_id
|
|
d.cases_id
|
|
) tt1,
|
|
) tt1,
|
|
- qc_cases_entry tt2,
|
|
|
|
- qc_cases_entry_hospital tt3
|
|
|
|
|
|
+ qc_cases_entry tt2
|
|
WHERE
|
|
WHERE
|
|
tt2.is_deleted = 'N'
|
|
tt2.is_deleted = 'N'
|
|
- AND tt3.is_deleted = 'N'
|
|
|
|
- AND tt1.hospital_id = tt3.hospital_id
|
|
|
|
AND tt1.cases_id = tt2.cases_id
|
|
AND tt1.cases_id = tt2.cases_id
|
|
AND tt1.cases_entry_id = tt2.id
|
|
AND tt1.cases_entry_id = tt2.id
|
|
- AND tt1.cases_entry_id = tt3.cases_entry_id
|
|
|
|
<if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
<if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
|
|
AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
|
|
</if>
|
|
</if>
|
|
<if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
<if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
AND tt2.cases_name = #{filterPageVO.casesName}
|
|
AND tt2.cases_name = #{filterPageVO.casesName}
|
|
</if>
|
|
</if>
|
|
- ) t1,
|
|
|
|
- (
|
|
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+ <!-- 条目缺陷占比缺陷总量(内页) -->
|
|
|
|
+ <select id="entryGroupByEntrySum" resultType="java.lang.Integer">
|
|
SELECT
|
|
SELECT
|
|
count(*) AS mrNum
|
|
count(*) AS mrNum
|
|
FROM
|
|
FROM
|
|
@@ -666,32 +509,189 @@
|
|
AND c.is_deleted = 'N'
|
|
AND c.is_deleted = 'N'
|
|
AND a.hospital_id = c.hospital_id
|
|
AND a.hospital_id = c.hospital_id
|
|
AND a.behospital_code = c.behospital_code
|
|
AND a.behospital_code = c.behospital_code
|
|
- <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
|
|
- and a.is_placefile = #{filterPageVO.isPlacefile}
|
|
|
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
</if>
|
|
</if>
|
|
AND a.qc_type_id != 0
|
|
AND a.qc_type_id != 0
|
|
- <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
|
- AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
|
|
|
|
+ <if test="hospitalId != null and hospitalId != ''">
|
|
|
|
+ AND a.hospital_id = #{hospitalId}
|
|
</if>
|
|
</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 test="isPlacefile != null and isPlacefile == 0">
|
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
|
+ <![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
</if>
|
|
</if>
|
|
- <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
|
- <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
|
|
|
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
|
+ <![CDATA[ AND a.behospital_date <= #{endDate}]]>
|
|
</if>
|
|
</if>
|
|
</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 test="isPlacefile != null and isPlacefile == 1">
|
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
</if>
|
|
</if>
|
|
- <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
|
- <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
|
|
|
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
- ) t2
|
|
|
|
- ) t
|
|
|
|
- </select>-->
|
|
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!-- 条目缺陷占比分值统计 -->
|
|
|
|
+ <select id="entryGroupByEntryScore" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
|
+ SELECT
|
|
|
|
+ a.hospital_id as hospitalId,
|
|
|
|
+
|
|
|
|
+ <if test="isPlacefile != null and isPlacefile == 0">
|
|
|
|
+ a.score_run as score,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isPlacefile != null and isPlacefile == 1">
|
|
|
|
+ a.score,
|
|
|
|
+ </if>
|
|
|
|
+ a.cases_entry_id as id
|
|
|
|
+ FROM
|
|
|
|
+ qc_cases_entry_hospital a
|
|
|
|
+ WHERE
|
|
|
|
+ a.is_deleted = 'N'
|
|
|
|
+ AND a.hospital_id = #{hospitalId}
|
|
|
|
+ AND a.cases_entry_id IN
|
|
|
|
+ <foreach collection="ids" open="(" separator="," close=")" item="item">
|
|
|
|
+ ${item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </select>
|
|
|
|
+ <!-- 条目缺陷占比原始数据统计(内页) -->
|
|
|
|
+ <!-- <select id="entryGroupByEntryInnerPage" resultType="com.diagbot.dto.EntryNumDTO">
|
|
|
|
+ SELECT
|
|
|
|
+ t.*
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ 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.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
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ tt2.id,
|
|
|
|
+ tt2.NAME,
|
|
|
|
+ tt2.cases_id AS casesId,
|
|
|
|
+ tt2.cases_name AS casesName,
|
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
|
|
|
|
+ tt3.score_run as score,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
|
|
|
|
+ tt3.score,
|
|
|
|
+ </if>
|
|
|
|
+ tt1.num,
|
|
|
|
+ tt1.is_reject AS isReject
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ a.hospital_id,
|
|
|
|
+ d.cases_entry_id,
|
|
|
|
+ d.cases_id,
|
|
|
|
+ count(*) AS num,
|
|
|
|
+ d.is_reject
|
|
|
|
+ FROM
|
|
|
|
+ med_behospital_info a,
|
|
|
|
+ med_qcresult_info c,
|
|
|
|
+ med_qcresult_detail d
|
|
|
|
+ WHERE
|
|
|
|
+ a.is_deleted = 'N'
|
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
|
+ AND d.is_deleted = 'N'
|
|
|
|
+ AND a.hospital_id = c.hospital_id
|
|
|
|
+ AND a.hospital_id = d.hospital_id
|
|
|
|
+ AND a.behospital_code = c.behospital_code
|
|
|
|
+ AND a.behospital_code = d.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>
|
|
|
|
+ <if test="filterPageVO.isReject != null">
|
|
|
|
+ AND d.is_reject = #{filterPageVO.isReject}
|
|
|
|
+ </if>
|
|
|
|
+ GROUP BY
|
|
|
|
+ d.cases_entry_id,
|
|
|
|
+ d.is_reject,
|
|
|
|
+ d.cases_id
|
|
|
|
+ ) tt1,
|
|
|
|
+ qc_cases_entry tt2,
|
|
|
|
+ qc_cases_entry_hospital tt3
|
|
|
|
+ WHERE
|
|
|
|
+ tt2.is_deleted = 'N'
|
|
|
|
+ AND tt3.is_deleted = 'N'
|
|
|
|
+ AND tt1.hospital_id = tt3.hospital_id
|
|
|
|
+ AND tt1.cases_id = tt2.cases_id
|
|
|
|
+ AND tt1.cases_entry_id = tt2.id
|
|
|
|
+ AND tt1.cases_entry_id = tt3.cases_entry_id
|
|
|
|
+ <if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
|
|
+ AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
|
|
|
|
+ AND tt2.cases_name = #{filterPageVO.casesName}
|
|
|
|
+ </if>
|
|
|
|
+ ) 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
|
|
|
|
+ ) t
|
|
|
|
+ </select>-->
|
|
<!-- 单项否决缺陷占比(首页) -->
|
|
<!-- 单项否决缺陷占比(首页) -->
|
|
<select id="entryRejectPercent" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.EntryNumDTO">
|
|
<select id="entryRejectPercent" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.EntryNumDTO">
|
|
SELECT
|
|
SELECT
|