| | |
| | | // List<Map<String, Object>> jiancha = new ArrayList<>(); |
| | | |
| | | |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "检查综述:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | |
| | | int xmXh = 1; |
| | | |
| | | Map<Long, List<TjOrderDetail>> collect = orderDetails.stream().collect(Collectors.groupingBy(TjOrderDetail::getProId)); |
| | | LambdaQueryWrapper<TjOrderYcxm> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderYcxm::getTjh, tjOrder.getTjNumber()); |
| | | List<TjOrderYcxm> ycxms = ycxmService.list(wq); |
| | | boolean isBr = false; |
| | | if (null != ycxms && !ycxms.isEmpty()) { |
| | | |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "检查综述:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | isBr = true; |
| | | |
| | | Map<String, List<TjOrderYcxm>> stringListMap = ycxms.stream().collect(Collectors.groupingBy(TjOrderYcxm::getParentName)); |
| | | |
| | | for (Map.Entry<String, List<TjOrderYcxm>> entry : stringListMap.entrySet()) { |
| | | List<TjOrderYcxm> details = entry.getValue(); |
| | | String xmmc = entry.getKey(); |
| | | // String xmmc = details.get(0).getProName(); |
| | | boolean isXmWrite = false; |
| | | int index = 1; |
| | | String szyssy=""; |
| | | StringBuilder builders = new StringBuilder(); |
| | | for (TjOrderYcxm detail : details) { |
| | | // if(detail.getJcxm().contains("舒张压")||detail.getJcxm().contains("收缩压")){ |
| | | // builders.append(detail.getJcxm()).append(detail.getJcjg()).append(" "); |
| | | // szyssy+=builders.toString(); |
| | | // continue; |
| | | // } |
| | | if (!isXmWrite) { |
| | | paragraph = new Paragraph(xmXh + ". " + xmmc, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | | |
| | | // if(StringUtil.isNotBlank(szyssy)){ |
| | | // if (!isXmWrite) { |
| | | // paragraph = new Paragraph(xmXh + ". " + xmmc, defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | // isXmWrite = true; |
| | | // } |
| | | // StringBuilder builder = new StringBuilder(); |
| | | // builder.append(" (").append(index).append(")").append(szyssy).append("\n"); |
| | | // szyssy = builder.toString(); |
| | | // paragraph = new Paragraph(szyssy, defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | // } |
| | | |
| | | if (isXmWrite) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setLeading(0f); |
| | |
| | | xmXh++; |
| | | } |
| | | } |
| | | }else { |
| | | } |
| | | /* else { |
| | | |
| | | if (!collect.isEmpty() || !map.isEmpty()){ |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "检查综述:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | isBr = true; |
| | | } |
| | | |
| | | for (Map.Entry<String, List<CsProVo>> deptEntry : listMap.entrySet()) { |
| | | List<CsProVo> proVos = deptEntry.getValue(); |
| | | if (proVos.size() > 1) { |
| | |
| | | } |
| | | } |
| | | } |
| | | } */ |
| | | |
| | | |
| | | |
| | | if(isBr) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setLeading(0f); |
| | | paragraph.setSpacingBefore(10f); |
| | | paragraph.setSpacingAfter(10f); |
| | | document2.add(paragraph); |
| | | } |
| | | |
| | | |
| | | |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setLeading(0f); |
| | | paragraph.setSpacingBefore(10f); |
| | | paragraph.setSpacingAfter(10f); |
| | | document2.add(paragraph); |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "医生建议:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | xmXh = 0; |
| | | if (null != ycxms && !ycxms.isEmpty()) { |
| | | |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "医生建议:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | |
| | | Map<String, List<TjOrderYcxm>> stringListMap = ycxms.stream().collect(Collectors.groupingBy(TjOrderYcxm::getParentName)); |
| | | |
| | |
| | | } |
| | | } |
| | | }*/ |
| | | } else { |
| | | } |
| | | /* else { |
| | | |
| | | if (!collect.isEmpty() || !map.isEmpty()){ |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "医生建议:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | } |
| | | |
| | | for (Map.Entry<String, List<CsProVo>> deptEntry : listMap.entrySet()) { |
| | | List<CsProVo> proVos = deptEntry.getValue(); |
| | | if (proVos.size() > 1) { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } */ |
| | | |
| | | for (int i = 0; i < 1; i++) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | |
| | | 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() |
| | | .collect(Collectors.toMap(LtkjHybgd::getJcxm, p -> p, (existing, replacement) -> existing)) |
| | | .values()); |
| | | |
| | | |
| | | |
| | | // hybgds=hybgds.stream().sorted(Comparator.comparing(LtkjHybgd::getJcxm, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | // hybgds = hybgds.stream() |
| | | // .sorted(Comparator.comparingInt( |