wangsy hai 3 meses
pai
achega
59a5243119

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

@@ -96,6 +96,12 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/user/pageset/savePageSet").permitAll()
                 .antMatchers("/sys/user/pageset/getDefultPageSet").permitAll()
                 .antMatchers("/consoleByDept/getDept").permitAll()
+                .antMatchers("/consoleByDoctor/doctorAverageStatistics").permitAll()
+                .antMatchers("/consoleByDoctor/doctorAverageStatisticsExport").permitAll()
+                .antMatchers("/consoleByDoctor/getDoctorDetailPage").permitAll()
+                .antMatchers("/consoleByDoctor/getDoctorDetailPageExport").permitAll()
+                .antMatchers("/consoleByDoctor/getDetailRecordListPage").permitAll()
+                .antMatchers("/consoleByDoctor/getDetailRecordListPageExport").permitAll()
                 .antMatchers("/console/entryRejectPercent").permitAll()
                 .antMatchers("/console/qcResultLevelPercent").permitAll()
                 .antMatchers("/console/averageStatistics").permitAll()
@@ -147,7 +153,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/export/entryGroupByEntryExport").permitAll()
                 .antMatchers("/console/export/levelExport").permitAll()
                 .antMatchers("/console/entryStatistics").permitAll()
-                .antMatchers("/console/export/levelExport_TZ").permitAll()
+                .antMatchers("/console/leaveHosMRPage").permitAll()
                 .antMatchers("/console/export/getAverageDayNumExport").permitAll()
                 .antMatchers("/console/export/getAverageFeeExport").permitAll()
                 .antMatchers("/console/export/levelPercentGroupByDeptExport").permitAll()

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

@@ -172,7 +172,14 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/user/pageset/savePageSet", request)
                 || matchers("/sys/user/pageset/getDefaultPageSet", request)
                 || matchers("/consoleByDept/getDept", request)
+                || matchers("/consoleByDoctor/doctorAverageStatistics", request)
+                || matchers("/consoleByDoctor/doctorAverageStatisticsExport", request)
+                || matchers("/consoleByDoctor/getDoctorDetailPage", request)
+                || matchers("/consoleByDoctor/getDoctorDetailPageExport", request)
+                || matchers("/consoleByDoctor/getDetailRecordListPage", request)
+                || matchers("/consoleByDoctor/getDetailRecordListPageExport", request)
                 || matchers("/console/entryRejectPercent", request)
+                || matchers("/console/leaveHosMRPage", request)
                 || matchers("/console/qcResultLevelPercent", request)
                 || matchers("/console/averageStatistics", request)
                 || matchers("/console/entryByDept", request)
@@ -223,7 +230,6 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/entryGroupByEntryExport", request)
                 || 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)

+ 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;
+
+
+}

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

@@ -0,0 +1,47 @@
+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 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%";
+
+}

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

@@ -0,0 +1,131 @@
+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 status;
+
+    @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;
+
+}

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

@@ -0,0 +1,136 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.*;
+import com.diagbot.util.SysUserUtils;
+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 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;
+    }
+
+}

+ 72 - 26
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -9,30 +9,13 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
+import com.diagbot.dto.*;
+import com.diagbot.vo.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.OrderItem;
-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.ExportExcelBehospitalDTO;
-import com.diagbot.dto.ExportExcelDTO;
-import com.diagbot.dto.ExportExcelWideBehospitalDTO;
-import com.diagbot.dto.ExportWideExcelDTO;
-import com.diagbot.dto.HomePageImproveDTO;
-import com.diagbot.dto.HomePageNumDTO;
-import com.diagbot.dto.LevelStatisticsDTO;
-import com.diagbot.dto.NumDTO;
-import com.diagbot.dto.QcResultPercentDTO;
-import com.diagbot.dto.ReBeHosDTO;
-import com.diagbot.dto.SjcfStatisticsDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.util.BeanUtil;
@@ -40,13 +23,6 @@ import com.diagbot.util.ExcelUtils;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysUserUtils;
-import com.diagbot.vo.BehospitalPageVO;
-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 com.diagbot.vo.ReBeHosPageVO;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 /**
@@ -65,6 +41,8 @@ public class ConsoleExportFacade {
     private SysHospitalSetFacade sysHospitalSetFacade;
     @Autowired
     private FilterFacade filterFacade;
+    @Autowired
+    private ConsoleByDoctorFacade consoleByDoctorFacade;
 
     /**
      * 病案首页合格率占比
@@ -577,5 +555,73 @@ public class ConsoleExportFacade {
 
    }
 
+    /**
+     * 医生质控平均分页面统计-导出
+     *
+     * @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 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);
+    }
 
 }

+ 34 - 16
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -4,22 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.*;
 import com.diagbot.entity.BehospitalInfo;
-import com.diagbot.vo.AnalyzeCodeVO;
-import com.diagbot.vo.AnalyzeVO;
-import com.diagbot.vo.BehospitalPageVO;
-import com.diagbot.vo.CaseScoreVO;
-import com.diagbot.vo.EntryStatisticsVO;
-import com.diagbot.vo.ExportQcresultVO;
-import com.diagbot.vo.FilterOrderVO;
-import com.diagbot.vo.FilterPageByDeptVO;
-import com.diagbot.vo.FilterPageVO;
-import com.diagbot.vo.FilterUnModifyMRVO;
-import com.diagbot.vo.FilterVO;
-import com.diagbot.vo.MedIndexFilterVO;
-import com.diagbot.vo.QcResultPageVO;
-import com.diagbot.vo.QcResultShortPageVO;
-import com.diagbot.vo.ReBeHosPageVO;
-import com.diagbot.vo.TaskVO;
+import com.diagbot.vo.*;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -71,6 +56,14 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public int leaveHosCount(FilterVO filterVO);
 
+    /**
+     *  医生质控平均分页面统计
+     *
+     * @param doctorAverageStatisticsVO
+     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.diagbot.dto.DoctorAverageStatisticsDTO>
+     */
+    IPage<DoctorAverageStatisticsDTO> doctorAverageStatistics(@Param("doctorAverageStatisticsVO") DoctorAverageStatisticsVO doctorAverageStatisticsVO);
+
     /**
      * 新生儿出院人数统计-全院-首页
      *
@@ -437,4 +430,29 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<ExportExcelDTO> qcCheckMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 
+    /**
+     * 缺陷详情(分页)(根据医生)
+     *
+     * @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);
+
 }
+

+ 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;
+}

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

@@ -0,0 +1,97 @@
+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 status;
+
+    @ApiModelProperty(value = "是否归档(0:未归档,1:已归档)")
+    private String isPlacefile = "1";
+
+    @ApiModelProperty(value = "住院超过31日标志")
+    private Integer beHosGT31Days;
+
+    @ApiModelProperty(value = "改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)")
+    private Integer improveType;
+}

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

@@ -0,0 +1,71 @@
+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";
+}

+ 5 - 0
src/main/java/com/diagbot/web/ConsoleByDeptController.java

@@ -2,6 +2,7 @@ package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.*;
+import com.diagbot.facade.ConsoleByDoctorFacade;
 import com.diagbot.facade.ConsoleFacade;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
 import java.util.List;
 
 /**
@@ -24,6 +26,9 @@ public class ConsoleByDeptController {
     @Autowired
     private ConsoleFacade consoleFacade;
 
+    @Autowired
+    private ConsoleByDoctorFacade consoleByDoctorFacade;
+
     @ApiOperation(value = "用户关联科室[by:zhaops]",
             notes = "")
     @PostMapping("/getDept")

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

@@ -0,0 +1,93 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.*;
+import com.diagbot.facade.ConsoleByDoctorFacade;
+import com.diagbot.facade.ConsoleExportFacade;
+import com.diagbot.vo.*;
+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);
+    }
+
+    @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);
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1074 - 3
src/main/resources/mapper/BehospitalInfoMapper.xml