Browse Source

质控列表导出天数多样化

chengyao 4 years ago
parent
commit
23c375773e

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

@@ -0,0 +1,33 @@
+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 ExportExcelWideBehospitalDTO {
+    @Excel(name = "主管医生", needMerge = true)
+    private String behDoctorName;
+    @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;
+}

+ 26 - 0
src/main/java/com/diagbot/dto/ExportWideExcelDTO.java

@@ -0,0 +1,26 @@
+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:00
+ */
+@Getter
+@Setter
+public class ExportWideExcelDTO {
+    @Excel(name = "科室", needMerge = true)
+    private String behDeptName;
+    @Excel(name = "平均分数", needMerge = true)
+    private Double avgScore;
+    @ExcelCollection(name = "" )
+    private List<ExportExcelWideBehospitalDTO> excelBehospitalDTOS;
+
+
+}

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

@@ -1759,9 +1759,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         //时间设置
         exportQcresultVOSet(exportQcresultVO);
         List<ExportExcelDTO> res = this.exportQcresult(exportQcresultVO);
+        List<ExportWideExcelDTO> resWide = new ArrayList<>();
+        if("2".equals(exportQcresultVO.getRadioCheck())){
+             resWide = BeanUtil.listCopyTo(res, ExportWideExcelDTO.class);
+        }
         String fileName = "抽查住院病历质量情况.xls";
         response.setContentType("text/html;charset=UTF-8");
-        ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
+        if("1".equals(exportQcresultVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
+        }
+       if("2".equals(exportQcresultVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
+        }
     }
 
     /**