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