瀏覽代碼

湘雅报表

chengyao 3 年之前
父節點
當前提交
5cff7eafb4
共有 2 個文件被更改,包括 20 次插入14 次删除
  1. 1 1
      src/main/java/com/diagbot/dto/HomePageNumXYDTO.java
  2. 19 13
      src/main/resources/mapper/BehospitalInfoMapper.xml

+ 1 - 1
src/main/java/com/diagbot/dto/HomePageNumXYDTO.java

@@ -27,7 +27,7 @@ public class HomePageNumXYDTO {
      * 主管医生职称
      */
     @Excel(name = "医师类别", width = 20, orderNum = "2")
-    private String doctorTitle;
+    private String professor;
 
     /**
      * 主管医生id

+ 19 - 13
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -3392,7 +3392,7 @@
         t1.deptId,
         t1.deptName,
         t1.doctorName,
-        t1.doctorTitle,
+        t1.professor,
         sum(t1.mrNum) as mrNum,
         sum(t1.totleValue)as totleValue,
         ROUND(CAST(sum(t1.totleValue)/sum(t1.mrNum) AS DECIMAL ( 18, 2 )), 2) AS averageValue,
@@ -3424,7 +3424,7 @@
         when (b.attending_doctor = '' or b.attending_doctor is null) and
         (b.director_doctor = '' or b.director_doctor is null) and
         b.behospital_doctor != '' and b.behospital_doctor is not null
-        then '住院医师' end as doctorTitle,
+        then '住院医师' end as professor,
         count( * ) AS mrNum,
         ROUND( sum( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS totleValue,
         ROUND( avg( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
@@ -3469,8 +3469,8 @@
         <if test="deptName != null and deptName != ''">
             and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
-        <if test="doctorName != null and doctorName != ''">
-            and a.doctor_name like CONCAT('%',#{doctorName},'%')
+        <if test="deptId != null and deptId != ''">
+            and a.beh_dept_id = #{deptId}
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -3479,14 +3479,14 @@
         b.director_doctor,
         b.behospital_doctor
         ) t1
-        group by t1.deptId,t1.deptName,t1.doctorName
+        group by t1.deptId,t1.deptName,t1.doctorName,t1.professor
         )tt1,
         (
         select
         t2.deptId,
         t2.deptName,
         t2.doctorName,
-        t2.doctorTitle,
+        t2.professor,
         sum(t2.entryNum)as entryNum,
         sum(t2.emptyNum)as emptyNum,
         sum(t2.errorNum)as errorNum,
@@ -3517,7 +3517,7 @@
         when (b.attending_doctor = '' or b.attending_doctor is null) and
         (b.director_doctor = '' or b.director_doctor is null) and
         b.behospital_doctor != '' and b.behospital_doctor is not null
-        then '住院医师' end as doctorTitle,
+        then '住院医师' end as professor,
         count( * ) AS entryNum,
         count(case when e.rule_type = 1 then 1 end) AS emptyNum,
         count(case when e.rule_type = 2 then 1 end) AS errorNum,
@@ -3570,8 +3570,8 @@
         <if test="deptName != null and deptName != ''">
             and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
-        <if test="doctorName != null and doctorName != ''">
-            and a.doctor_name like CONCAT('%',#{doctorName},'%')
+        <if test="deptId != null and deptId != ''">
+            and a.beh_dept_id = #{deptId}
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -3588,15 +3588,21 @@
         is_deleted = 'N'
         AND cases_id = 243
         )m2) t2
-        group by t2.deptId,t2.deptName,t2.doctorName
+        group by t2.deptId,t2.deptName,t2.doctorName,t2.professor
         ) tt2
         WHERE
         tt1.deptId = tt2.deptId
         AND tt1.deptName = tt2.deptName
         AND tt1.doctorName= tt2.doctorName
-        AND tt1.doctorTitle = tt2.doctorTitle
-        AND tt1.doctorTitle != ''
-        and tt1.doctorTitle is not null
+        AND tt1.professor = tt2.professor
+        AND tt1.professor != ''
+        and tt1.professor is not null
+        <if test="doctorName != null and doctorName != ''">
+            and tt1.doctorName like CONCAT('%',#{doctorName},'%')
+        </if>
+        <if test="professor != null and professor != ''">
+            and tt1.professor like CONCAT('%',#{professor},'%')
+        </if>
     </select>