浏览代码

bug修改

chengyao 3 年之前
父节点
当前提交
17e320ed27
共有 1 个文件被更改,包括 10 次插入11 次删除
  1. 10 11
      src/main/resources/mapper/BehospitalInfoMapper.xml

+ 10 - 11
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -4575,13 +4575,9 @@
     <select  id="exportQcresultByDept" resultMap="ExportExcelMapByDept" parameterType="com.diagbot.vo.ExportQcresultVO">
     <select  id="exportQcresultByDept" resultMap="ExportExcelMapByDept" parameterType="com.diagbot.vo.ExportQcresultVO">
         SELECT * FROM (
         SELECT * FROM (
         SELECT tp.*,t3.name as medoup_name,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
         SELECT tp.*,t3.name as medoup_name,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
-        CASE WHEN ISNULL(h.status) THEN 0 ELSE h.status END mr_status,
         g.check_type AS ch_type,
         g.check_type AS ch_type,
-        h.check_type AS mr_type,
         g.check_name AS ch_name,
         g.check_name AS ch_name,
-        h.check_name AS mr_name,
-        g.check_time AS ch_time,
-        h.check_time AS mr_time
+        g.check_time AS ch_time
         FROM (
         FROM (
         SELECT
         SELECT
         t1.behDeptId,
         t1.behDeptId,
@@ -4788,12 +4784,9 @@
         </if>
         </if>
         t1.behospitalCode
         t1.behospitalCode
         )tp
         )tp
-        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
+        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type in(0,2) ) g
         ON tp.behospitalCode = g.behospital_code
         ON tp.behospitalCode = g.behospital_code
         AND tp.hospitalId = g.hospital_id
         AND tp.hospitalId = g.hospital_id
-        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
-        ON tp.behospitalCode = h.behospital_code
-        AND tp.hospitalId = h.hospital_id
         LEFT JOIN bas_doctor_info t2 ON tp.doctorId = t2.doctor_id
         LEFT JOIN bas_doctor_info t2 ON tp.doctorId = t2.doctor_id
         AND tp.hospitalId = t2.hospital_id
         AND tp.hospitalId = t2.hospital_id
         AND t2.is_deleted = 'N'
         AND t2.is_deleted = 'N'
@@ -5103,6 +5096,7 @@
         t1.behDeptId,
         t1.behDeptId,
         t1.behDeptName,
         t1.behDeptName,
         t1.doctorName,
         t1.doctorName,
+        t1.fileCode,
         t1.patName,
         t1.patName,
         t1.behospitalCode,
         t1.behospitalCode,
         t1.hospitalId,
         t1.hospitalId,
@@ -5120,6 +5114,7 @@
         SELECT
         SELECT
         a.doctor_name AS doctorName,
         a.doctor_name AS doctorName,
         a.beh_doctor_name,
         a.beh_doctor_name,
+        a.file_code as fileCode,
         a.director_doctor_name,
         a.director_doctor_name,
         a.`name` AS patName,
         a.`name` AS patName,
         a.behospital_code AS behospitalCode,
         a.behospital_code AS behospitalCode,
@@ -5280,6 +5275,8 @@
         <if test="name != null and name != ''">
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
             AND a.name like CONCAT('%',#{name},'%')
         </if>
         </if>
+        GROUP BY a.beh_dept_id,
+        a.beh_dept_name
         ) t2
         ) t2
         WHERE
         WHERE
         t1.behDeptId = t2.behDeptId
         t1.behDeptId = t2.behDeptId
@@ -5293,7 +5290,7 @@
         </if>
         </if>
         t1.behospitalCode
         t1.behospitalCode
         )tp
         )tp
-        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
+        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type in(0,2) ) g
         ON tp.behospitalCode = g.behospital_code
         ON tp.behospitalCode = g.behospital_code
         AND tp.hospitalId = g.hospital_id
         AND tp.hospitalId = g.hospital_id
         LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
         LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
@@ -5343,6 +5340,7 @@
         t1.behDeptName,
         t1.behDeptName,
         t1.doctorName,
         t1.doctorName,
         t1.patName,
         t1.patName,
+        t1.fileCode,
         t1.behospitalCode,
         t1.behospitalCode,
         t1.hospitalId,
         t1.hospitalId,
         t1.behospitalDate,
         t1.behospitalDate,
@@ -5359,6 +5357,7 @@
         SELECT
         SELECT
         a.doctor_name AS doctorName,
         a.doctor_name AS doctorName,
         a.`name` AS patName,
         a.`name` AS patName,
+        a.file_code as fileCode,
         a.behospital_code AS behospitalCode,
         a.behospital_code AS behospitalCode,
         a.behospital_date AS behospitalDate,
         a.behospital_date AS behospitalDate,
         a.leave_hospital_date AS leaveHospitalDate,
         a.leave_hospital_date AS leaveHospitalDate,
@@ -5527,7 +5526,7 @@
         </if>
         </if>
         t1.behospitalCode
         t1.behospitalCode
         )tp
         )tp
-        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
+        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type in(0,2) ) g
         ON tp.behospitalCode = g.behospital_code
         ON tp.behospitalCode = g.behospital_code
         AND tp.hospitalId = g.hospital_id
         AND tp.hospitalId = g.hospital_id
         LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
         LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h