Browse Source

20210517导出pdf的bugv1.0

sd
zy_Java 4 years ago
parent
commit
5e8da19238
  1. 16
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

16
ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

@ -469,13 +469,7 @@ public class PatientReportService implements IPatientReportService {
List<PatientReportDto.Score> scores = adminQueryReport.getScores(); List<PatientReportDto.Score> scores = adminQueryReport.getScores();
if (CollectionUtil.isNotEmpty(scores)) { if (CollectionUtil.isNotEmpty(scores)) {
Iterator<PatientReportDto.Score> iterator = scores.iterator(); scores.removeIf(next -> next.getStart() == null && next.getEnd() == null);
while (iterator.hasNext()) {
PatientReportDto.Score next = iterator.next();
if (next.getStart() == null && next.getEnd() == null) {
iterator.remove();
}
}
} }
List<PatientReportVo.ReportName> reportNames = htPatientReportDao.queryAllReports(adminQueryReport); List<PatientReportVo.ReportName> reportNames = htPatientReportDao.queryAllReports(adminQueryReport);
@ -681,7 +675,7 @@ public class PatientReportService implements IPatientReportService {
initAnalyseTitle(rows, total); initAnalyseTitle(rows, total);
if (CollectionUtil.isEmpty(analyses)) { if (CollectionUtil.isEmpty(analyses)) {
Workbook workbook = new XSSFWorkbook();; Workbook workbook = new XSSFWorkbook();
PoiUtil.exportWB("报告单详情", rows, workbook); PoiUtil.exportWB("报告单详情", rows, workbook);
return workbook; return workbook;
} }
@ -700,7 +694,7 @@ public class PatientReportService implements IPatientReportService {
Workbook workbook = new XSSFWorkbook();; Workbook workbook = new XSSFWorkbook();
PoiUtil.exportWB("报告单详情", rows, workbook); PoiUtil.exportWB("报告单详情", rows, workbook);
return workbook; return workbook;
} }
@ -1030,7 +1024,7 @@ public class PatientReportService implements IPatientReportService {
int titleSpan = 2; int titleSpan = 2;
PdfUtil.Cell initWordCell = addCell(row, "初步印象", titleSpan, 2); PdfUtil.Cell initWordCell = addCell(row, "初步印象", titleSpan, 2);
initWordCell.setHeight(PdfUtil.Cell.defaultHeight * 2); initWordCell.setHeight(PdfUtil.Cell.defaultHeight * 2);
String initialImpression = reportPatient.getInitialImpression(); // String initialImpression = reportPatient.getInitialImpression();
PdfUtil.Cell initImplCell = addCell(row, "", colNum - titleSpan, 2); PdfUtil.Cell initImplCell = addCell(row, "", colNum - titleSpan, 2);
initImplCell.setHeight(PdfUtil.Cell.defaultHeight * 2); initImplCell.setHeight(PdfUtil.Cell.defaultHeight * 2);
initImplCell.setBorderRight(1); initImplCell.setBorderRight(1);
@ -1039,6 +1033,8 @@ public class PatientReportService implements IPatientReportService {
PdfUtil.Row tempRow = new PdfUtil.Row(); PdfUtil.Row tempRow = new PdfUtil.Row();
PdfUtil.Cell cell = addCell(tempRow, "仅供临床医生参考。", colNum, 1); PdfUtil.Cell cell = addCell(tempRow, "仅供临床医生参考。", colNum, 1);
tempRow.addCell(cell);
content.add(tempRow);
initLast(content, colNum); initLast(content, colNum);
return scores; return scores;
} }

Loading…
Cancel
Save