|
|
@ -368,7 +368,9 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
content.add(row); |
|
|
|
initLast(content, 8); |
|
|
|
|
|
|
|
String path = PropUtil.imgDomain + "/" + PdfUtil.createPdf(PropUtil.path, detail.getPatient().getHospital(), Constant.Ht.Report.PARENT_NAME, new PdfUtil.Margin(), detail.getPatient().toPdfRow(), content); |
|
|
|
String[] split = detail.getPatient().getHospital().split(""); |
|
|
|
String title = String.join(" ", split); |
|
|
|
String path = PropUtil.imgDomain + "/" + PdfUtil.createPdf(PropUtil.path, title, Constant.Ht.Report.PARENT_NAME, new PdfUtil.Margin(), detail.getPatient().toPdfRow(), content); |
|
|
|
report.setUrl(path); |
|
|
|
htPatientReportDao.updateByPrimaryKeySelective(report); |
|
|
|
log.info("生成文件路径:{}", path); |
|
|
@ -458,6 +460,19 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
@Override |
|
|
|
public PageInfo<PatientReportVo.ReportName> queryAllReports(PatientReportDto.AdminQueryReport adminQueryReport, Long userId) { |
|
|
|
PageHelper.startPage(adminQueryReport.getPageNum(), adminQueryReport.getPageSize()); |
|
|
|
|
|
|
|
|
|
|
|
List<PatientReportDto.Score> scores = adminQueryReport.getScores(); |
|
|
|
if (CollectionUtil.isNotEmpty(scores)) { |
|
|
|
Iterator<PatientReportDto.Score> iterator = scores.iterator(); |
|
|
|
while (iterator.hasNext()) { |
|
|
|
PatientReportDto.Score next = iterator.next(); |
|
|
|
if (next.getStart() == null && next.getEnd() == null) { |
|
|
|
iterator.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<PatientReportVo.ReportName> reportNames = htPatientReportDao.queryAllReports(adminQueryReport); |
|
|
|
return new PageInfo<>(reportNames); |
|
|
|
} |
|
|
@ -625,6 +640,9 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
|
|
|
|
//查询报告单信息和病人信息
|
|
|
|
PatientReportVo.ReprotPatient reportPatient = htPatientReportDao.queryReportResult(param.getId()); |
|
|
|
if (reportPatient == null) { |
|
|
|
throw new BaseException(CodeEnum.PARAM_ERROR); |
|
|
|
} |
|
|
|
//查询报告单分数
|
|
|
|
List<PatientReportVo.ReportScore> reportScores = htPatientReportDao.queryReportScore2(param.getId(),param.getCode()); |
|
|
|
|
|
|
@ -637,8 +655,11 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
PdfUtil.Margin margin = new PdfUtil.Margin(); |
|
|
|
margin.setTop(12); |
|
|
|
margin.setBottom(12); |
|
|
|
margin.setLeft(36); |
|
|
|
String path = PropUtil.imgDomain + "/" + PdfUtil.createPdf(PropUtil.path, reportPatient.getHospital(), subHead, margin , reportPatient.toPdfSimpleCodeRow(),questionTable, content); |
|
|
|
margin.setLeft(64); |
|
|
|
margin.setRight(64); |
|
|
|
String[] split = reportPatient.getHospital().split(""); |
|
|
|
String title = String.join(" ", split); |
|
|
|
String path = PropUtil.imgDomain + "/" + PdfUtil.createPdf(PropUtil.path, title, subHead, margin , reportPatient.toPdfSimpleCodeRow(),questionTable, content); |
|
|
|
log.info("{}报告单导出路径:{}", param, path); |
|
|
|
return path; |
|
|
|
} |
|
|
@ -840,7 +861,7 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
PdfUtil.Cell initWordCell = addCell(row, "初步印象", titleSpan, 2); |
|
|
|
initWordCell.setHeight(PdfUtil.Cell.defaultHeight * 2); |
|
|
|
String initialImpression = reportPatient.getInitialImpression(); |
|
|
|
PdfUtil.Cell initImplCell = addCell(row, initialImpression, colNum - titleSpan, 2); |
|
|
|
PdfUtil.Cell initImplCell = addCell(row, "", colNum - titleSpan, 2); |
|
|
|
initImplCell.setHeight(PdfUtil.Cell.defaultHeight * 2); |
|
|
|
initImplCell.setBorderRight(1); |
|
|
|
initImplCell.setCenter(false); |
|
|
@ -921,14 +942,20 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
// 检查目的
|
|
|
|
if (StrUtil.isNotBlank(title.checkPurpose)) { |
|
|
|
PdfUtil.Row row = new PdfUtil.Row(); |
|
|
|
row.setHeight(100); |
|
|
|
PdfUtil.Cell cell = addCell(row, title.checkPurpose, (title.optionList.size() + questionSpan + 1 ) * cols, 1); |
|
|
|
cell.setCenter(false); |
|
|
|
cell.setBorderRight(1); |
|
|
|
cell.setHeight(36); |
|
|
|
questionTable.add(row); |
|
|
|
} |
|
|
|
// 设置表头
|
|
|
|
PdfUtil.Row row1 = new PdfUtil.Row(); |
|
|
|
PdfUtil.Row row2 = new PdfUtil.Row(); |
|
|
|
if (!Constant.Ht.Report.HAMA.equals(code)) { |
|
|
|
row2.setFontSize(10); |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0; i < cols ; i++) { |
|
|
|
addCell(row1, "序号", 1, 2); |
|
|
|
// addCell(row2, "", 1, 1);
|
|
|
|