Explorar o código

Merge branch 'develop' into dev/20200706_1.3.6.4

gaodm %!s(int64=4) %!d(string=hai) anos
pai
achega
c0cd6d2359
Modificáronse 26 ficheiros con 651 adicións e 36 borrados
  1. 7 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  2. 7 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  3. 4 0
      src/main/java/com/diagbot/dto/AverageStatisticsDTO.java
  4. 29 0
      src/main/java/com/diagbot/dto/AverageStatisticsFeeDTO.java
  5. 30 0
      src/main/java/com/diagbot/dto/AverageStatisticsFeeMonthDTO.java
  6. 30 0
      src/main/java/com/diagbot/dto/AverageStatisticsMonthDTO.java
  7. 63 0
      src/main/java/com/diagbot/dto/EntryNumGroupDTO.java
  8. 14 0
      src/main/java/com/diagbot/dto/EntryStatisticsDTO.java
  9. 3 0
      src/main/java/com/diagbot/dto/NumDTO.java
  10. 3 0
      src/main/java/com/diagbot/dto/QcResultPercentDTO.java
  11. 74 6
      src/main/java/com/diagbot/dto/QcResultShortDTO.java
  12. 133 1
      src/main/java/com/diagbot/facade/ConsoleExportFacade.java
  13. 6 4
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  14. 2 1
      src/main/java/com/diagbot/mapper/HomePageMapper.java
  15. 2 1
      src/main/java/com/diagbot/mapper/QcresultInfoMapper.java
  16. 2 1
      src/main/java/com/diagbot/service/HomePageService.java
  17. 2 1
      src/main/java/com/diagbot/service/QcresultInfoService.java
  18. 2 1
      src/main/java/com/diagbot/service/impl/HomePageServiceImpl.java
  19. 2 1
      src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java
  20. 11 3
      src/main/java/com/diagbot/util/ExcelUtils.java
  21. 5 1
      src/main/java/com/diagbot/vo/QcResultShortPageVO.java
  22. 6 2
      src/main/java/com/diagbot/web/ConsoleController.java
  23. 123 0
      src/main/java/com/diagbot/web/ConsoleExportController.java
  24. 89 11
      src/main/resources/mapper/BehospitalInfoMapper.xml
  25. 1 1
      src/main/resources/mapper/HomePageMapper.xml
  26. 1 1
      src/main/resources/mapper/QcresultInfoMapper.xml

+ 7 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -118,6 +118,13 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/export/levelExport").permitAll()
                 .antMatchers("/console/entryStatistics").permitAll()
                 .antMatchers("/console/export/levelExport_TZ").permitAll()
+                .antMatchers("/console/export/getAverageDayNumExport").permitAll()
+                .antMatchers("/console/export/getAverageFeeExport").permitAll()
+                .antMatchers("/console/export/levelPercentGroupByDeptExport").permitAll()
+                .antMatchers("/console/export/entryCountGroupByEntryExport").permitAll()
+                .antMatchers("/console/export/entryCountGroupByCaseExport").permitAll()
+                .antMatchers("/console/export/entryStatisticsExport").permitAll()
+                .antMatchers("/console/export/qcResultShortPageExport").permitAll()
                 .antMatchers("/qc/data/sendDoctorInfos").permitAll()
                 .antMatchers("/qc/data/sendDeptInfos").permitAll()
                 .antMatchers("/qc/data/sendRecordTypes").permitAll()

+ 7 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -161,6 +161,13 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/levelExport", request)
                 || matchers("/console/entryStatistics", request)
                 || matchers("/console/export/levelExport_TZ", request)
+                || matchers("/console/export/getAverageDayNumExport", request)
+                || matchers("/console/export/getAverageFeeExport", request)
+                || matchers("/console/export/levelPercentGroupByDeptExport", request)
+                || matchers("/console/export/entryCountGroupByEntryExport", request)
+                || matchers("/console/export/entryCountGroupByCaseExport", request)
+                || matchers("/console/export/entryStatisticsExport", request)
+                || matchers("/console/export/qcResultShortPageExport", request)
                 || matchers("/qc/data/sendDoctorInfos", request)
                 || matchers("/qc/data/sendDeptInfos", request)
                 || matchers("/qc/data/sendRecordTypes", request)

+ 4 - 0
src/main/java/com/diagbot/dto/AverageStatisticsDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -12,11 +13,14 @@ import lombok.Setter;
 @Setter
 public class AverageStatisticsDTO {
     private String id;
+    @Excel(name = "科室名称", width = 30, orderNum = "1")
     private String name;
     private Integer num;
+    @Excel(name = "本年平均住院天数(天)", width = 15, orderNum = "2")
     private Double averageValue = 0d;
     private Double totleValue = 0d;
     //环比平均值
+    @Excel(name = "去年平均住院天数(天)", width = 15, orderNum = "3")
     private Double lastAverageValue = 0d;
     //同比平均值
     private Double lastYearAverageValue = 0d;

+ 29 - 0
src/main/java/com/diagbot/dto/AverageStatisticsFeeDTO.java

@@ -0,0 +1,29 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsFeeDTO {
+    private String id;
+    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    private String name;
+    private Integer num;
+    @Excel(name = "本年平均住院花费(元)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    //环比平均值
+    @Excel(name = "去年平均住院花费(元)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

+ 30 - 0
src/main/java/com/diagbot/dto/AverageStatisticsFeeMonthDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsFeeMonthDTO {
+    private String id;
+    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    private String name;
+    private Integer num;
+    @Excel(name = "本月平均住院花费(元)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    //环比平均值
+    @Excel(name = "上月平均住院花费(元)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    @Excel(name = "去年本月平均住院花费(元)", width = 15, orderNum = "4")
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

+ 30 - 0
src/main/java/com/diagbot/dto/AverageStatisticsMonthDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/15 19:44
+ */
+@Getter
+@Setter
+public class AverageStatisticsMonthDTO {
+    private String id;
+    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    private String name;
+    private Integer num;
+    @Excel(name = "本月平均住院天数(天)", width = 15, orderNum = "2")
+    private Double averageValue = 0d;
+    private Double totleValue = 0d;
+    //环比平均值
+    @Excel(name = "上月平均住院天数(天)", width = 15, orderNum = "3")
+    private Double lastAverageValue = 0d;
+    //同比平均值
+    @Excel(name = "去年本月平均住院天数(天)", width = 15, orderNum = "4")
+    private Double lastYearAverageValue = 0d;
+    //科室分类
+    private String deptClass;
+}

+ 63 - 0
src/main/java/com/diagbot/dto/EntryNumGroupDTO.java

@@ -0,0 +1,63 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:条目缺陷占比返回结构
+ * @Author:zhaops
+ * @time: 2020/6/5 13:20
+ */
+@Getter
+@Setter
+public class EntryNumGroupDTO {
+    /**
+     * 条目缺陷id
+     */
+    private Long id;
+    /**
+     * 条目缺陷名称
+     */
+    @Excel(name = "缺陷名称", width = 40, orderNum = "2")
+    private String name;
+    /**
+     * 模块id
+     */
+    private Long casesId;
+    /**
+     * 模块名称
+     */
+    @Excel(name = "所属模块", width = 20, orderNum = "1")
+    private String casesName;
+    /**
+     * 条目缺陷总数
+     */
+    private Integer totleNum = 0;
+    /**
+     * 条目缺陷数
+     */
+    @Excel(name = "数量", orderNum = "3")
+    private Integer num = 0;
+    /**
+     * 条目缺陷占比
+     */
+    private Double percent = 0.00d;
+    /**
+     * 条目缺陷占比(百分比)
+     */
+    @Excel(name = "缺陷占比", orderNum = "4")
+    private String percentStr = "0.00%";
+    /**
+     * 条目缺陷分值
+     */
+    private Double score = 0d;
+    /**
+     * 单项否决标识
+     */
+    private Integer isReject;
+    /**
+     * 规则类型(0:无,1:空项,2:错误)
+     */
+    private Integer ruleType;
+}

+ 14 - 0
src/main/java/com/diagbot/dto/EntryStatisticsDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -18,10 +19,12 @@ public class EntryStatisticsDTO {
     /**
      * 科室名称
      */
+    @Excel(name = "科室名称", width = 30, orderNum = "1")
     private String deptName;
     /**
      * 未在24小时内完成会诊数
      */
+    @Excel(name = "未在24小时内完成会诊数", width = 15, orderNum = "2")
     private Integer consultationNum = 0;
     /**
      * 未在24小时内完成会诊条目id
@@ -38,6 +41,7 @@ public class EntryStatisticsDTO {
     /**
      * 未在24小时内完成会诊率(百分比)
      */
+    @Excel(name = "未在24小时内完成会诊率", width = 15, orderNum = "3")
     private String consultationPercentStr = "0.00%";
     /**
      * 会诊病历数
@@ -54,6 +58,7 @@ public class EntryStatisticsDTO {
     /**
      * 手术记录名称不匹配数
      */
+    @Excel(name = "手术记录名称不匹配数", width = 15, orderNum = "4")
     private Integer operationNameNum = 0;
     /**
      * 手术记录名称不匹配率
@@ -62,6 +67,7 @@ public class EntryStatisticsDTO {
     /**
      * 手术记录名称不匹配率(百分比)
      */
+    @Excel(name = "手术记录名称不匹配率", width = 15, orderNum = "5")
     private String operationNamePercentStr = "0.00%";
     /**
      * 术后首程未在15分钟内完成条目id
@@ -74,6 +80,7 @@ public class EntryStatisticsDTO {
     /**
      * 术后首程未在15分钟内完成数
      */
+    @Excel(name = "术后首程未在15分钟内完成数", width = 15, orderNum = "6")
     private Integer operation15MinuteNum = 0;
     /**
      * 术后首程未在15分钟内完成率
@@ -82,6 +89,7 @@ public class EntryStatisticsDTO {
     /**
      * 术后首程未在15分钟内完成率(百分比)
      */
+    @Excel(name = "术后首程未在15分钟内完成率", width = 15, orderNum = "7")
     private String operation15MinutePercentStr = "0.00%";
     /**
      * 病案首页手术时间不匹配条目id
@@ -94,6 +102,7 @@ public class EntryStatisticsDTO {
     /**
      * 病案首页手术时间不匹配数
      */
+    @Excel(name = "病案首页手术时间不匹配数", width = 15, orderNum = "8")
     private Integer operationTimeNum = 0;
     /**
      * 病案首页手术时间不匹配率
@@ -102,6 +111,7 @@ public class EntryStatisticsDTO {
     /**
      * 病案首页手术时间不匹配率(百分比)
      */
+    @Excel(name = "病案首页手术时间不匹配率", width = 15, orderNum = "9")
     private String operationTimePercentStr = "0.00%";
     /**
      * 手术记录病历数
@@ -118,6 +128,7 @@ public class EntryStatisticsDTO {
     /**
      * 未在6小时内书写危急值记录数
      */
+    @Excel(name = "未在6小时内书写危急值记录数", width = 15, orderNum = "10")
     private Integer crisisNum = 0;
     /**
      * 未在6小时内书写危急值记录率
@@ -126,6 +137,7 @@ public class EntryStatisticsDTO {
     /**
      * 未在6小时内书写危急值记录率(百分比)
      */
+    @Excel(name = "未在6小时内书写危急值记录率", width = 15, orderNum = "11")
     private String crisisPercentStr = "0.00%";
     /**
      * 危急值记录病历数
@@ -142,6 +154,7 @@ public class EntryStatisticsDTO {
     /**
      * 阶段小节未书写数
      */
+    @Excel(name = "阶段小节未书写数", width = 15, orderNum = "12")
     private Integer stageSummaryNum = 0;
     /**
      * 阶段小节未书写率
@@ -150,6 +163,7 @@ public class EntryStatisticsDTO {
     /**
      * 阶段小节未书写率(百分比)
      */
+    @Excel(name = "阶段小节未书写率", width = 15, orderNum = "13")
     private String stageSummaryPercentStr = "0.00%";
     /**
      * 病人住院超过30天的病历数

+ 3 - 0
src/main/java/com/diagbot/dto/NumDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -15,6 +16,7 @@ public class NumDTO {
     /**
      * 名称
      */
+    @Excel(name = "模块名称", width = 20, orderNum = "1")
     private String name;
     /**
      * 总数
@@ -31,5 +33,6 @@ public class NumDTO {
     /**
      * 占比(百分比)
      */
+    @Excel(name = "缺陷占比", orderNum = "2")
     private String percentStr = "0.00%";
 }

+ 3 - 0
src/main/java/com/diagbot/dto/QcResultPercentDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -12,11 +13,13 @@ import lombok.Setter;
 @Setter
 public class QcResultPercentDTO {
     private String deptId;
+    @Excel(name = "科室名称", width = 30, orderNum = "1")
     private String deptName;
     private Integer totleNum;
     private Integer firstLevelNum;
     //private Integer secondLevelNum;
     //private Integer thirdLevelNum;
+    @Excel(name = "甲级病历占比", width = 15, orderNum = "2")
     private String firstPercent;
     //private String secondPercent;
     //private String thirdPercent;

+ 74 - 6
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -1,8 +1,12 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.Date;
+
 /**
  * @Description:
  * @Author:zhaops
@@ -11,16 +15,80 @@ import lombok.Setter;
 @Getter
 @Setter
 public class QcResultShortDTO {
+    /**
+     * 医院id
+     */
     private String hospitalId;
-    private String behospitalCode;
+
+    /**
+     * 病历等级
+     */
+    @Excel(name = "病历等级", width = 30, orderNum = "1")
     private String level;
+    /**
+     * 病历得分
+     */
+    @Excel(name = "病历得分", width = 30, orderNum = "2")
     private Double scoreRes;
-    private String patName;
+    @Excel(name = "病人住院序号", width = 40, orderNum = "3")
+    private String behospitalCode;
+    @Excel(name = "病案号", width = 30, orderNum = "4")
+    private String fileCode;
+    @Excel(name = "病人姓名", width = 30, orderNum = "5")
+    private String name;
+    @Excel(name = "性别", width = 20, orderNum = "6")
     private String sex;
+    @Excel(name = "年龄", width = 20, orderNum = "7")
+    private String age;
+    @Excel(name = "床号", width = 30, orderNum = "8")
+    private String bedCode;
+    @Excel(name = "入院日期", format = "yyyy-MM-dd", width = 30, orderNum = "9")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+    @Excel(name = "出院日期", format = "yyyy-MM-dd", width = 30, orderNum = "10")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+    @Excel(name = "归档日期", format = "yyyy-MM-dd", width = 30, orderNum = "11")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date placefileDate;
+    @Excel(name = "主诊断", width = 60, orderNum = "12")
+    private String diagnose;
+    private String behDoctorId;
+    @Excel(name = "住院医生", width = 30, orderNum = "13")
+    private String behDoctorName;
+    /**
+     * 主治医生id
+     */
+    private String doctorId;
+    /**
+     * 主治医生姓名
+     */
+    @Excel(name = "主管医生", width = 30, orderNum = "14")
+    private String doctorName;
+    private String directorDoctorId;
+    @Excel(name = "主任医生", width = 30, orderNum = "15")
+    private String directorDoctorName;
+    /**
+     * 科室编码
+     */
     private String behDeptId;
+    /**
+     * 科室名称
+     */
+    @Excel(name = "科室", width = 70, orderNum = "16")
     private String behDeptName;
-    private Long doctorId;
-    private String doctorName;
-    private String leaveHospitalDate;
-    private String age;
+    @Excel(name = "评分时间", format = "yyyy-MM-dd", width = 30, orderNum = "17")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date gradeTime;
+
+    /**
+     * 评分类型
+     */
+    private Integer gradeType;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date birthday;
+    /**
+     * 病区名称
+     */
+    private String wardName;
 }

+ 133 - 1
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -1,13 +1,26 @@
 package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.dto.AverageStatisticsFeeDTO;
+import com.diagbot.dto.AverageStatisticsFeeMonthDTO;
+import com.diagbot.dto.AverageStatisticsMonthDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
+import com.diagbot.dto.EntryStatisticsDTO;
 import com.diagbot.dto.HomePageNumDTO;
 import com.diagbot.dto.LevelStatisticsDTO;
 import com.diagbot.dto.LevelStatisticsTZDTO;
+import com.diagbot.dto.NumDTO;
+import com.diagbot.dto.QcResultPercentDTO;
+import com.diagbot.dto.QcResultShortDTO;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ExcelUtils;
+import com.diagbot.vo.EntryStatisticsVO;
 import com.diagbot.vo.FilterOrderVO;
+import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageVO;
+import com.diagbot.vo.QcResultShortPageVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -24,7 +37,8 @@ public class ConsoleExportFacade {
 
     @Autowired
     private ConsoleFacade consoleFacade;
-
+    @Autowired
+    private QcCasesFacade qcCasesFacade;
 
     /**
      * 病案首页合格率占比
@@ -76,4 +90,122 @@ public class ConsoleExportFacade {
         String fileName = "各科室缺陷占比-台州.xls";
         ExcelUtils.exportExcel(records, null, "sheet1", LevelStatisticsTZDTO.class, fileName, response, 12.8f);
     }
+
+    /**
+     * 按科室统计平均住院天数导出
+     *
+     * @param filterPageByAverageVO
+     * @return
+     */
+    public void getAverageDayNumExport(HttpServletResponse response, FilterPageByAverageVO filterPageByAverageVO) {
+        filterPageByAverageVO.setCurrent(1L);
+        filterPageByAverageVO.setSize(Long.MAX_VALUE);
+        filterPageByAverageVO.setSearchCount(false);
+        IPage<AverageStatisticsDTO> page = consoleFacade.getAverageDayNumPage(filterPageByAverageVO);
+        String fileName = " 按科室统计平均住院天数.xls";
+
+        if (filterPageByAverageVO.getType() == 2) {
+            ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", AverageStatisticsDTO.class, fileName, response, 12.8f);
+        }
+        if (filterPageByAverageVO.getType() == 1) {
+            List<AverageStatisticsMonthDTO> list = BeanUtil.listCopyTo(page.getRecords(), AverageStatisticsMonthDTO.class);
+            ExcelUtils.exportExcel(list, null, "sheet1", AverageStatisticsMonthDTO.class, fileName, response, 12.8f);
+        }
+
+    }
+
+    /**
+     * 按科室统计平均住院费用导出
+     *
+     * @param filterPageByAverageVO
+     * @return
+     */
+    public void getAverageFeeExport(HttpServletResponse response, FilterPageByAverageVO filterPageByAverageVO) {
+        filterPageByAverageVO.setCurrent(1L);
+        filterPageByAverageVO.setSize(Long.MAX_VALUE);
+        filterPageByAverageVO.setSearchCount(false);
+        IPage<AverageStatisticsFeeDTO> page = consoleFacade.getAverageFeePage(filterPageByAverageVO);
+        String fileName = " 按科室统计平均住院费用.xls";
+
+        if (filterPageByAverageVO.getType() == 2) {
+            ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", AverageStatisticsFeeDTO.class, fileName, response, 12.8f);
+        }
+        if (filterPageByAverageVO.getType() == 1) {
+            List<AverageStatisticsFeeMonthDTO> list = BeanUtil.listCopyTo(page.getRecords(), AverageStatisticsFeeMonthDTO.class);
+            ExcelUtils.exportExcel(list, null, "sheet1", AverageStatisticsFeeMonthDTO.class, fileName, response, 12.8f);
+        }
+    }
+
+    /**
+     * 各科室甲级病历占比排行导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    public void levelPercentGroupByDeptExport(HttpServletResponse response, FilterPageVO filterPageVO) {
+        filterPageVO.setCurrent(1L);
+        filterPageVO.setSize(Long.MAX_VALUE);
+        filterPageVO.setSearchCount(false);
+        IPage<QcResultPercentDTO> page = consoleFacade.levelPercentGroupByDeptPage(filterPageVO);
+        String fileName = " 各科室甲级病历占比排行.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", QcResultPercentDTO.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 缺陷详情导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    public void entryCountGroupByEntryExport(HttpServletResponse response, FilterPageVO filterPageVO) {
+        filterPageVO.setCurrent(1L);
+        filterPageVO.setSize(Long.MAX_VALUE);
+        filterPageVO.setSearchCount(false);
+        IPage<EntryNumGroupDTO> page = consoleFacade.entryCountGroupByEntryPage(filterPageVO);
+        String fileName = "缺陷详情.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", EntryNumGroupDTO.class, fileName, response, 12.8f);
+    }
+
+
+    /**
+     * 各模块缺陷占比导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    public void entryCountGroupByCaseExport(HttpServletResponse response, FilterPageVO filterPageVO) {
+        filterPageVO.setCurrent(1L);
+        filterPageVO.setSize(Long.MAX_VALUE);
+        filterPageVO.setSearchCount(false);
+        IPage<NumDTO> page = consoleFacade.entryCountGroupByCasePage(filterPageVO);
+        String fileName = "缺陷详情.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", NumDTO.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 关键条目缺陷占比统计
+     *
+     * @param entryStatisticsVO
+     * @return
+     */
+    public void entryStatisticsExport(HttpServletResponse response, EntryStatisticsVO entryStatisticsVO) {
+        List<EntryStatisticsDTO> records = consoleFacade.entryStatistics(entryStatisticsVO);
+        String fileName = "关键条目缺陷占比统计.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", EntryStatisticsDTO.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 缺陷详情质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void qcResultShortPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        IPage<QcResultShortDTO> page = consoleFacade.qcResultShortPage(qcResultShortPageVO);
+        String fileName = "缺陷详情质控评分页.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", QcResultShortDTO.class, fileName, response, 12.8f);
+    }
 }

+ 6 - 4
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -5,8 +5,10 @@ import com.diagbot.aggregate.AverageStatisticsAggregate;
 import com.diagbot.aggregate.MrStatisticsAggregate;
 import com.diagbot.aggregate.ResultStatisticsAggregate;
 import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.EntryStatisticsDTO;
 import com.diagbot.dto.HomePageNumDTO;
 import com.diagbot.dto.LevelStatisticsDTO;
@@ -358,12 +360,12 @@ public class ConsoleFacade {
      * @param filterPageVO
      * @return
      */
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(FilterPageVO filterPageVO) {
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(FilterPageVO filterPageVO) {
         filterFacade.filterPageVOSet(filterPageVO);
         if (filterPageVO.getDeptName().equals("全院")) {
             filterPageVO.setDeptName("");
         }
-        IPage<EntryNumDTO> page = qcresultInfoFacade.entryCountGroupByEntryPage(filterPageVO);
+        IPage<EntryNumGroupDTO> page = qcresultInfoFacade.entryCountGroupByEntryPage(filterPageVO);
         return page;
     }
 
@@ -385,9 +387,9 @@ public class ConsoleFacade {
      * @param filterPageByAverageVO
      * @return
      */
-    public IPage<AverageStatisticsDTO> getAverageFeePage(FilterPageByAverageVO filterPageByAverageVO) {
+    public IPage<AverageStatisticsFeeDTO> getAverageFeePage(FilterPageByAverageVO filterPageByAverageVO) {
         filterFacade.filterPageByAverageVOSet(filterPageByAverageVO);
-        IPage<AverageStatisticsDTO> page = homePageFacade.getAverageFeePage(filterPageByAverageVO);
+        IPage<AverageStatisticsFeeDTO> page = homePageFacade.getAverageFeePage(filterPageByAverageVO);
         return page;
     }
 

+ 2 - 1
src/main/java/com/diagbot/mapper/HomePageMapper.java

@@ -3,6 +3,7 @@ package com.diagbot.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.entity.HomePage;
 import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageVO;
@@ -51,7 +52,7 @@ public interface HomePageMapper extends BaseMapper<HomePage> {
      * @param filterPageByAverageVO
      * @return
      */
-    public IPage<AverageStatisticsDTO> getAverageFeePage(@Param("filterPageByAverageVO") FilterPageByAverageVO filterPageByAverageVO);
+    public IPage<AverageStatisticsFeeDTO> getAverageFeePage(@Param("filterPageByAverageVO") FilterPageByAverageVO filterPageByAverageVO);
 
     /**
      * 根据病案首页编码、医院编码、病人住院ID-批量更新

+ 2 - 1
src/main/java/com/diagbot/mapper/QcresultInfoMapper.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.DeptEntryNumDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.entity.QcresultInfo;
@@ -114,7 +115,7 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      * @param filterPageVO
      * @return
      */
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
     /**
      * 各科室质控平均分(分页)

+ 2 - 1
src/main/java/com/diagbot/service/HomePageService.java

@@ -2,6 +2,7 @@ package com.diagbot.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.entity.HomePage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.vo.FilterPageByAverageVO;
@@ -50,5 +51,5 @@ public interface HomePageService extends IService<HomePage> {
      * @param filterPageByAverageVO
      * @return
      */
-    public IPage<AverageStatisticsDTO> getAverageFeePage(@Param("filterPageByAverageVO") FilterPageByAverageVO filterPageByAverageVO);
+    public IPage<AverageStatisticsFeeDTO> getAverageFeePage(@Param("filterPageByAverageVO") FilterPageByAverageVO filterPageByAverageVO);
 }

+ 2 - 1
src/main/java/com/diagbot/service/QcresultInfoService.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.DeptEntryNumDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.entity.QcresultInfo;
@@ -115,7 +116,7 @@ public interface QcresultInfoService extends IService<QcresultInfo> {
      * @param filterPageVO
      * @return
      */
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
     /**
      * 各科室质控平均分(分页)

+ 2 - 1
src/main/java/com/diagbot/service/impl/HomePageServiceImpl.java

@@ -3,6 +3,7 @@ package com.diagbot.service.impl;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.entity.HomePage;
 import com.diagbot.mapper.HomePageMapper;
 import com.diagbot.service.HomePageService;
@@ -64,7 +65,7 @@ public class HomePageServiceImpl extends ServiceImpl<HomePageMapper, HomePage> i
      * @param filterPageByAverageVO
      * @return
      */
-    public IPage<AverageStatisticsDTO> getAverageFeePage(@Param("filterPageByAverageVO") FilterPageByAverageVO filterPageByAverageVO) {
+    public IPage<AverageStatisticsFeeDTO> getAverageFeePage(@Param("filterPageByAverageVO") FilterPageByAverageVO filterPageByAverageVO) {
         return baseMapper.getAverageFeePage(filterPageByAverageVO);
     }
 

+ 2 - 1
src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.DeptEntryNumDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.entity.QcresultInfo;
@@ -150,7 +151,7 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
      * @return
      */
     @Override
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO) {
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO) {
         return baseMapper.entryCountGroupByEntryPage(filterPageVO);
     }
 

+ 11 - 3
src/main/java/com/diagbot/util/ExcelUtils.java

@@ -45,7 +45,11 @@ public class ExcelUtils {
 
     public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
                                    HttpServletResponse response, float height) {
-        userExport2(list, pojoClass, fileName, response, new ExportParams(title, sheetName), height);
+        Boolean havTitle = false;
+        if (StringUtil.isNotBlank(title)) {
+            havTitle = true;
+        }
+        userExport2(list, pojoClass, fileName, response, new ExportParams(title, sheetName), height, havTitle);
     }
 
     public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
@@ -85,13 +89,17 @@ public class ExcelUtils {
     }
 
     private static void userExport2(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response,
-                                    ExportParams exportParams, float height) {
+                                    ExportParams exportParams, float height, Boolean havTitle) {
         Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
         if (workbook != null) {
             Sheet sheet = workbook.getSheetAt(0);
             int rowNum = sheet.getLastRowNum();
             Row row = sheet.getRow(0);
-            for (int i = 1; i <= rowNum; i++) {
+            int startRowNum = 1;
+            if (havTitle) {
+                startRowNum = 2;
+            }
+            for (int i = startRowNum; i <= rowNum; i++) {
                 row = sheet.getRow(i);
                 row.setHeightInPoints(height);
             }

+ 5 - 1
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -41,9 +41,13 @@ public class QcResultShortPageVO extends Page {
      */
     private String behDeptName;
     /**
-     * 主治医生名
+     * 医生
      */
     private String doctorName;
+    /**
+     * 医生编号
+     */
+    private String doctorId;
     /**
      * 病历等级
      */

+ 6 - 2
src/main/java/com/diagbot/web/ConsoleController.java

@@ -3,8 +3,10 @@ package com.diagbot.web;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.AverageStatisticsDTO;
+import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.EntryStatisticsDTO;
 import com.diagbot.dto.HomePageNumDTO;
 import com.diagbot.dto.LevelStatisticsDTO;
@@ -284,7 +286,7 @@ public class ConsoleController {
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
     @PostMapping("/entryCountGroupByEntryPage")
     @SysLogger("entryCountGroupByEntryPage")
-    public RespDTO<IPage<EntryNumDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
+    public RespDTO<IPage<EntryNumGroupDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
         return RespDTO.onSuc(consoleFacade.entryCountGroupByEntryPage(filterPageVO));
     }
 
@@ -314,7 +316,7 @@ public class ConsoleController {
                     "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
     @PostMapping("/getAverageFeePage")
     @SysLogger("getAverageFeePage")
-    public RespDTO<IPage<AverageStatisticsDTO>> getAverageFeePage(@RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+    public RespDTO<IPage<AverageStatisticsFeeDTO>> getAverageFeePage(@RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
         return RespDTO.onSuc(consoleFacade.getAverageFeePage(filterPageByAverageVO));
     }
 
@@ -460,6 +462,8 @@ public class ConsoleController {
                     "casesEntryName: 条目名称 <br>" +
                     "casesEntryId: 条目id <br>" +
                     "behDeptName:科室名称 <br>" +
+                    "doctorId:医生工号 <br>" +
+                    "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +

+ 123 - 0
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -2,8 +2,11 @@ package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.facade.ConsoleExportFacade;
+import com.diagbot.vo.EntryStatisticsVO;
 import com.diagbot.vo.FilterOrderVO;
+import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageVO;
+import com.diagbot.vo.QcResultShortPageVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -97,4 +100,124 @@ public class ConsoleExportController {
     public void levelExport_TZ(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
         consoleExportFacade.levelExport_TZ(response, filterOrderVO);
     }
+
+    /**
+     * 按科室统计平均住院天数导出
+     *
+     * @param filterPageByAverageVO
+     * @return
+     */
+    @ApiOperation(value = "按科室统计平均住院天数导出[by:gaodm]",
+            notes = "type: 统计维度 1-本月,2-本年<br>" +
+                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
+    @PostMapping("/getAverageDayNumExport")
+    @SysLogger("getAverageDayNumExport")
+    public void getAverageDayNumExport(HttpServletResponse response, @RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+        consoleExportFacade.getAverageDayNumExport(response, filterPageByAverageVO);
+    }
+
+    /**
+     * 按科室统计平均住院费用导出
+     *
+     * @param filterPageByAverageVO
+     * @return
+     */
+    @ApiOperation(value = "按科室统计平均住院费用导出[by:gaodm]",
+            notes = "type: 统计维度 1-本月,2-本年<br>" +
+                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
+    @PostMapping("/getAverageFeeExport")
+    @SysLogger("getAverageFeeExport")
+    public void getAverageFeeExport(HttpServletResponse response, @RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
+        consoleExportFacade.getAverageFeeExport(response, filterPageByAverageVO);
+    }
+
+    /**
+     * 各科室甲级病历占比排行导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    @ApiOperation(value = "各科室甲级病历占比排行导出[by:gaodm]",
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+    @PostMapping("/levelPercentGroupByDeptExport")
+    @SysLogger("levelPercentGroupByDeptExport")
+    public void levelPercentGroupByDeptExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
+        consoleExportFacade.levelPercentGroupByDeptExport(response, filterPageVO);
+    }
+
+    /**
+     * 条目缺陷占比导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    @ApiOperation(value = "缺陷详情导出[by:gaodm]",
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "deptName: 科室名称 <br>" +
+                    "casesId: 模块id:243=病案首页 <br>" +
+                    "casesName: 模块名称 <br>" +
+                    "isReject: 单项否决 1-否决,0-非<br>" +
+                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
+    @PostMapping("/entryCountGroupByEntryExport")
+    @SysLogger("entryCountGroupByEntryExport")
+    public void entryCountGroupByEntryExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
+        consoleExportFacade.entryCountGroupByEntryExport(response, filterPageVO);
+    }
+
+    /**
+     * 各模块缺陷占比导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    @ApiOperation(value = "各模块缺陷占比导出[by:gaodm]",
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+    @PostMapping("/entryCountGroupByCaseExport")
+    @SysLogger("entryCountGroupByCaseExport")
+    public void entryCountGroupByCaseExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
+        consoleExportFacade.entryCountGroupByCaseExport(response, filterPageVO);
+    }
+
+    /**
+     * 关键条目缺陷占比统计导出
+     *
+     * @param entryStatisticsVO
+     * @return
+     */
+    @ApiOperation(value = "关键条目缺陷占比统计导出[by:gaodm]",
+            notes = "deptName:科室名称 <br>" +
+                    "asc: 排序(升序) <br>" +
+                    "desc:排序(降序) <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>")
+    @PostMapping("/entryStatisticsExport")
+    @SysLogger("entryStatisticsExport")
+    public void entryStatisticsExport(HttpServletResponse response, @RequestBody @Valid EntryStatisticsVO entryStatisticsVO) {
+        consoleExportFacade.entryStatisticsExport(response, entryStatisticsVO);
+    }
+
+    /**
+     * 缺陷详情质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "缺陷详情质控评分页导出[by:zhaops]",
+            notes = "behospitalCode: 病历号<br>" +
+                    "patName: 病人姓名 <br>" +
+                    "casesEntryName: 条目名称 <br>" +
+                    "casesEntryId: 条目id <br>" +
+                    "behDeptName:科室名称 <br>" +
+                    "doctorId:医生工号 <br>" +
+                    "doctorName:医生姓名 <br>" +
+                    "level: 病历等级 <br>" +
+                    "isReject: 单项否决 1-否决,0-非<br>" +
+                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>")
+    @PostMapping("/qcResultShortPageExport")
+    @SysLogger("qcResultShortPageExport")
+    public void qcResultShortPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        consoleExportFacade.qcResultShortPageExport(response, qcResultShortPageVO);
+    }
 }

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

@@ -2682,30 +2682,60 @@
         SELECT DISTINCT
         t1.hospital_id AS hospitalId,
         t1.behospital_code AS behospitalCode,
+        t1.bed_code AS bedCode,
         t1.LEVEL AS LEVEL,
+        t1.grade_type AS gradeType,
         t1.score_res AS scoreRes,
-        t1.NAME AS patName,
+        t1.NAME AS NAME,
         t1.sex AS sex,
         t1.beh_dept_id AS behDeptId,
         t1.beh_dept_name AS behDeptName,
+        t1.doctor_id AS doctorId,
+        t1.doctor_name AS doctorName,
+        t1.beh_doctor_id AS behDoctorId,
+        t1.beh_doctor_name AS behDoctorName,
+        t1.director_doctor_id AS directorDoctorId,
+        t1.director_doctor_name AS directorDoctorName,
+        t1.birthday AS birthday,
+        t1.behospital_date AS behospitalDate,
         t1.leave_hospital_date AS leaveHospitalDate,
-        t2.age
+        t1.placefile_date AS placefileDate,
+        t1.gmt_create AS gradeTime,
+        t1.diagnose,
+        t1.ward_name AS wardName,
+        t2.age,
+        t1.file_code AS fileCode
         FROM
         (
-        SELECT
-        DISTINCT tt1.*
+        SELECT DISTINCT
+        tt1.*
         FROM
         (
         SELECT DISTINCT
         a.hospital_id,
         a.behospital_code,
+        a.bed_code,
+        a.file_code,
         b.LEVEL,
+        b.grade_type,
         b.score_res,
         a.NAME,
         a.sex,
         a.beh_dept_id,
         a.beh_dept_name,
-        DATE_FORMAT( a.leave_hospital_date, '%Y-%m-%d' ) AS leave_hospital_date
+        a.birthday,
+        a.behospital_date,
+        a.leave_hospital_date,
+        a.doctor_id,
+        a.doctor_name,
+        a.beh_doctor_id,
+        a.beh_doctor_name,
+        a.director_doctor_id,
+        a.director_doctor_name,
+        a.diagnose,
+        a.placefile_date,
+        a.ward_name,
+        b.gmt_create
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -2748,6 +2778,16 @@
         <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
             AND d.NAME LIKE CONCAT( '%', #{qcResultShortPageVO.casesEntryName}, '%' )
         </if>
+        <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
+            AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
+            OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
+            OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
+        </if>
+        <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
+            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
+            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
+            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+        </if>
         <if test="qcResultShortPageVO.casesEntryId != null ">
             AND d.id = #{qcResultShortPageVO.casesEntryId}
         </if>
@@ -2780,12 +2820,12 @@
             AND tt1.behospital_code = tt2.behospital_code
         </if>
         ) t1
-        <if test="qcResultShortPageVO.casesEntryId == null or (qcResultShortPageVO.casesEntryId!=2594  and qcResultShortPageVO.casesEntryId!=2973 and qcResultShortPageVO.casesEntryId!=2166)">
+        <if test="qcResultShortPageVO.casesEntryId == null or (qcResultShortPageVO.casesEntryId!=2594  and qcResultShortPageVO.casesEntryId!=2973 and qcResultShortPageVO.casesEntryId!=2930)">
             LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
             AND t2.is_deleted = 'N'
         </if>
-        <if test="qcResultShortPageVO.casesEntryId != null and( qcResultShortPageVO.casesEntryId==2594  or qcResultShortPageVO.casesEntryId==2973 or qcResultShortPageVO.casesEntryId==2166)">
+        <if test="qcResultShortPageVO.casesEntryId != null and( qcResultShortPageVO.casesEntryId==2594  or qcResultShortPageVO.casesEntryId==2973 or qcResultShortPageVO.casesEntryId==2930)">
             , med_home_page t2
             , med_home_operation_info t3
             WHERE t1.hospital_id = t2.hospital_id
@@ -2798,31 +2838,59 @@
 
     <!-- 条目缺陷质控评分页-科室(内页)-->
     <select id="qcResultShortByDeptPage" resultType="com.diagbot.dto.QcResultShortDTO">
-        SELECT
+        SELECT DISTINCT
         t1.hospital_id AS hospitalId,
         t1.behospital_code AS behospitalCode,
+        t1.bed_code AS bedCode,
         t1.LEVEL AS LEVEL,
-        t1.NAME AS patName,
+        t1.grade_type AS gradeType,
+        t1.score_res AS scoreRes,
+        t1.NAME AS NAME,
         t1.sex AS sex,
         t1.beh_dept_id AS behDeptId,
         t1.beh_dept_name AS behDeptName,
         t1.doctor_id AS doctorId,
         t1.doctor_name AS doctorName,
+        t1.beh_doctor_id AS behDoctorId,
+        t1.beh_doctor_name AS behDoctorName,
+        t1.director_doctor_id AS directorDoctorId,
+        t1.director_doctor_name AS directorDoctorName,
+        t1.birthday AS birthday,
+        t1.behospital_date AS behospitalDate,
         t1.leave_hospital_date AS leaveHospitalDate,
-        t2.age
+        t1.placefile_date AS placefileDate,
+        t1.gmt_create AS gradeTime,
+        t1.diagnose,
+        t1.ward_name AS wardName,
+        t2.age,
+        t1.file_code AS fileCode
         FROM
         (
         SELECT DISTINCT
         a.hospital_id,
         a.behospital_code,
+        a.bed_code,
+        a.file_code,
         b.LEVEL,
+        b.grade_type,
+        b.score_res,
         a.NAME,
         a.sex,
         a.beh_dept_id,
         a.beh_dept_name,
+        a.birthday,
+        a.behospital_date,
+        a.leave_hospital_date,
         a.doctor_id,
         a.doctor_name,
-        DATE_FORMAT( a.leave_hospital_date, '%Y-%m-%d' ) AS leave_hospital_date
+        a.beh_doctor_id,
+        a.beh_doctor_name,
+        a.director_doctor_id,
+        a.director_doctor_name,
+        a.diagnose,
+        a.placefile_date,
+        a.ward_name,
+        b.gmt_create
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -2863,6 +2931,16 @@
         <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
             AND a.doctor_name = #{qcResultShortPageVO.doctorName}
         </if>
+        <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
+            AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
+            OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
+            OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
+        </if>
+        <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
+            AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
+            OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
+            OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
+        </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
         </if>

+ 1 - 1
src/main/resources/mapper/HomePageMapper.xml

@@ -328,7 +328,7 @@
     </select>
 
     <!-- 按科室统计平均费用(分页) -->
-    <select id="getAverageFeePage"   resultType="com.diagbot.dto.AverageStatisticsDTO">
+    <select id="getAverageFeePage"   resultType="com.diagbot.dto.AverageStatisticsFeeDTO">
         SELECT t1.*
         FROM
         (SELECT

+ 1 - 1
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -1087,7 +1087,7 @@
     </select>
 
     <!-- 缺陷详情(分页) -->
-    <select id="entryCountGroupByEntryPage"  resultType="com.diagbot.dto.EntryNumDTO">
+    <select id="entryCountGroupByEntryPage"  resultType="com.diagbot.dto.EntryNumGroupDTO">
         SELECT
         t.*
         FROM