diff --git a/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java b/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java index bf3b80a..d6de6aa 100644 --- a/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java +++ b/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java @@ -408,6 +408,69 @@ public class ExcelUtil } + + public static void WriteTsLxExport(OutputStream out,List> data){ + WritableWorkbook wwb; + try{ + wwb = Workbook.createWorkbook(out); + WritableSheet ws = wwb.createSheet("sheet", 0); // 创建一个工作表 + /** + * 设置单元格样式 + */ + WritableFont wf = new WritableFont(WritableFont.ARIAL, 12, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); + WritableCellFormat wcf = new WritableCellFormat(wf); + ws.setRowView(0, 300); // 设置指定行高 + // 设置列宽 + for (int j = 0; j < 15; j++) + { + ws.setColumnView(j, 15); + } + //创建Excel标题格式 + ws.mergeCells(0, 0, 0, 1); + ws.addCell(new Label(0, 0, "编号")); + ws.mergeCells(1, 0, 1, 1); + ws.addCell(new Label(1, 0, "姓名")); + ws.mergeCells(2, 0, 2, 1); + ws.addCell(new Label(2, 0, "家庭住址")); + ws.mergeCells(3, 0, 3, 1); + ws.addCell(new Label(3, 0, "联系电话")); + ws.mergeCells(4, 0, 4, 1); + ws.addCell(new Label(4, 0, "末次月经")); + ws.mergeCells(5, 0, 10, 0); + ws.addCell(new Label(5, 0, "产前检查")); + ws.addCell(new Label(5, 1, "一")); + ws.addCell(new Label(6,1,"二")); + ws.addCell(new Label(7,1,"三")); + ws.addCell(new Label(8,1,"四")); + ws.addCell(new Label(9, 1, "五")); + ws.mergeCells(10, 0, 10, 1); + ws.addCell(new Label(10, 0, "产检统计")); + ws.mergeCells(11, 0, 11, 1); + ws.addCell(new Label(11, 0, "出院小结")); + ws.mergeCells(12, 0, 13, 0); + ws.addCell(new Label(12, 0, "产后访视")); + ws.addCell(new Label(12, 1, "7天内")); + ws.addCell(new Label(13, 1, "42天内")); + ws.mergeCells(14, 0, 14, 1); + ws.addCell(new Label(14,0,"备注")); + + int k = 0; + //填充数据 + for(int i = 0;i> datas = new ArrayList<>(); + if (patientsQueryRequest.getQueryType() == 1) { + //全部孕妇 + listResponse = (BaseListResponse) queryHighRisk(patientsQueryRequest, null, 1, userId, null, Boolean.FALSE); + List list = listResponse.getData(); + + }else if(patientsQueryRequest.getQueryType() == 2){ + //全部产妇 + + } + OutputStream out = response.getOutputStream(); + ExcelUtil.WriteTsLxExport(out, datas); + }catch (Exception e){ + ExceptionUtils.catchException(e, e.getMessage()); + } + + + } + + + + private String getLevel(List levels) { String str = "";