Browse Source

Merge branch '20211018_yw_check' into test_qiyuan

chengyao 3 năm trước cách đây
mục cha
commit
8eaf3f5448

+ 1 - 0
src/main/java/com/diagbot/dto/EntryStasByDeptDTO.java

@@ -21,6 +21,7 @@ public class EntryStasByDeptDTO {
      */
     @Excel(name = "主管医生", width = 30, orderNum = "1")
     private String doctorName;
+    private String doctorId;
     /**
      * 未在24小时内完成会诊数
      */

+ 9 - 5
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -6632,6 +6632,7 @@
         deptId,
         deptName,
         doctorName,
+        doctorId,
         consultationMRNum,
         consultationNum,
         2511 AS consultationEntryId,
@@ -6765,6 +6766,7 @@
         GROUP BY
         c.doctorId,
         c.doctorName
+        having  sum( d.cases_entry_id = 2511 ) is not null
         ) UNION
         (
         SELECT
@@ -6847,6 +6849,7 @@
         GROUP BY
         d.doctor_id,
         d.doctor_name
+        having  sum( e.cases_entry_id = 2594 ) is not null or sum( e.cases_entry_id = 2973 ) or sum( e.cases_entry_id = 2930 )
         ) UNION
         (
         SELECT
@@ -6925,6 +6928,7 @@
         GROUP BY
         c.doctor_id,
         c.doctor_name
+        having  sum( d.cases_entry_id = 2419 ) is not null
         ) UNION
         (
         SELECT
@@ -18001,17 +18005,17 @@
         LEFT JOIN med_qcresult_info qi ON qi.is_deleted = 'N'
         AND t.hospitalId = qi.hospital_id
         AND t.behospitalCode = qi.behospital_code
+        LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
+        AND t.hospitalId = t2.hospital_id
+        AND t2.is_deleted = 'N'
+        LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
+        AND t3.is_deleted = 'N'
         <if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
         LEFT JOIN med_qcresult_detail qd ON qd.is_deleted = 'N'
         AND t.hospitalId = qd.hospital_id
         AND t.behospitalCode = qd.behospital_code
         LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
         AND qd.cases_id = qc.id
-        LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
-        AND t.hospitalId = t2.hospital_id
-        AND t2.is_deleted = 'N'
-        LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
-        AND t3.is_deleted = 'N'
         </if>
         where 1=1
         <if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">