瀏覽代碼

Merge branch 'dev/20220407_v2.3.0通用版_医生质控平均分报表'

# Conflicts:
#	pom.xml
#	src/main/java/com/diagbot/facade/RecordCheckFacade.java
#	src/main/java/com/diagbot/mapper/QcresultInfoMapper.java
#	src/main/java/com/diagbot/service/QcresultInfoService.java
#	src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java
#	src/main/resources/mapper/QcresultInfoMapper.xml
songxinlu 3 年之前
父節點
當前提交
5530159748
共有 27 個文件被更改,包括 3322 次插入95 次删除
  1. 2 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  2. 2 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  3. 113 0
      src/main/java/com/diagbot/dto/DoctorAverageLevelDTO.java
  4. 49 0
      src/main/java/com/diagbot/dto/DoctorAverageStatisticsDTO.java
  5. 36 0
      src/main/java/com/diagbot/dto/ExportBehospital_7DTO.java
  6. 31 0
      src/main/java/com/diagbot/dto/ExportBehospital_90DTO.java
  7. 23 0
      src/main/java/com/diagbot/dto/ExportCase_7DTO.java
  8. 37 0
      src/main/java/com/diagbot/dto/ExportDoctorAverageLevel_7DTO.java
  9. 36 0
      src/main/java/com/diagbot/dto/ExportDoctorAverageLevel_90DTO.java
  10. 48 0
      src/main/java/com/diagbot/dto/ExportDoctorAverageStatisticsDTO.java
  11. 33 0
      src/main/java/com/diagbot/dto/ExportGetDoctorDetailPageDTO.java
  12. 17 0
      src/main/java/com/diagbot/dto/ExportMsg_7DTO.java
  13. 128 0
      src/main/java/com/diagbot/dto/GetDetailRecordListPageDTO.java
  14. 65 0
      src/main/java/com/diagbot/dto/GetDoctorDetailPageDTO.java
  15. 5 1
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java
  16. 198 0
      src/main/java/com/diagbot/facade/ConsoleByDoctorFacade.java
  17. 250 71
      src/main/java/com/diagbot/facade/ConsoleExportFacade.java
  18. 74 20
      src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java
  19. 101 0
      src/main/java/com/diagbot/vo/DoctorAverageLevelVO.java
  20. 55 0
      src/main/java/com/diagbot/vo/DoctorAverageStatisticsVO.java
  21. 104 0
      src/main/java/com/diagbot/vo/ExportDoctorAverageLevelVO.java
  22. 118 0
      src/main/java/com/diagbot/vo/GetDetailRecordListPageVO.java
  23. 70 0
      src/main/java/com/diagbot/vo/GetDoctorDetailPageVO.java
  24. 128 0
      src/main/java/com/diagbot/web/ConsoleByDoctorController.java
  25. 1 1
      src/main/resources/application-test.yml
  26. 1 1
      src/main/resources/bootstrap.yml
  27. 1597 1
      src/main/resources/mapper/BehospitalInfoMapper.xml

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

@@ -294,6 +294,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/appealInfo/getAppealMode").permitAll()
                 .antMatchers("/qc/appealInfo/getUserRole").permitAll()
                 .antMatchers("/qc/mode/getModes").permitAll()
+                .antMatchers("/consoleByDoctor/**").permitAll()
+                .antMatchers("/qc/getDoctorDetail/**").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

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

@@ -371,6 +371,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/appealInfo/getAppealMode", request)
                 || matchers("/qc/appealInfo/getUserRole", request)
                 || matchers("/qc/mode/getModes", request)
+                || matchers("/consoleByDoctor/**", request)
+                || matchers("/qc/getDoctorDetail/**", request)
                 || matchers("/", request)) {
             return true;
         }

+ 113 - 0
src/main/java/com/diagbot/dto/DoctorAverageLevelDTO.java

@@ -0,0 +1,113 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 医生质控平均分-患者列表(等级)-接口出参
+ * @Author songxl
+ * @Date 2022/4/11 9:20
+ */
+@ApiModel(value = "医生质控平均分-患者列表(等级)-接口出参")
+@Getter
+@Setter
+public class DoctorAverageLevelDTO implements Serializable {
+    private static final long serialVersionUID = 4875168077452918044L;
+
+    @ApiModelProperty(value = "科室")
+    private String behDeptName;
+
+    @ApiModelProperty(value = "主管医生")
+    private String doctorName;
+
+    @ApiModelProperty(value = "住院医生姓名")
+    private String behDoctorName;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String name;
+
+    @ApiModelProperty(value = "档案号")
+    private String fileCode;
+
+    @ApiModelProperty(value = "年龄")
+    private String age = "";
+
+    @ApiModelProperty(value = "入院时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+
+    @ApiModelProperty(value = "出院时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+
+    @ApiModelProperty(value = "最后得分")
+    private Double scoreRes;
+
+    @ApiModelProperty(value = "病历等级")
+    private String level;
+
+    @ApiModelProperty(value = "评分时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date gradeTime;
+
+    @ApiModelProperty(value = "病人住院ID")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    @ApiModelProperty(value = "出生日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date birthday;
+
+    @ApiModelProperty(value = "病区名称")
+    private String wardName;
+
+    @ApiModelProperty(value = "床位号")
+    private String bedCode;
+
+    @ApiModelProperty(value = "疾病名称")
+    private String diagnose;
+
+
+    @ApiModelProperty(value = "病案首页得分")
+    private Double scoreBn;
+
+    @ApiModelProperty(value = "评分类型(1:机器,2:人工)")
+    private String gradeType;
+
+    @ApiModelProperty(value = "主任医生")
+    private String directorDoctorName;
+
+
+
+    @ApiModelProperty(value = "归档时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date placefileDate;
+
+    @ApiModelProperty(value = "病历核查状态")
+    private Integer checkStatus;
+
+    @ApiModelProperty(value = "病案首页核查状态")
+    private Integer mrStatus;
+
+    @ApiModelProperty(value = "病历核查人")
+    private String chName;
+
+    @ApiModelProperty(value = "病案首页核查人")
+    private String mrName;
+
+    @ApiModelProperty(value = "病历核查时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+
+    @ApiModelProperty(value = "病案首页核查时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
+}

+ 49 - 0
src/main/java/com/diagbot/dto/DoctorAverageStatisticsDTO.java

@@ -0,0 +1,49 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 医生质控平均分页面统计-接口出参
+ * @Author songxl
+ * @Date 2022/4/8 13:20
+ */
+@ApiModel(value = "医生质控平均分页面统计-接口出参")
+@Getter
+@Setter
+public class DoctorAverageStatisticsDTO implements Serializable {
+    private static final long serialVersionUID = 981655366059103193L;
+
+    @ApiModelProperty(value = "科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "科室id")
+    private String deptId;
+
+    @ApiModelProperty(value = "医生名称")
+    private String doctorName;
+
+    @ApiModelProperty(value = "医生工号")
+    private String doctorId;
+
+    @ApiModelProperty(value = "缺陷条目数")
+    private Integer entryNum = 0;
+
+    @ApiModelProperty(value = "质控评分(平均分)")
+    private Double averageValue = 0d;
+
+    @ApiModelProperty(value = "甲级病历数")
+    private Integer firstLevelStrNum = 0;
+
+    @ApiModelProperty(value = "乙级病历数")
+    private Integer secondLevelStrNum = 0;
+
+    @ApiModelProperty(value = "丙级病历数")
+    private Integer thirdLevelStrNum = 0;
+
+
+}

+ 36 - 0
src/main/java/com/diagbot/dto/ExportBehospital_7DTO.java

@@ -0,0 +1,36 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/6/2 19:35
+ */
+@Getter
+@Setter
+public class ExportBehospital_7DTO {
+    @Excel(name = "主管医生", needMerge = true)
+    private String doctorName;
+    @Excel(name = "患者姓名", needMerge = true)
+    private String patName;
+    @Excel(name = "住院号", needMerge = true)
+    private String behospitalCode;
+    @Excel(name = "入院时间", needMerge = true, exportFormat = "yyyy/MM/dd")
+    private Date behospitalDate;
+    @Excel(name = "出院时间", needMerge = true, exportFormat = "yyyy/MM/dd")
+    private Date leaveHospitalDate;
+    @Excel(name = "分数", needMerge = true)
+    private Double score;
+    @Excel(name = "病案首页分数", needMerge = true)
+    private Double scoreBn;
+    @ExcelCollection(name = "")
+    private List<ExportCase_7DTO> exportExcelCaseDTOS;
+
+}

+ 31 - 0
src/main/java/com/diagbot/dto/ExportBehospital_90DTO.java

@@ -0,0 +1,31 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/6/2 19:35
+ */
+@Getter
+@Setter
+public class ExportBehospital_90DTO {
+    @Excel(name = "主管医生", needMerge = true)
+    private String doctorName;
+    @Excel(name = "患者姓名", needMerge = true)
+    private String patName;
+    @Excel(name = "住院号", needMerge = true)
+    private String behospitalCode;
+    @Excel(name = "入院时间", needMerge = true, exportFormat = "yyyy/MM/dd")
+    private Date behospitalDate;
+    @Excel(name = "出院时间", needMerge = true, exportFormat = "yyyy/MM/dd")
+    private Date leaveHospitalDate;
+    @Excel(name = "分数", needMerge = true)
+    private Double score;
+    @Excel(name = "病案首页分数", needMerge = true)
+    private Double scoreBn;
+}

+ 23 - 0
src/main/java/com/diagbot/dto/ExportCase_7DTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/6/2 19:47
+ */
+@Getter
+@Setter
+public class ExportCase_7DTO {
+    @Excel(name = "模块名称", needMerge = true)
+    private String caseName;
+    @ExcelCollection(name = "")
+    private List<ExportMsg_7DTO> exportExcelMsgDTOS;
+
+}

+ 37 - 0
src/main/java/com/diagbot/dto/ExportDoctorAverageLevel_7DTO.java

@@ -0,0 +1,37 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 医生质控平均分-患者列表(等级)-接口出参
+ * @Author songxl
+ * @Date 2022/4/11 9:20
+ */
+@ApiModel(value = "医生质控平均分-患者列表(等级)-接口出参")
+@Getter
+@Setter
+public class ExportDoctorAverageLevel_7DTO implements Serializable {
+    private static final long serialVersionUID = 4875168077452918044L;
+
+    @ApiModelProperty(value = "科室")
+    @Excel(name = "科室", needMerge = true)
+    private String behDeptName;
+
+    @ApiModelProperty(value = "平均分数")
+    @Excel(name = "平均分数", needMerge = true)
+    private Double avgScore;
+
+    @ApiModelProperty(value = "患者信息集合")
+    @ExcelCollection(name = "")
+    private List<ExportBehospital_7DTO> excelBehospitalDTOS;
+}

+ 36 - 0
src/main/java/com/diagbot/dto/ExportDoctorAverageLevel_90DTO.java

@@ -0,0 +1,36 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 医生质控平均分-患者列表(等级)-接口出参
+ * @Author songxl
+ * @Date 2022/4/11 9:20
+ */
+@ApiModel(value = "医生质控平均分-患者列表(等级)-接口出参")
+@Getter
+@Setter
+public class ExportDoctorAverageLevel_90DTO implements Serializable {
+    private static final long serialVersionUID = 4875168077452918044L;
+
+    @ApiModelProperty(value = "科室")
+    @Excel(name = "科室", needMerge = true)
+    private String behDeptName;
+
+    @Excel(name = "平均分数", needMerge = true)
+    private Double avgScore;
+
+    @ApiModelProperty(value = "科室")
+    @ExcelCollection(name = "" )
+    private List<ExportBehospital_90DTO> excelBehospitalDTOS;
+}

+ 48 - 0
src/main/java/com/diagbot/dto/ExportDoctorAverageStatisticsDTO.java

@@ -0,0 +1,48 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 医生质控平均分页面统计-导出-接口出参
+ * @Author songxl
+ * @Date 2022/4/8 13:20
+ */
+@ApiModel(value = "医生质控平均分页面统计-导出-接口出参")
+@Getter
+@Setter
+public class ExportDoctorAverageStatisticsDTO implements Serializable {
+    private static final long serialVersionUID = 981655366059103193L;
+
+    @Excel(name = "科室")
+    private String deptName;
+
+
+    @Excel(name = "医生姓名")
+    private String doctorName;
+
+    @Excel(name = "医生工号")
+    private String doctorId;
+
+    @Excel(name = "缺陷总数")
+    private Integer entryNum = 0;
+
+    @Excel(name = "质控平均分")
+    private Double averageValue = 0d;
+
+    @Excel(name = "甲级病历数")
+    private Integer firstLevelStrNum = 0;
+
+    @Excel(name = "乙级病历数")
+    private Integer secondLevelStrNum = 0;
+
+    @Excel(name = "丙级病历数")
+    private Integer thirdLevelStrNum = 0;
+
+
+}

+ 33 - 0
src/main/java/com/diagbot/dto/ExportGetDoctorDetailPageDTO.java

@@ -0,0 +1,33 @@
+package com.diagbot.dto;
+
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 获取医生缺陷列表出参
+ * @author: zhanghang
+ * @time: 2022/4/11 19:00
+ */
+@ApiModel(value = "获取医生缺陷列表出参-接口出参")
+@Getter
+@Setter
+public class ExportGetDoctorDetailPageDTO implements Serializable {
+
+    @Excel(name = "缺陷名称", width = 40, orderNum = "2")
+    private String name;
+
+    @Excel(name = "模块名称", width = 20, orderNum = "1")
+    private String casesName;
+
+    @Excel(name = "数量", orderNum = "5")
+    private Integer num = 0;
+
+    @Excel(name = "缺陷占比", orderNum = "6")
+    private String percentStr = "0.00%";
+
+}

+ 17 - 0
src/main/java/com/diagbot/dto/ExportMsg_7DTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/6/2 19:47
+ */
+@Getter
+@Setter
+public class ExportMsg_7DTO {
+    @Excel(name = "存在问题", isWrap = false)
+    private String msg;
+}

+ 128 - 0
src/main/java/com/diagbot/dto/GetDetailRecordListPageDTO.java

@@ -0,0 +1,128 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 获取医生缺陷数量出参
+ * @Author:zhanghang
+ * @time: 2022/4/11 19:00
+ */
+@ApiModel(value = "获取医生缺陷数量出参-接口出参")
+@Getter
+@Setter
+public class GetDetailRecordListPageDTO implements Serializable {
+
+    @ApiModelProperty(value = "医院id")
+    private String hospitalId;
+
+
+    @ApiModelProperty(value = "病历等级")
+    private String level;
+
+    @ApiModelProperty(value = "病历得分")
+    private Double scoreRes;
+
+    @ApiModelProperty(value = "病案首页得分")
+    private Double scoreBn;
+
+    @ApiModelProperty(value = "病人住院序号")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "病案号")
+    private String fileCode;
+
+    @ApiModelProperty(value = "病人姓名")
+    private String name;
+
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    @ApiModelProperty(value = "年龄")
+    private String age;
+
+    @ApiModelProperty(value = "床号")
+    private String bedCode;
+
+    @ApiModelProperty(value = "入院日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+
+    @ApiModelProperty(value = "出院日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+
+    @ApiModelProperty(value = "归档日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date placefileDate;
+
+    @ApiModelProperty(value = "主诊断")
+    private String diagnose;
+
+    @ApiModelProperty(value = "住院医生ID")
+    private String behDoctorId;
+
+
+    @ApiModelProperty(value = "住院医生姓名")
+    private String behDoctorName;
+
+    @ApiModelProperty(value = "主治医生id")
+    private String doctorId;
+
+    @ApiModelProperty(value = "主治医生姓名")
+    private String doctorName;
+
+    @ApiModelProperty(value = "主任医生id")
+    private String directorDoctorId;
+
+    @ApiModelProperty(value = "主任医生")
+    private String directorDoctorName;
+
+    @ApiModelProperty(value = "科室编码")
+    private String behDeptId;
+
+    @Excel(name = "科室", width = 70, orderNum = "17")
+    @ApiModelProperty(value = "科室名称")
+    private String behDeptName;
+
+    @ApiModelProperty(value = "评分时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date gradeTime;
+
+    @ApiModelProperty(value = "评分类型")
+    private Integer gradeType;
+
+    @ApiModelProperty(value = "出生日期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date birthday;
+
+    @ApiModelProperty(value = "病区名称")
+    private String wardName;
+
+    @ApiModelProperty(value = "病历核查状态")
+    private Integer checkStatus;
+
+    @ApiModelProperty(value = "首页核查状态")
+    private Integer mrStatus;
+
+    @ApiModelProperty(value = "病历核查人员")
+    private String chName;
+
+    @ApiModelProperty(value = "首页核查人员")
+    private String mrName;
+
+    @ApiModelProperty(value = "病历核查时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+
+    @ApiModelProperty(value = "首页核查时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
+}

+ 65 - 0
src/main/java/com/diagbot/dto/GetDoctorDetailPageDTO.java

@@ -0,0 +1,65 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 获取医生缺陷列表
+ * @author: zhanghang
+ * @time: 2022/4/11 19:00
+ */
+@ApiModel(value = "获取医生缺陷列表-接口出参")
+@Getter
+@Setter
+public class GetDoctorDetailPageDTO implements Serializable {
+
+    @ApiModelProperty(value = "条目缺陷id")
+    private Long id;
+
+    @ApiModelProperty(value = "条目缺陷名称")
+    private String name;
+
+    @ApiModelProperty(value = "模块id")
+    private Long casesId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String casesName;
+
+    @ApiModelProperty(value = "科室id")
+    private String deptId;
+
+    @ApiModelProperty(value = "科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "条目缺陷总数")
+    private Integer totleNum = 0;
+
+    @ApiModelProperty(value = "条目缺陷数")
+    private Integer num = 0;
+
+    @ApiModelProperty(value = "条目缺陷占比")
+    private Double percent = 0.00d;
+
+    @ApiModelProperty(value = "条目缺陷占比")
+    private String percentStr = "0.00%";
+
+    @ApiModelProperty(value = "条目缺陷分值")
+    private Double score = 0d;
+
+    @ApiModelProperty(value = "单项否决标识,0-否,1-是")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "规则类型(0:无,1:空项,2:错误)")
+    private Integer ruleType;
+
+    @ApiModelProperty(value = "医生ID")
+    private String doctorId;
+
+    @ApiModelProperty(value = "医生名称")
+    private String doctorName;
+
+}

+ 5 - 1
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -270,7 +270,11 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             //通过页面类型显示不同操作按钮
             showButtonByPageType(hospitalId, getDetailVO, res);
             //添加核查操作是否与申诉状态关联配置
-            res.put("checkOperationWithAppeal", sysHospitalSetFacade.getValue(hospitalId, "check_operation_with_appeal"));
+            if(StringUtil.isBlank(sysHospitalSetFacade.getValue(hospitalId, "check_operation_with_appeal"))){
+                res.put("checkOperationWithAppeal", false);
+            }else{
+                res.put("checkOperationWithAppeal",Boolean.parseBoolean(sysHospitalSetFacade.getValue(hospitalId, "check_operation_with_appeal")));
+            }
         }
 
         // 获取提示信息

+ 198 - 0
src/main/java/com/diagbot/facade/ConsoleByDoctorFacade.java

@@ -0,0 +1,198 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.DoctorAverageLevelDTO;
+import com.diagbot.dto.DoctorAverageStatisticsDTO;
+import com.diagbot.dto.ExportExcelDTO;
+import com.diagbot.dto.GetDetailRecordListPageDTO;
+import com.diagbot.dto.GetDoctorDetailPageDTO;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.DoctorAverageLevelVO;
+import com.diagbot.vo.DoctorAverageStatisticsVO;
+import com.diagbot.vo.GetDetailRecordListPageVO;
+import com.diagbot.vo.GetDoctorDetailPageVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:控制台(医生)统计相关处理
+ * @Author:songxl
+ * @date 2022/4/8 13:20
+ */
+@Component
+public class ConsoleByDoctorFacade {
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+    @Autowired
+    QcresultInfoFacade qcresultInfoFacade;
+
+
+    /**
+     * 医生质控平均分页面统计
+     *
+     * @param doctorAverageStatisticsVO
+     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.diagbot.dto.DoctorAverageStatisticsDTO>
+     */
+    public IPage<DoctorAverageStatisticsDTO> doctorAverageStatistics(DoctorAverageStatisticsVO doctorAverageStatisticsVO) {
+        doctorAverageStatisticsVO.setHospitalId(SysUserUtils.getCurrentHospitalID());
+        //替换
+        transformParam(doctorAverageStatisticsVO);
+        return behospitalInfoFacade.getBaseMapper().doctorAverageStatistics(doctorAverageStatisticsVO);
+    }
+
+    /**
+     * 参数替换
+     *
+     * @param doctorAverageStatisticsVO
+     * @Return void
+     */
+    private void transformParam(DoctorAverageStatisticsVO doctorAverageStatisticsVO) {
+
+        if ("-".equals(doctorAverageStatisticsVO.getDeptId())) {
+            doctorAverageStatisticsVO.setDeptId("-0");
+        }
+        if ("-".equals(doctorAverageStatisticsVO.getDeptName())) {
+            doctorAverageStatisticsVO.setDeptName("-0");
+        }
+        if ("-".equals(doctorAverageStatisticsVO.getDoctorId())) {
+            doctorAverageStatisticsVO.setDoctorId("-0");
+        }
+        if ("-".equals(doctorAverageStatisticsVO.getDoctorName())) {
+            doctorAverageStatisticsVO.setDoctorName("-0");
+        }
+    }
+
+    /**
+     * 医生质控平均分-患者列表(等级)
+     *
+     * @param doctorAverageLevelVO
+     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.diagbot.dto.DoctorAverageLevelDTO>
+     */
+    public IPage<DoctorAverageLevelDTO> doctorAverageLevelPage(DoctorAverageLevelVO doctorAverageLevelVO) {
+        doctorAverageLevelPageSet(doctorAverageLevelVO);
+        return behospitalInfoFacade.getBaseMapper().doctorAverageLevelPage(doctorAverageLevelVO);
+    }
+
+
+    private void doctorAverageLevelPageSet(DoctorAverageLevelVO doctorAverageLevelVO) {
+        //入参验证
+        //入院时间
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getBehosDateStart()) {
+            doctorAverageLevelVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(doctorAverageLevelVO.getBehosDateStart()));
+        }
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getBehosDateEnd()) {
+            doctorAverageLevelVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(doctorAverageLevelVO.getBehosDateEnd(), 1)));
+        }
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getBehosDateStart() && null != doctorAverageLevelVO.getBehosDateEnd()) {
+            if (DateUtil.after(doctorAverageLevelVO.getBehosDateStart(), doctorAverageLevelVO.getBehosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
+            }
+        }
+        //出院时间
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getLeaveHosDateStart()) {
+            doctorAverageLevelVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(doctorAverageLevelVO.getLeaveHosDateStart()));
+        }
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getLeaveHosDateEnd()) {
+            doctorAverageLevelVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(doctorAverageLevelVO.getLeaveHosDateEnd(), 1)));
+        }
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getLeaveHosDateStart() && null != doctorAverageLevelVO.getLeaveHosDateEnd()) {
+            if (DateUtil.after(doctorAverageLevelVO.getLeaveHosDateStart(), doctorAverageLevelVO.getLeaveHosDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
+            }
+        }
+        doctorAverageLevelVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+
+        //医生、科室为空时参数替换
+        if ("-".equals(doctorAverageLevelVO.getDeptId())) {
+            doctorAverageLevelVO.setDeptId("-0");
+        }
+        if ("-".equals(doctorAverageLevelVO.getDeptName())) {
+            doctorAverageLevelVO.setDeptName("-0");
+        }
+        if ("-".equals(doctorAverageLevelVO.getDoctorCode())) {
+            doctorAverageLevelVO.setDoctorCode("-0");
+        }
+        if ("-".equals(doctorAverageLevelVO.getDoctorName())) {
+            doctorAverageLevelVO.setDoctorName("-0");
+        }
+    }
+
+    /**
+     * 获取缺陷列表
+     *
+     * @param getDoctorDetailPageVO
+     * @return
+     */
+    public IPage<GetDoctorDetailPageDTO> getDoctorDetailPage(GetDoctorDetailPageVO getDoctorDetailPageVO) {
+        if ("-".equals(getDoctorDetailPageVO.getDeptId())) {
+            getDoctorDetailPageVO.setDeptId("-0");
+        }
+        if ("-".equals(getDoctorDetailPageVO.getDeptName())) {
+            getDoctorDetailPageVO.setDeptName("-0");
+        }
+        if ("-".equals(getDoctorDetailPageVO.getDoctorId())) {
+            getDoctorDetailPageVO.setDoctorId("-0");
+        }
+        if ("-".equals(getDoctorDetailPageVO.getDoctorName())) {
+            getDoctorDetailPageVO.setDoctorName("-0");
+        }
+        getDoctorDetailPageVO.setHospitalId(SysUserUtils.getCurrentHospitalID());
+        IPage<GetDoctorDetailPageDTO> detailPageList = behospitalInfoFacade.getBaseMapper().getDoctorDetailPage(getDoctorDetailPageVO);
+        return detailPageList;
+    }
+
+    /**
+     * 获取缺陷数量对应的病历
+     *
+     * @param getDetailRecordListPageVO
+     * @return
+     */
+    public IPage<GetDetailRecordListPageDTO> getDetailRecordListPage(GetDetailRecordListPageVO getDetailRecordListPageVO) {
+        if ("-".equals(getDetailRecordListPageVO.getDeptId())) {
+            getDetailRecordListPageVO.setDeptId("-0");
+        }
+        if ("-".equals(getDetailRecordListPageVO.getDeptName())) {
+            getDetailRecordListPageVO.setDeptName("-0");
+        }
+        if ("-".equals(getDetailRecordListPageVO.getDoctorId())) {
+            getDetailRecordListPageVO.setDoctorId("-0");
+        }
+        if ("-".equals(getDetailRecordListPageVO.getDoctorName())) {
+            getDetailRecordListPageVO.setDoctorName("-0");
+        }
+        getDetailRecordListPageVO.setHospitalId(SysUserUtils.getCurrentHospitalID());
+        IPage<GetDetailRecordListPageDTO> detailPageList = behospitalInfoFacade.getBaseMapper().getDetailRecordListPage(getDetailRecordListPageVO);
+        return detailPageList;
+    }
+
+    /**
+     * 导出缺陷数量对应的病历
+     *
+     * @param getDetailRecordListPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> getDetailRecordListExport(GetDetailRecordListPageVO getDetailRecordListPageVO) {
+        if ("-".equals(getDetailRecordListPageVO.getDeptId())) {
+            getDetailRecordListPageVO.setDeptId("-0");
+        }
+        if ("-".equals(getDetailRecordListPageVO.getDeptName())) {
+            getDetailRecordListPageVO.setDeptName("-0");
+        }
+        if ("-".equals(getDetailRecordListPageVO.getDoctorId())) {
+            getDetailRecordListPageVO.setDoctorId("-0");
+        }
+        if ("-".equals(getDetailRecordListPageVO.getDoctorName())) {
+            getDetailRecordListPageVO.setDoctorName("-0");
+        }
+        getDetailRecordListPageVO.setHospitalId(SysUserUtils.getCurrentHospitalID());
+        List<ExportExcelDTO> detailPageList = behospitalInfoFacade.getBaseMapper().getDetailRecordListExport(getDetailRecordListPageVO);
+        return detailPageList;
+    }
+
+}

+ 250 - 71
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -19,8 +19,8 @@ import javax.servlet.http.HttpServletResponse;
 import java.util.*;
 
 /**
- * @Description: 报表导出装饰层
- * @author: gaodm
+ * @Description: 控制台(医生)统计相关API
+ * @author: zhanghang
  * @time: 2020/6/18 10:41
  */
 @Component
@@ -34,6 +34,8 @@ public class ConsoleExportFacade {
     private SysHospitalSetFacade sysHospitalSetFacade;
     @Autowired
     private FilterFacade filterFacade;
+    @Autowired
+    private ConsoleByDoctorFacade consoleByDoctorFacade;
 
     /**
      * 病案首页合格率占比
@@ -88,7 +90,7 @@ public class ConsoleExportFacade {
         filterVO.setSize(Long.MAX_VALUE);
         filterVO.setSearchCount(false);
         String fileName = null;
-        if ( "1".equals(filterVO.getIsPlacefile())) {
+        if ("1".equals(filterVO.getIsPlacefile())) {
             fileName = "终末病历稽查表.xls";
         } else {
             fileName = "运行病历稽查表.xls";
@@ -212,7 +214,6 @@ public class ConsoleExportFacade {
     }
 
 
-
     /**
      * 各模块缺陷占比导出
      *
@@ -323,7 +324,7 @@ public class ConsoleExportFacade {
         long interval_7 = 7 * 24 * 60 * 60 * 1000;
         long interval_90 = 90 * 24 * 60 * 60 * 1000l;
 
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             //时间间隔7天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -331,7 +332,7 @@ public class ConsoleExportFacade {
             if (endDate.getTime() - startDate.getTime() > interval_7) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
             }
-        }else{
+        } else {
             //时间间隔90天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -346,27 +347,27 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setSearchCount(false);
         List<ExportExcelDTO> records = behospitalInfoFacade.leaveHosMRPageExport(qcResultShortPageVO);
         List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             resWide = transList(records, resWide);
         }
         String fileName = "出院人数统计.xls";
-          if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
         }
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
         }
     }
 
-    public List<ExportWideExcelDTO> transList(List<ExportExcelDTO>res, List<ExportWideExcelDTO>resWide){
-        if(ListUtil.isNotEmpty(res)){
-            res.forEach(exportExcelDTO->{
+    public List<ExportWideExcelDTO> transList(List<ExportExcelDTO> res, List<ExportWideExcelDTO> resWide) {
+        if (ListUtil.isNotEmpty(res)) {
+            res.forEach(exportExcelDTO -> {
                 ExportWideExcelDTO exportWideExcelDTO = new ExportWideExcelDTO();
                 exportWideExcelDTO.setAvgScore(exportExcelDTO.getAvgScore());
                 exportWideExcelDTO.setBehDeptName(exportExcelDTO.getBehDeptName());
                 List<ExportExcelBehospitalDTO> excelBehospitalDTOS = exportExcelDTO.getExcelBehospitalDTOS();
                 List<ExportExcelWideBehospitalDTO> exportExcelWideBehospitalDTOs = new ArrayList<>();
-                excelBehospitalDTOS.forEach(exportExcelBehospitalDTO->{
+                excelBehospitalDTOS.forEach(exportExcelBehospitalDTO -> {
                     ExportExcelWideBehospitalDTO exportExcelWideBehospitalDTO = new ExportExcelWideBehospitalDTO();
                     exportExcelWideBehospitalDTO.setDoctorName(exportExcelBehospitalDTO.getDoctorName());
                     exportExcelWideBehospitalDTO.setBehospitalCode(exportExcelBehospitalDTO.getBehospitalCode());
@@ -447,7 +448,7 @@ public class ConsoleExportFacade {
         long interval_7 = 7 * 24 * 60 * 60 * 1000;
         long interval_90 = 90 * 24 * 60 * 60 * 1000l;
 
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             //时间间隔7天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -455,7 +456,7 @@ public class ConsoleExportFacade {
             if (endDate.getTime() - startDate.getTime() > interval_7) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
             }
-        }else{
+        } else {
             //时间间隔90天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -470,22 +471,22 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setSearchCount(false);
         List<ExportExcelDTO> records = behospitalInfoFacade.badLevelPagePageExport(qcResultShortPageVO);
         List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             resWide = transList(records, resWide);
         }
         String fileName = null;
-        if("不合格数".equals(qcResultShortPageVO.getTitleName())){
+        if ("不合格数".equals(qcResultShortPageVO.getTitleName())) {
             fileName = "病案首页不合格数病历详情页.xls";
-        }else{
+        } else {
             fileName = "病案首页合格数病历详情页.xls";
         }
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
         }
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
         }
-   }
+    }
 
     /**
      * 病案首页不合格/合格数-XY
@@ -506,7 +507,7 @@ public class ConsoleExportFacade {
         long interval_7 = 7 * 24 * 60 * 60 * 1000;
         long interval_90 = 90 * 24 * 60 * 60 * 1000l;
 
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             //时间间隔7天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -514,7 +515,7 @@ public class ConsoleExportFacade {
             if (endDate.getTime() - startDate.getTime() > interval_7) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
             }
-        }else{
+        } else {
             //时间间隔90天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -529,19 +530,19 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setSearchCount(false);
         List<ExportExcelDTO> records = behospitalInfoFacade.getBaseMapper().badLevelPageXYExport(qcResultShortPageVO);
         List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             resWide = transList(records, resWide);
         }
         String fileName = null;
-        if("不合格数".equals(qcResultShortPageVO.getTitleName())){
+        if ("不合格数".equals(qcResultShortPageVO.getTitleName())) {
             fileName = "病案首页不合格数病历详情页.xls";
-        }else{
+        } else {
             fileName = "病案首页合格数病历详情页.xls";
         }
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
         }
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
         }
     }
@@ -614,7 +615,7 @@ public class ConsoleExportFacade {
     public void hmImproveMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-    if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
                 && qcResultShortPageVO.getDeptName().equals("全部")) {
             qcResultShortPageVO.setDeptName("");
         }
@@ -624,7 +625,7 @@ public class ConsoleExportFacade {
         long interval_7 = 7 * 24 * 60 * 60 * 1000;
         long interval_90 = 90 * 24 * 60 * 60 * 1000l;
 
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             //时间间隔7天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -632,7 +633,7 @@ public class ConsoleExportFacade {
             if (endDate.getTime() - startDate.getTime() > interval_7) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
             }
-        }else{
+        } else {
             //时间间隔90天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -647,14 +648,14 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setSearchCount(false);
         List<ExportExcelDTO> records = behospitalInfoFacade.hmImproveMRPageExport(qcResultShortPageVO);
         List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             resWide = transList(records, resWide);
         }
         String fileName = "病案首页改善率评分病历导出.xls";
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
         }
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
         }
     }
@@ -679,7 +680,7 @@ public class ConsoleExportFacade {
         long interval_7 = 7 * 24 * 60 * 60 * 1000;
         long interval_90 = 90 * 24 * 60 * 60 * 1000l;
 
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             //时间间隔7天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -687,7 +688,7 @@ public class ConsoleExportFacade {
             if (endDate.getTime() - startDate.getTime() > interval_7) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
             }
-        }else{
+        } else {
             //时间间隔90天
             if (endDate.getTime() < startDate.getTime()) {
                 throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
@@ -702,14 +703,14 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setSearchCount(false);
         List<ExportExcelDTO> records = behospitalInfoFacade.qcCheckMRPageExport(qcResultShortPageVO);
         List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             resWide = transList(records, resWide);
         }
         String fileName = "质控核查病历导出.xls";
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("1".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
         }
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+        if ("2".equals(qcResultShortPageVO.getRadioCheck())) {
             ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
         }
     }
@@ -725,21 +726,21 @@ public class ConsoleExportFacade {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         behospitalPageVO.setHospitalId(Long.valueOf(hospitalId));
 
-    Date startDate = behospitalPageVO.getLeaveHosDateStart();
-    Date endDate = behospitalPageVO.getLeaveHosDateEnd();
-    //时间间隔30天
-    long interval = 30 * 24l * 60l * 60l * 1000l;
+        Date startDate = behospitalPageVO.getLeaveHosDateStart();
+        Date endDate = behospitalPageVO.getLeaveHosDateEnd();
+        //时间间隔30天
+        long interval = 30 * 24l * 60l * 60l * 1000l;
         if (endDate.getTime() < startDate.getTime()) {
-        throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
-    }
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+        }
         if (endDate.getTime() - startDate.getTime() > interval) {
-        throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于30天");
-    }
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于30天");
+        }
 
         behospitalPageVO.setCurrent(1L);
         behospitalPageVO.setSize(Long.MAX_VALUE);
         behospitalPageVO.setSearchCount(false);
-      //  orderMethod(behospitalPageVO);
+        //  orderMethod(behospitalPageVO);
 
         IPage<QualityControlDTO> page = consoleFacade.getQualityControlExport(behospitalPageVO);
         List<QualityControlDTO> records = page.getRecords();
@@ -748,27 +749,205 @@ public class ConsoleExportFacade {
         ExcelUtils.exportExcel(records, "病历质控报表", "sheet1", QualityControlDTO.class, fileName, response, 26.8f);
     }
 
-   static void orderMethod(BehospitalPageVO behospitalPageVO){
-       List orders = behospitalPageVO.getOrders();
-       Boolean flag= false;
-       List<OrderItem> itemList = new ArrayList<>();
-       for (Object order : orders) {
-           ObjectMapper objectMapper = new ObjectMapper();
-           OrderItem orderName = objectMapper.convertValue(order, OrderItem.class);
-           itemList.add(orderName);
-           if(!orderName.getColumn().equals("deptName")){
-               flag = true;
-           }
-       }
-       //科室作为第一升序排列,传入排序随后 配合excel注解属性mergeVertical处理科室合并
-       if(flag){
-           OrderItem orderItem = new OrderItem();
-           orderItem.setAsc(true);
-           orderItem.setColumn("deptName");
-           itemList.add(orderItem);
-           Collections.reverse(itemList);
-           behospitalPageVO.setOrders(itemList);
-       }
-
-   };
+    static void orderMethod(BehospitalPageVO behospitalPageVO) {
+        List orders = behospitalPageVO.getOrders();
+        Boolean flag = false;
+        List<OrderItem> itemList = new ArrayList<>();
+        for (Object order : orders) {
+            ObjectMapper objectMapper = new ObjectMapper();
+            OrderItem orderName = objectMapper.convertValue(order, OrderItem.class);
+            itemList.add(orderName);
+            if (!orderName.getColumn().equals("deptName")) {
+                flag = true;
+            }
+        }
+        //科室作为第一升序排列,传入排序随后 配合excel注解属性mergeVertical处理科室合并
+        if (flag) {
+            OrderItem orderItem = new OrderItem();
+            orderItem.setAsc(true);
+            orderItem.setColumn("deptName");
+            itemList.add(orderItem);
+            Collections.reverse(itemList);
+            behospitalPageVO.setOrders(itemList);
+        }
+
+    }
+
+    ;
+
+    /**
+     * 医生质控平均分页面统计-导出
+     *
+     * @param response
+     * @param doctorAverageStatisticsVO
+     * @Return void
+     */
+    public void doctorAverageStatisticsExport(HttpServletResponse response, DoctorAverageStatisticsVO doctorAverageStatisticsVO) {
+        //1.查询
+        doctorAverageStatisticsVO.setSize(9999999);
+        IPage<DoctorAverageStatisticsDTO> page = consoleByDoctorFacade.doctorAverageStatistics(doctorAverageStatisticsVO);
+        //2.列表拷贝
+        List<ExportDoctorAverageStatisticsDTO> records = BeanUtil.listCopyTo(page.getRecords(), ExportDoctorAverageStatisticsDTO.class);
+        //3.导出
+        String fileName = "医生质控平均分.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", ExportDoctorAverageStatisticsDTO.class, fileName, response);
+    }
+
+    /**
+     * 医生质控平均分-患者列表(等级)-导出
+     *
+     * @param response
+     * @param exportDoctorAverageLevelVO
+     * @Return void
+     */
+    public void doctorAverageLevelExport(HttpServletResponse response, ExportDoctorAverageLevelVO exportDoctorAverageLevelVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        exportDoctorAverageLevelVO.setHospitalId(Long.parseLong(hospitalId));
+        //时间设置
+        exportQcresultVOSet(exportDoctorAverageLevelVO);
+        List<ExportDoctorAverageLevel_7DTO> res = behospitalInfoFacade.getBaseMapper().doctorAverageLevelExport(exportDoctorAverageLevelVO);
+        List<ExportDoctorAverageLevel_90DTO> resWide = new ArrayList<>();
+        if ("2".equals(exportDoctorAverageLevelVO.getRadioCheck())) {
+            resWide = doctorAveragetransList(res, resWide);
+        }
+        String fileName = "抽查住院病历质量情况.xls";
+        response.setContentType("text/html;charset=UTF-8");
+        if ("1".equals(exportDoctorAverageLevelVO.getRadioCheck())) {
+            ExcelUtils.exportExcelUser(res, null, "sheet1", ExportDoctorAverageLevel_7DTO.class, fileName, response);
+        }
+        if ("2".equals(exportDoctorAverageLevelVO.getRadioCheck())) {
+            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportDoctorAverageLevel_90DTO.class, fileName, response);
+        }
+    }
+
+    public List<ExportDoctorAverageLevel_90DTO> doctorAveragetransList(List<ExportDoctorAverageLevel_7DTO> res, List<ExportDoctorAverageLevel_90DTO> resWide) {
+        if (ListUtil.isNotEmpty(res)) {
+            res.forEach(exportExcelDTO -> {
+                ExportDoctorAverageLevel_90DTO exportWideExcelDTO = new ExportDoctorAverageLevel_90DTO();
+                exportWideExcelDTO.setAvgScore(exportExcelDTO.getAvgScore());
+                exportWideExcelDTO.setBehDeptName(exportExcelDTO.getBehDeptName());
+                List<ExportBehospital_7DTO> excelBehospitalDTOS = exportExcelDTO.getExcelBehospitalDTOS();
+                List<ExportBehospital_90DTO> exportExcelWideBehospitalDTOs = new ArrayList<>();
+                excelBehospitalDTOS.forEach(exportExcelBehospitalDTO -> {
+                    ExportBehospital_90DTO exportBehospital_90DTO = new ExportBehospital_90DTO();
+                    exportBehospital_90DTO.setDoctorName(exportExcelBehospitalDTO.getDoctorName());
+                    exportBehospital_90DTO.setBehospitalCode(exportExcelBehospitalDTO.getBehospitalCode());
+                    exportBehospital_90DTO.setBehospitalDate(exportExcelBehospitalDTO.getBehospitalDate());
+                    exportBehospital_90DTO.setLeaveHospitalDate(exportExcelBehospitalDTO.getLeaveHospitalDate());
+                    exportBehospital_90DTO.setPatName(exportExcelBehospitalDTO.getPatName());
+                    exportBehospital_90DTO.setScore(exportExcelBehospitalDTO.getScore());
+                    exportBehospital_90DTO.setScoreBn(exportExcelBehospitalDTO.getScoreBn());
+                    exportExcelWideBehospitalDTOs.add(exportBehospital_90DTO);
+                });
+                exportWideExcelDTO.setExcelBehospitalDTOS(exportExcelWideBehospitalDTOs);
+                resWide.add(exportWideExcelDTO);
+            });
+        }
+        return resWide;
+    }
+
+    private void exportQcresultVOSet(ExportDoctorAverageLevelVO doctorAverageLevelVO) {
+        //入参验证
+        long interval_7 = 7 * 24 * 60 * 60 * 1000;
+        long interval_90 = 90 * 24 * 60 * 60 * 1000l;
+        //入院时间
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getBehosDateStart() && null != doctorAverageLevelVO.getBehosDateEnd()) {
+            Date startDate = doctorAverageLevelVO.getBehosDateStart();
+            Date endDate = doctorAverageLevelVO.getBehosDateEnd();
+            if ("1".equals(doctorAverageLevelVO.getRadioCheck())) {
+                //时间间隔7天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_7) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+                }
+            } else {
+                //时间间隔90天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_90) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
+                }
+            }
+            doctorAverageLevelVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(doctorAverageLevelVO.getBehosDateStart()));
+            doctorAverageLevelVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(doctorAverageLevelVO.getBehosDateEnd(), 1)));
+        }
+        //出院时间
+        if (null != doctorAverageLevelVO && null != doctorAverageLevelVO.getLeaveHosDateStart() && null != doctorAverageLevelVO.getLeaveHosDateEnd()) {
+            Date startDate = doctorAverageLevelVO.getLeaveHosDateStart();
+            Date endDate = doctorAverageLevelVO.getLeaveHosDateEnd();
+            if ("1".equals(doctorAverageLevelVO.getRadioCheck())) {
+                //时间间隔7天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_7) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+                }
+            } else {
+                //时间间隔90天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_90) {
+                    throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
+                }
+            }
+            doctorAverageLevelVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(doctorAverageLevelVO.getLeaveHosDateStart()));
+            doctorAverageLevelVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(doctorAverageLevelVO.getLeaveHosDateEnd(), 1)));
+        }
+    }
+
+    /**
+     * 医生质控缺陷列表-导出
+     *
+     * @param response
+     * @param getDetailListPageVO
+     * @Return void
+     */
+    public void getDoctorDetailPageExport(HttpServletResponse response, GetDoctorDetailPageVO getDetailListPageVO) {
+        //1.查询
+        getDetailListPageVO.setSize(Long.MAX_VALUE);
+        IPage<GetDoctorDetailPageDTO> doctorDetailPage = consoleByDoctorFacade.getDoctorDetailPage(getDetailListPageVO);
+        //2.列表拷贝
+        List<ExportGetDoctorDetailPageDTO> records = BeanUtil.listCopyTo(doctorDetailPage.getRecords(), ExportGetDoctorDetailPageDTO.class);
+        //3.导出
+        String fileName = "医生缺陷列表.xls";
+        response.setContentType("text/html;charset=UTF-8");
+        ExcelUtils.exportExcelUser(records, null, "sheet1", ExportGetDoctorDetailPageDTO.class, fileName, response);
+    }
+
+    /**
+     * 缺陷数量对应的病历-导出
+     *
+     * @param response
+     * @param getDetailRecordListPageVO
+     * @Return void
+     */
+    public void getDetailRecordListPageExport(HttpServletResponse response, GetDetailRecordListPageVO getDetailRecordListPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getDetailRecordListPageVO.setHospitalId(hospitalId);
+        if (StringUtil.isNotBlank(getDetailRecordListPageVO.getDeptName())
+                && getDetailRecordListPageVO.getDeptName().equals("全部")) {
+            getDetailRecordListPageVO.setDeptName("");
+        }
+        Date startDate = getDetailRecordListPageVO.getStartDate();
+        Date endDate = getDetailRecordListPageVO.getEndDate();
+        //时间间隔90天
+        long interval = 90 * 24l * 60l * 60l * 1000l;
+        if (endDate.getTime() < startDate.getTime()) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+        }
+        if (endDate.getTime() - startDate.getTime() > interval) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
+        }
+        getDetailRecordListPageVO.setSize(Long.MAX_VALUE);
+        //1.查询
+        List<ExportExcelDTO> detailRecordListExport = consoleByDoctorFacade.getDetailRecordListExport(getDetailRecordListPageVO);
+        String fileName = "缺陷病历信息.xls";
+        response.setContentType("text/html;charset=UTF-8");
+        ExcelUtils.exportExcelUser(detailRecordListExport, null, "sheet1", ExportExcelDTO.class, fileName, response);
+    }
 }

+ 74 - 20
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -24,6 +24,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
     public IPage<BehospitalInfoDTO> getPage(BehospitalPageVO behospitalPageVO);
 
     public List<MsgDTO> getMsg(AnalyzeVO analyzeVO);
+
     public List<MsgDTO> getForeignMsg(AnalyzeVO analyzeVO);
 
     public List<MsgDTO> getMsgByEntryCode(AnalyzeCodeVO analyzeCodeVO);
@@ -396,12 +397,13 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
 
 
     /**
- * 离院病人质控评分年龄单独查询详情页
- *
- * @param
- * @return
- */
-    List<Map<String,Object>>getAge(@Param("hospitalId")String hospitalId, @Param("behospitalCodes")Set<String> behospitalCodes);
+     * 离院病人质控评分年龄单独查询详情页
+     *
+     * @param
+     * @return
+     */
+    List<Map<String, Object>> getAge(@Param("hospitalId") String hospitalId, @Param("behospitalCodes") Set<String> behospitalCodes);
+
     /**
      * 改善率统计-全院(首页)
      *
@@ -417,6 +419,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @return
      */
     public List<HomePageImproveDTO> qcCheckStatistics(FilterOrderVO filterOrderVO);
+
     /**
      * 质控核查统计-科室(内页)
      *
@@ -426,7 +429,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
     public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO);
 
 
-
     /**
      * 离院病人质控评分详情页导出到excel
      *
@@ -485,14 +487,13 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
     public IPage<QualityControlDeptDTO> qualityControlByDept(BehospitalPageVO behospitalPageVO);
 
 
-
     /**
      * 病历稽查表
      *
      * @param filterVO
      * @return
      */
-    public IPage<MedicalCheckDTO>  getMedicalCheck(@Param("filterVO")FilterMedicalCheckVO filterVO);
+    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO);
 
     /**
      * 病历稽查表-科室
@@ -500,9 +501,9 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param filterVO
      * @return
      */
-    public IPage<MedicalCheckDTO>  getMedicalCheckByDept(@Param("filterVO")FilterMedicalCheckVO filterVO);
+    public IPage<MedicalCheckDTO> getMedicalCheckByDept(@Param("filterVO") FilterMedicalCheckVO filterVO);
 
-    public List<MedicalCheckIdNameDTO>  getMedicalEntryIds(@Param("casesEntryIds")List<Long> casesEntryIds);
+    public List<MedicalCheckIdNameDTO> getMedicalEntryIds(@Param("casesEntryIds") List<Long> casesEntryIds);
 
     /**
      * 病历稽查表导出
@@ -510,7 +511,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param filterVO
      * @return
      */
-    public List<MedicalCheckExportDTO>  getMedicalCheckExport(@Param("filterVO")FilterMedicalCheckVO filterVO);
+    public List<MedicalCheckExportDTO> getMedicalCheckExport(@Param("filterVO") FilterMedicalCheckVO filterVO);
 
     /**
      * 病历稽查表导出-科室
@@ -518,7 +519,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param filterVO
      * @return
      */
-    public List<MedicalDeptDTO>  medicalCheckExportByDept(@Param("filterVO")FilterMedicalCheckVO filterVO);
+    public List<MedicalDeptDTO> medicalCheckExportByDept(@Param("filterVO") FilterMedicalCheckVO filterVO);
 
 
     /**
@@ -554,7 +555,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
     public IPage<QcResultShortDTO> badLevelXYPage(@Param("qcResultPageVO") QcResultPageXYVO qcResultPageVO);
 
 
-
     /**
      * 未整改病历缺陷评分详情页导出
      *
@@ -677,7 +677,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param timeVo
      * @return
      */
-    public Map<String,Object> getBaseIndex( MedIndexFilterVO timeVo);
+    public Map<String, Object> getBaseIndex(MedIndexFilterVO timeVo);
 
     /**
      * 病案管理规则质控参数查询
@@ -685,7 +685,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param filterVO
      * @return
      */
-    public Map<String,Object> getCountByEntry( FilterVO filterVO);
+    public Map<String, Object> getCountByEntry(FilterVO filterVO);
 
     /**
      * 病案管理规则质控病历参数查询
@@ -694,7 +694,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @return
      */
 
-    public  List<MedManageParamsDTO> getMedManageParams( FilterVO filterVO);
+    public List<MedManageParamsDTO> getMedManageParams(FilterVO filterVO);
 
 
     /**
@@ -737,6 +737,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @return
      */
     public List<ExportExcelByDeptDTO> qcCheckMRPageExportByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
     /**
      * 入院,手术,出院 24小时完成情况
      *
@@ -744,6 +745,7 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @return
      */
     public Map<String, Long> medicalRecordIndicator(@Param("filterVO") FilterVO filterVO);
+
     /**
      * 手术费,抗菌药物,手术和病理费等含有人数
      *
@@ -754,30 +756,82 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
 
     /**
      * 病理CT/MR触发多规则人数
+     *
      * @param filterVO
      * @return
      */
-    public Map<String,Long> triggeringRules(@Param("filterVO") FilterVO filterVO);
+    public Map<String, Long> triggeringRules(@Param("filterVO") FilterVO filterVO);
 
     /**
      * 病案首页关联的出院病历
+     *
      * @param filterVO
      * @return
      */
-    public List<Map<String,String>> getMedicalRecords(@Param("filterVO") FilterVO filterVO);
+    public List<Map<String, String>> getMedicalRecords(@Param("filterVO") FilterVO filterVO);
 
     /**
      * 首页恶性肿瘤人数
+     *
      * @param filterVO
      * @return
      */
-    public List<Map<String,String>> malignancy(@Param("filterVO") FilterVO filterVO);
+    public List<Map<String, String>> malignancy(@Param("filterVO") FilterVO filterVO);
 
     /**
      * 获取患者年龄信息(通过出生日期和入院日期重新计算)
+     *
      * @param hospitalId
      * @param behospitalCodes
      * @return
      */
     List<BehospitalInfoAgeDTO> getBehospitalInfoAge(Long hospitalId, List<String> behospitalCodes);
+
+    /**
+     *  医生质控平均分页面统计
+     *
+     * @param doctorAverageStatisticsVO
+     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.diagbot.dto.DoctorAverageStatisticsDTO>
+     */
+    IPage<DoctorAverageStatisticsDTO> doctorAverageStatistics(@Param("doctorAverageStatisticsVO") DoctorAverageStatisticsVO doctorAverageStatisticsVO);
+
+    /**
+     *  医生质控平均分-患者列表(等级)
+     *
+     * @param doctorAverageLevelVO
+     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.diagbot.dto.DoctorAverageLevelDTO>
+     */
+    IPage<DoctorAverageLevelDTO> doctorAverageLevelPage(DoctorAverageLevelVO doctorAverageLevelVO);
+
+    /**
+     * 医生质控平均分-患者列表(等级)-导出
+     *
+     * @param doctorAverageLevelVO
+     * @Return java.util.List<com.diagbot.dto.ExportDoctorAverageLevel_7DTO>
+     */
+    List<ExportDoctorAverageLevel_7DTO> doctorAverageLevelExport(ExportDoctorAverageLevelVO doctorAverageLevelVO);
+
+    /**
+     * 缺陷详情(分页)(根据医生)
+     *
+     * @param getDoctorDetailPageVO
+     * @return
+     */
+    public IPage<GetDoctorDetailPageDTO> getDoctorDetailPage(@Param("getDoctorDetailPageVO") GetDoctorDetailPageVO getDoctorDetailPageVO);
+    /**
+     * 获取缺陷数量对应的病历
+     *
+     * @param getDetailRecordListPageVO
+     * @return
+     */
+    public IPage<GetDetailRecordListPageDTO> getDetailRecordListPage(@Param("getDetailRecordListPageVO") GetDetailRecordListPageVO getDetailRecordListPageVO);
+
+    /**
+     * 导出缺陷数量对应的病历
+     *
+     * @param getDetailRecordListPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> getDetailRecordListExport(@Param("getDetailRecordListPageVO") GetDetailRecordListPageVO getDetailRecordListPageVO);
+
 }

+ 101 - 0
src/main/java/com/diagbot/vo/DoctorAverageLevelVO.java

@@ -0,0 +1,101 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 医生质控平均分-患者列表(等级)-接口入参
+ * @Author songxl
+ * @Date 2022/4/11 9:20
+ */
+@ApiModel(value = "医生质控平均分-患者列表(等级)-接口入参")
+@Getter
+@Setter
+public class DoctorAverageLevelVO extends Page implements Serializable {
+    private static final long serialVersionUID = -5082186371197612798L;
+
+    @ApiModelProperty(value = "是否归档(0:未归档,1:已归档)", required = true)
+    @NotBlank(message = "是否归档为空")
+    private String isPlacefile = "1";
+
+    @ApiModelProperty(value = "医院ID",hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "医生姓名")
+    private String doctorName;
+
+    @ApiModelProperty(value = "医生工号")
+    private String doctorCode;
+
+    @ApiModelProperty(value = "病历等级")
+    private String level;
+
+    @ApiModelProperty(value = "病人住院ID")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "档案号")
+    private String fileCode;
+
+    @ApiModelProperty(value = "入院时间开始时间")
+    private Date behosDateStart;
+
+    @ApiModelProperty(value = "入院时间结束时间")
+    private Date behosDateEnd;
+
+    @ApiModelProperty(value = "出院时间开始时间")
+    private Date leaveHosDateStart;
+
+    @ApiModelProperty(value = "出院时间结束时间")
+    private Date leaveHosDateEnd;
+
+
+    @ApiModelProperty(value = "住院科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "主诊断")
+    private String diagnose;
+
+    @ApiModelProperty(hidden = true)
+    private Long userId;
+
+    private String deptId;
+    @ApiModelProperty(value = "统计维度 1-本月,2-本年")
+    private Integer statisticsType;
+
+    @ApiModelProperty(value = "病历核查状态")
+    private Integer checkStatus;
+
+    @ApiModelProperty(value = "病案首页核查状态")
+    private Integer mrStatus;
+
+    @ApiModelProperty(value = "病历核查人")
+    private String chName;
+
+    @ApiModelProperty(value = "病案首页核查人")
+    private String mrName;
+
+    @ApiModelProperty(value = "病历核查开始时间")
+    private Date chTimeStart;
+
+    @ApiModelProperty(value = "病历核查结束时间")
+    private Date chTimeEnd;
+
+    @ApiModelProperty(value = "病案首页核查开始时间")
+    private Date mrTimeStart;
+
+    @ApiModelProperty(value = "病案首页核查结束时间")
+    private Date mrTimeEnd;
+
+    @ApiModelProperty("页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
+    private String pageType = "1";
+}

+ 55 - 0
src/main/java/com/diagbot/vo/DoctorAverageStatisticsVO.java

@@ -0,0 +1,55 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description: 医生质控平均分页面统计-接口入参
+ * @Author songxl
+ * @Date 2022/4/8 13:20
+ */
+@ApiModel(value = "医生质控平均分页面统计-接口入参")
+@Getter
+@Setter
+public class DoctorAverageStatisticsVO extends Page implements Serializable {
+    private static final long serialVersionUID = -6882080859173434502L;
+
+    @ApiModelProperty(value = "是否归档(0:未归档,1:已归档)", required = true)
+    @NotBlank(message = "是否归档为空")
+    private String isPlacefile = "1";
+
+    @ApiModelProperty(value = "起始时间", required = true)
+    @NotBlank(message = "请输入起始时间")
+    private String startDate;
+
+    @ApiModelProperty(value = "结束时间", required = true)
+    @NotBlank(message = "请输入结束时间")
+    private String endDate;
+
+    @ApiModelProperty(value = "科室名称 '-'时:传值-0 ")
+    private String deptName;
+
+    @ApiModelProperty(value = "科室id '-'时:传值-0 ")
+    private String deptId;
+
+    @ApiModelProperty(value = "医生名称 '-'时:传值-0 ")
+    private String doctorName;
+
+    @ApiModelProperty(value = "医生工号 '-'时:传值-0 ")
+    private String doctorId;
+
+    @ApiModelProperty(value = "医院id", hidden = true)
+    private String hospitalId;
+
+    @ApiModelProperty(value = "升序")
+    private List<String> asc;
+    @ApiModelProperty(value = "降序")
+    private List<String> desc;
+}

+ 104 - 0
src/main/java/com/diagbot/vo/ExportDoctorAverageLevelVO.java

@@ -0,0 +1,104 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 医生质控平均分-患者列表(等级)-导出-接口入参
+ * @Author songxl
+ * @Date 2022/4/11 9:20
+ */
+@ApiModel(value = "医生质控平均分-患者列表(等级)-导出-接口入参")
+@Getter
+@Setter
+public class ExportDoctorAverageLevelVO implements Serializable {
+    private static final long serialVersionUID = -8083335651050625426L;
+
+    @ApiModelProperty(value = "是否归档(0:未归档,1:已归档)", required = true)
+    @NotBlank(message = "是否归档为空")
+    private String isPlacefile = "1";
+
+    @ApiModelProperty(value = "(1-导出7天[含缺陷明细项]  2-导出90天[不含缺陷明细项] )")
+    private String radioCheck = "1";
+
+    @ApiModelProperty(value = "医院ID",hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "医生姓名")
+    private String doctorName;
+
+    @ApiModelProperty(value = "医生工号")
+    private String doctorCode;
+
+    @ApiModelProperty(value = "病历等级")
+    private String level;
+
+    @ApiModelProperty(value = "病人住院ID")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "档案号")
+    private String fileCode;
+
+    @ApiModelProperty(value = "入院时间开始时间")
+    private Date behosDateStart;
+
+    @ApiModelProperty(value = "入院时间结束时间")
+    private Date behosDateEnd;
+
+    @ApiModelProperty(value = "出院时间开始时间")
+    private Date leaveHosDateStart;
+
+    @ApiModelProperty(value = "出院时间结束时间")
+    private Date leaveHosDateEnd;
+
+
+    @ApiModelProperty(value = "住院科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "主诊断")
+    private String diagnose;
+
+    @ApiModelProperty(hidden = true)
+    private Long userId;
+
+    private Long deptId;
+    @ApiModelProperty(value = "统计维度 1-本月,2-本年")
+    private Integer statisticsType;
+
+    @ApiModelProperty(value = "病历核查状态")
+    private Integer checkStatus;
+
+    @ApiModelProperty(value = "病案首页核查状态")
+    private Integer mrStatus;
+
+    @ApiModelProperty(value = "病历核查人")
+    private String chName;
+
+    @ApiModelProperty(value = "病案首页核查人")
+    private String mrName;
+
+    @ApiModelProperty(value = "病历核查开始时间")
+    private Date chTimeStart;
+
+    @ApiModelProperty(value = "病历核查结束时间")
+    private Date chTimeEnd;
+
+    @ApiModelProperty(value = "病案首页核查开始时间")
+    private Date mrTimeStart;
+
+    @ApiModelProperty(value = "病案首页核查结束时间")
+    private Date mrTimeEnd;
+
+    @ApiModelProperty("页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
+    private String pageType = "1";
+}

+ 118 - 0
src/main/java/com/diagbot/vo/GetDetailRecordListPageVO.java

@@ -0,0 +1,118 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 缺陷数量对应的病历-入参
+ * @Author: zhanghang
+ * @time: 2020/6/16 17:00
+ */
+@Getter
+@Setter
+public class GetDetailRecordListPageVO extends Page implements Serializable {
+
+    @ApiModelProperty(value = "用户id" ,hidden = true)
+    private Long userId;
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private String hospitalId;
+
+    @ApiModelProperty(value = "病历号")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "病人姓名")
+    private String patName;
+
+    @ApiModelProperty(value = "条目名称")
+    private String casesEntryName;
+
+    @ApiModelProperty(value = "(1-导出7天[含缺陷明细项]  2-导出90天[不含缺陷明细项] )")
+    @NotNull(message = "导出天数选择不能为空")
+    private String radioCheck = "1";
+
+    @ApiModelProperty(value = "主诊断")
+    private String diagnose;
+
+    @ApiModelProperty(value = "title名称")
+    private String titleName;
+
+    @ApiModelProperty(value = "条目id")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String casesName;
+
+    @ApiModelProperty(value = "模块id")
+    private Long casesId;
+
+    @ApiModelProperty(value = "科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "科室id")
+    private String deptId;
+
+    @ApiModelProperty(value = "医生姓名")
+    private String doctorName;
+
+    @ApiModelProperty(value = "医生编号ID")
+    private String doctorId;
+
+    @ApiModelProperty(value = "病历等级")
+    private String level;
+
+    @ApiModelProperty(value = "起始时间")
+    @NotNull(message = "请输入起始时间")
+    private Date startDate;
+
+    @ApiModelProperty(value = "截止时间")
+    @NotNull(message = "请输入截止时间")
+    private Date endDate;
+
+    @ApiModelProperty(value = "单项否决")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "规则类型(0:无,1:空项,2:错误)")
+    private Integer ruleType;
+
+    @ApiModelProperty(value = "离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人)")
+    private Integer leaveHosType;
+
+    @ApiModelProperty(value = "核查状态(1:已核查,0:未核查)")
+    private Integer checkStatus;
+
+    @ApiModelProperty(value = "首页核查状态(1:已核查,0:未核查)")
+    private Integer mrStatus;
+
+    @ApiModelProperty(value = "病历核查人员")
+    private String chName;
+
+    @ApiModelProperty(value = "首页核查人员")
+    private String mrName;
+
+    @ApiModelProperty(value = "病历核查起始时间")
+    private Date chTimeStart;
+
+    @ApiModelProperty(value = "病历核查截止时间")
+    private Date chTimeEnd;
+
+    @ApiModelProperty(value = "首页核查起始时间")
+    private Date mrTimeStart;
+
+    @ApiModelProperty(value = "首页核查截止时间")
+    private Date mrTimeEnd;
+
+    @ApiModelProperty(value = "是否归档(0:未归档,1:已归档)")
+    private String isPlacefile = "1";
+
+    @ApiModelProperty(value = "住院超过31日标志")
+    private Integer beHosGT31Days;
+
+    @ApiModelProperty(value = "改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)")
+    private Integer improveType;
+}

+ 70 - 0
src/main/java/com/diagbot/vo/GetDoctorDetailPageVO.java

@@ -0,0 +1,70 @@
+package com.diagbot.vo;
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+
+/**
+ * 获取缺陷列表入参
+ *
+ * @Description:
+ * @author: zhanghang
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetDoctorDetailPageVO extends Page implements Serializable {
+
+
+    @ApiModelProperty(value = "统计维度 1-本月,2-本年")
+    private Integer type;
+
+    @ApiModelProperty(value = "起始时间")
+    @NotBlank(message = "请输入起始时间")
+    private String startDate;
+
+    @ApiModelProperty(value = "结束时间")
+    @NotBlank(message = "请输入结束时间")
+    private String endDate;
+
+    @ApiModelProperty(value = "医院id", hidden = true)
+    private String hospitalId;
+
+    @ApiModelProperty(value = "用户id", hidden = true)
+    private Long userId;
+
+    @ApiModelProperty(value = "缺陷名称")
+    private String name;
+
+    @ApiModelProperty(value = "科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "科室id")
+    private String deptId;
+
+    @ApiModelProperty(value = "医生姓名")
+    private String doctorName;
+
+    @ApiModelProperty(value = "医生id")
+    private String doctorId;
+
+    @ApiModelProperty(value = "模块id:243=病案首页")
+    private Long casesId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String casesName;
+
+    @ApiModelProperty(value = "单项否决")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "规则类型(0:无,1:空项,2:错误)")
+    private Integer ruleType;
+
+    @ApiModelProperty(value = "是否归档(0:未归档,1:已归档)")
+    private String isPlacefile = "1";
+}

+ 128 - 0
src/main/java/com/diagbot/web/ConsoleByDoctorController.java

@@ -0,0 +1,128 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.DoctorAverageLevelDTO;
+import com.diagbot.dto.DoctorAverageStatisticsDTO;
+import com.diagbot.dto.GetDetailRecordListPageDTO;
+import com.diagbot.dto.GetDoctorDetailPageDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.ConsoleByDoctorFacade;
+import com.diagbot.facade.ConsoleExportFacade;
+import com.diagbot.vo.DoctorAverageLevelVO;
+import com.diagbot.vo.DoctorAverageStatisticsVO;
+import com.diagbot.vo.ExportDoctorAverageLevelVO;
+import com.diagbot.vo.GetDetailRecordListPageVO;
+import com.diagbot.vo.GetDoctorDetailPageVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * @author songxl
+ * @Description: 控制台(医生)统计相关API
+ * @date 2022/4/8 13:20
+ **/
+@RequestMapping("/consoleByDoctor")
+@RestController
+@Api(value = "控制台(医生)统计相关API", tags = { "控制台(医生)统计相关API" })
+@SuppressWarnings("unchecked")
+public class ConsoleByDoctorController {
+    @Autowired
+    private ConsoleByDoctorFacade consoleByDoctorFacade;
+
+    @Autowired
+    private ConsoleExportFacade consoleExportFacade;
+    /**
+     * 医生质控平均分页面统计
+     *
+     * @param doctorAverageStatisticsVO
+     * @return
+     */
+    @ApiOperation(value = "医生质控平均分页面统计[by:songxl]",
+            notes = "医生质控平均分页面统计")
+    @PostMapping("/doctorAverageStatistics")
+    @SysLogger("doctorAverageStatistics")
+    public RespDTO<IPage<DoctorAverageStatisticsDTO>> doctorAverageStatistics(@RequestBody @Valid DoctorAverageStatisticsVO doctorAverageStatisticsVO) {
+        return RespDTO.onSuc(consoleByDoctorFacade.doctorAverageStatistics(doctorAverageStatisticsVO));
+    }
+
+
+    /**
+     * 医生质控平均分页面统计-导出
+     *
+     * @param doctorAverageStatisticsVO
+     * @return
+     */
+    @PostMapping("/doctorAverageStatisticsExport")
+    @SysLogger("doctorAverageStatisticsExport")
+    public void doctorAverageStatisticsExport(HttpServletResponse response, @RequestBody @Valid DoctorAverageStatisticsVO doctorAverageStatisticsVO) {
+        consoleExportFacade.doctorAverageStatisticsExport(response, doctorAverageStatisticsVO);
+    }
+    /**
+     * 医生质控平均分-患者列表(等级)
+     *
+     * @param doctorAverageLevelVO
+     * @return
+     */
+    @ApiOperation(value = "医生质控平均分-患者列表(等级)[by:songxl]",
+            notes = "医生质控平均分-患者列表(等级)")
+    @PostMapping("/doctorAverageLevelPage")
+    @SysLogger("doctorAverageLevelPage")
+    public RespDTO<IPage<DoctorAverageLevelDTO>> doctorAverageLevelPage(@RequestBody @Valid DoctorAverageLevelVO doctorAverageLevelVO) {
+        return RespDTO.onSuc(consoleByDoctorFacade.doctorAverageLevelPage(doctorAverageLevelVO));
+    }
+
+    /**
+     * 医生质控平均分-患者列表(等级)-导出
+     *
+     * @param exportDoctorAverageLevelVO
+     * @return
+     */
+    @PostMapping("/doctorAverageLevelExport")
+    @SysLogger("doctorAverageLevelExport")
+    public void doctorAverageLevelExport(HttpServletResponse response, @RequestBody @Valid ExportDoctorAverageLevelVO exportDoctorAverageLevelVO) {
+        consoleExportFacade.doctorAverageLevelExport(response, exportDoctorAverageLevelVO);
+    }
+
+
+    @ApiOperation(value = "获取缺陷列表[by:zhanghang]",
+            notes = "获取缺陷列表接口")
+    @PostMapping("/getDoctorDetailPage")
+    @SysLogger("getDoctorDetailPage")
+    public RespDTO<IPage<GetDoctorDetailPageDTO>> getDoctorDetailPage(@RequestBody GetDoctorDetailPageVO getDetailListPageVO) {
+        return  RespDTO.onSuc(consoleByDoctorFacade.getDoctorDetailPage(getDetailListPageVO));
+    }
+
+    @ApiOperation(value = "缺陷列表导出[by:zhanghang]",
+            notes = "缺陷列表导出接口")
+    @PostMapping("/getDoctorDetailPageExport")
+    @SysLogger("getDoctorDetailPageExport")
+    public void getDoctorDetailPageExport(HttpServletResponse response, @RequestBody GetDoctorDetailPageVO getDetailListPageVO) {
+        consoleExportFacade.getDoctorDetailPageExport(response, getDetailListPageVO);
+    }
+
+    @ApiOperation(value = "获取缺陷数量对应的病历[by:zhanghang]",
+            notes = "获取缺陷数量对应的病历")
+    @PostMapping("/getDetailRecordListPage")
+    @SysLogger("getDetailRecordListPage")
+    public RespDTO<IPage<GetDetailRecordListPageDTO>> getDetailRecordListPage(@RequestBody GetDetailRecordListPageVO getDetailRecordListPageVO) {
+        return  RespDTO.onSuc(consoleByDoctorFacade.getDetailRecordListPage(getDetailRecordListPageVO));
+    }
+
+    @ApiOperation(value = "导出缺陷数量对应的病历[by:zhanghang]",
+            notes = "导出缺陷数量对应的病历")
+    @PostMapping("/getDetailRecordListPageExport")
+    @SysLogger("getDetailRecordListPageExport")
+    public void getDetailRecordListPageExport(HttpServletResponse response,@RequestBody GetDetailRecordListPageVO getDetailRecordListPageVO) {
+        consoleExportFacade.getDetailRecordListPageExport(response,getDetailRecordListPageVO);
+    }
+}

+ 1 - 1
src/main/resources/application-test.yml

@@ -61,7 +61,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.126:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.126:3307/qc_xy?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: Lat0ne@tesT
       # 连接池的配置信息

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -2,7 +2,7 @@ spring:
   application:
     name: mrqc-sys
   profiles:
-    active: test
+    active: pre
   main:
     allow-bean-definition-overriding: true
 

File diff suppressed because it is too large
+ 1597 - 1
src/main/resources/mapper/BehospitalInfoMapper.xml