ソースを参照

Merge remote-tracking branch 'origin/dev/20200702_1.3.7' into dev/20200702_1.3.7

zhaops 5 年 前
コミット
5c7241db14

+ 1 - 0
src/main/java/com/diagbot/vo/ExportQcresultVO.java

@@ -27,4 +27,5 @@ public class ExportQcresultVO {
     private String doctorCode;
     private String deptId;
     private String name;
+    private Integer checkStatus;
 }

+ 42 - 3
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -2265,6 +2265,8 @@
 
     <!-- 质控评分导出到excel-->
     <select id="exportQcresult" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
+        SELECT * FROM (
+        SELECT tp.*,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END checkStatus FROM (
         SELECT
         t1.behDeptId,
         t1.behDeptName,
@@ -2400,11 +2402,24 @@
         t1.behDoctorName,
         t1.patName,
         t1.behospitalCode,
-        t1.caseName
+        t1.caseName)tp LEFT JOIN
+        (SELECT
+        *
+        FROM
+        med_check_info
+        WHERE is_deleted = 'N') g
+        ON tp.behospitalCode = g.behospital_code
+        AND tp.hospitalId = g.hospital_id ) tu
+        where tu.checkStatus is not null
+        <if test="checkStatus != null ">
+            and tu.checkStatus = #{checkStatus}
+        </if>
     </select>
 
     <!-- 科室质控评分导出到excel-->
     <select  id="exportQcresultByDept" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
+        SELECT * FROM (
+        SELECT tp.*,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END checkStatus FROM (
         SELECT
         t1.behDeptId,
         t1.behDeptName,
@@ -2554,11 +2569,24 @@
         t1.behDoctorName,
         t1.patName,
         t1.behospitalCode,
-        t1.caseName
+        t1.caseName)tp LEFT JOIN
+        (SELECT
+        *
+        FROM
+        med_check_info
+        WHERE is_deleted = 'N') g
+        ON tp.behospitalCode = g.behospital_code
+        AND tp.hospitalId = g.hospital_id ) tu
+        where tu.checkStatus is not null
+        <if test="checkStatus != null ">
+            and tu.checkStatus = #{checkStatus}
+        </if>
     </select>
 
     <!-- 医疗组质控评分导出到excel-->
     <select  id="exportQcresultByGroup" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
+        SELECT * FROM (
+        SELECT tp.*,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END checkStatus FROM (
         SELECT
         t1.behDeptId,
         t1.behDeptName,
@@ -2714,7 +2742,18 @@
         t1.behDoctorName,
         t1.patName,
         t1.behospitalCode,
-        t1.caseName
+        t1.caseName)tp LEFT JOIN
+        (SELECT
+        *
+        FROM
+        med_check_info
+        WHERE is_deleted = 'N') g
+        ON tp.behospitalCode = g.behospital_code
+        AND tp.hospitalId = g.hospital_id ) tu
+        WHERE tu.checkStatus IS NOT NULL
+        <if test="checkStatus != null ">
+            and tu.checkStatus = #{checkStatus}
+        </if>
     </select>
 
     <!-- 条目缺陷质控评分页(内页)-->