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