| | |
| | | StringBuilder builder = new StringBuilder(); |
| | | if (StrUtil.isBlank(result.replaceAll("\n", "").trim())) continue; |
| | | |
| | | builder.append(" (").append(index).append(")").append(detail.getJcxm()).append(": ").append(result).append("\n"); |
| | | builder.append(" (").append(index).append(")").append(detail.getJcxm()).append(": ") |
| | | .append(result.replaceAll("\n", "").trim()).append("\n"); |
| | | index++; |
| | | |
| | | result = builder.toString(); |
| | |
| | | if (StrUtil.isNotBlank(result)) { |
| | | StringBuilder builder = new StringBuilder(); |
| | | if (StrUtil.isBlank(result.replaceAll("\n", "").trim())) continue; |
| | | builder.append(" (").append(index1).append(")").append(detail.getJcxm()).append(": ").append(result).append("\n"); |
| | | builder.append(" (").append(index1).append(")").append(detail.getJcxm()).append(": ") |
| | | .append(result.replaceAll("\n", "").trim()).append("\n"); |
| | | index1++; |
| | | |
| | | result = builder.toString(); |
| | |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | } else { |
| | | } |
| | | // 碳14 |
| | | // else if (value.get(0).getPid().equals("1870371396991955967")){ |
| | | // Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | // Paragraph ppp = new Paragraph("阳性参考值(Delta Over Baseline(DPM)):", remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // |
| | | // LineSeparator objectName = new LineSeparator(); |
| | | // objectName.setOffset(-5); |
| | | // document1.add(objectName); |
| | | // |
| | | // ppp = new Paragraph("DPM值: > 149 阳性", remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // |
| | | // ppp = new Paragraph(" ⩽ 99 阴性", remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // |
| | | // objectName.setOffset(-5); |
| | | // document1.add(objectName); |
| | | // |
| | | // |
| | | // int result = Integer.parseInt(value.get(0).getProResult()); |
| | | // String after = ""; |
| | | // if (result > 149){ |
| | | // after = "阳性"; |
| | | // }else { |
| | | // after = "阴性"; |
| | | // } |
| | | // ppp = new Paragraph("检测结果: DPM=" + result, remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // |
| | | // ppp = new Paragraph("", remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // ppp = new Paragraph("", remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // if (StrUtil.isNotBlank(entry.getKey().getRemark())) { |
| | | // ppp = new Paragraph("结论:" + entry.getKey().getRemark(), remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | // } |
| | | // } |
| | | else { |
| | | String[] titles = {"体检项目", "体检结果", "单位"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Font textFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | |
| | | if (isPacs) { |
| | | Paragraph pp = PdfUtils.setParagraph(remarkFonts, "检查所见:"); |
| | | Paragraph pp; |
| | | Paragraph ppp; |
| | | if (StrUtil.isNotBlank(value.get(0).getSj())) { |
| | | pp = PdfUtils.setParagraph(remarkFonts, "检查所见:"); |
| | | document1.add(pp); |
| | | ppp = new Paragraph(value.get(0).getSj(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | pp = PdfUtils.setParagraph(remarkFonts, "检查提示:"+value.get(0).getTs()); |
| | | document1.add(pp); |
| | | Paragraph ppp = new Paragraph(value.get(0).getSj(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | pp = PdfUtils.setParagraph(remarkFonts, "结论:"); |
| | | document1.add(pp); |
| | | ppp = new Paragraph(value.get(0).getTs(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | // ppp = new Paragraph(value.get(0).getTs(), remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | } else { |
| | | if (value.get(0).getPid().equals("1862852701533012001")) { |
| | | remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | |
| | | if (isPacs) { |
| | | Paragraph pp = PdfUtils.setParagraph(remarkFonts, "检查所见:"); |
| | | Paragraph pp; |
| | | Paragraph ppp; |
| | | if (StrUtil.isNotBlank(value.get(0).getSj()) && StrUtil.isNotBlank(value.get(0).getProResult())) { |
| | | pp = PdfUtils.setParagraph(remarkFonts, "检查所见:"); |
| | | document1.add(pp); |
| | | ppp = new Paragraph(value.get(0).getSj() != null ? value.get(0).getSj() : value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | pp = PdfUtils.setParagraph(remarkFonts, "检查提示:"+ (value.get(0).getTs() != null ? value.get(0).getTs() : value.get(0).getProResult())); |
| | | document1.add(pp); |
| | | Paragraph ppp = new Paragraph(value.get(0).getSj() != null ? value.get(0).getSj() : value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | pp = PdfUtils.setParagraph(remarkFonts, "结论:"); |
| | | document1.add(pp); |
| | | ppp = new Paragraph(value.get(0).getTs() != null ? value.get(0).getTs() : value.get(0).getProResult(), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | // ppp = new Paragraph(value.get(0).getTs() != null ? value.get(0).getTs() : value.get(0).getProResult(), remarkFonts); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // paragraph.setLeading(5f); |
| | | // document1.add(ppp); |
| | | } else { |
| | | if (value.get(0).getPid().equals("1862852701533012001")) { |
| | | remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | List<LtkjHysqd> list = ltkjHysqdService.list(ltkjHysqdLambdaQueryWrapper); |
| | | HashMap<String, Object> data = new HashMap<>(); |
| | | for (LtkjHysqd hysqd : list) { |
| | | LambdaQueryWrapper<LtkjHybgd> ltkjHybgdLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | ltkjHybgdLambdaQueryWrapper.eq(LtkjHybgd::getTmh, hysqd.getTmh()); |
| | | List<LtkjHybgd> hybgds = ltkjHybgdService.list(ltkjHybgdLambdaQueryWrapper); |
| | | // LambdaQueryWrapper<LtkjHybgd> ltkjHybgdLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // ltkjHybgdLambdaQueryWrapper.eq(LtkjHybgd::getTmh, hysqd.getTmh()); |
| | | // List<LtkjHybgd> hybgds = ltkjHybgdService.list(ltkjHybgdLambdaQueryWrapper); |
| | | List<LtkjHybgd> hybgds = ltkjHybgdService.getReportJianYanBaoGaoDanList(hysqd.getTmh()); |
| | | if(null !=hybgds && !hybgds.isEmpty()){ |
| | | // hybgds = hybgds.stream().distinct().collect(Collectors.toList()); |
| | | hybgds = new ArrayList<>(hybgds.stream() |