| | |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.config.pdfutils.PdfUtils; |
| | | import com.ltkj.web.controller.system.SysDeptController; |
| | | import jodd.util.StringUtil; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import net.sf.ehcache.search.aggregator.Count; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | // List<Map<String, Object>> jiancha = new ArrayList<>(); |
| | | |
| | | |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "检查综述:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | |
| | | int xmXh = 1; |
| | | |
| | | // orderDetails=orderDetails.stream().sorted(Comparator.comparing(TjOrderDetail::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | // orderDetails = orderDetails.stream() |
| | | // .sorted(Comparator.comparingInt( |
| | | // tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | // )) |
| | | // .collect(Collectors.toList()); |
| | | |
| | | Map<Long, List<TjOrderDetail>> collect = orderDetails.stream().collect(Collectors.groupingBy(TjOrderDetail::getProId)); |
| | | for (Map.Entry<String, List<CsProVo>> deptEntry : listMap.entrySet()) { |
| | | List<CsProVo> proVos = deptEntry.getValue(); |
| | | if (proVos.size() > 1) { |
| | | proVos = proVos.stream() |
| | | .sorted(Comparator.comparingLong(CsProVo::getProId)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | // 已经遍历过的 |
| | | ArrayList<String> jianYanYiDa = new ArrayList<>(); |
| | | for (CsProVo proVo : proVos) { |
| | | 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()) { |
| | | |
| | | // 检查 |
| | | for (Map.Entry<Long, List<TjOrderDetail>> entry : collect.entrySet()) { |
| | | if (!entry.getKey().equals(proVo.getProId())) continue; |
| | | List<TjOrderDetail> details = entry.getValue(); |
| | | String xmmc = proVo.getProName(); |
| | | // String xmmc = details.get(0).getProName(); |
| | | boolean isXmWrite = false; |
| | | paragraph = PdfUtils.setParagraph(defaultTitleFont, "检查综述:"); |
| | | paragraph.setSpacingBefore(3f); |
| | | paragraph.setSpacingAfter(2f); |
| | | document2.add(paragraph); |
| | | isBr = true; |
| | | |
| | | // details=details.stream().sorted(Comparator.comparing(TjOrderDetail::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | // details = details.stream() |
| | | // .sorted(Comparator.comparingInt( |
| | | // tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | // )) |
| | | // .collect(Collectors.toList()); |
| | | int index = 1; |
| | | for (TjOrderDetail detail : details) { |
| | | // if (!entry.getKey().equals(detail.getProId())) continue; |
| | | if (!isXmWrite) { |
| | | paragraph = new Paragraph(xmXh + ". " + xmmc, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | isXmWrite = true; |
| | | } |
| | | String result = detail.getProResult(); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | result = result.replaceAll("本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查", ""); |
| | | // result = result.replaceAll("", ""); |
| | | // String[] split = result.split("\n"); |
| | | // StringBuilder builder = new StringBuilder(); |
| | | // for (String s : split) { |
| | | // if (StrUtil.isBlank(s.replaceAll("\n", "").trim())) continue; |
| | | // builder.append(" (").append(index).append(")").append(s).append("\n"); |
| | | // index++; |
| | | // } |
| | | StringBuilder builder = new StringBuilder(); |
| | | if (StrUtil.isBlank(result.replaceAll("\n", "").trim())) continue; |
| | | builder.append(" (").append(index).append(")").append(detail.getProName()).append(": ").append(result).append("\n"); |
| | | index++; |
| | | Map<String, List<TjOrderYcxm>> stringListMap = ycxms.stream().collect(Collectors.groupingBy(TjOrderYcxm::getParentName)); |
| | | |
| | | result = builder.toString(); |
| | | } |
| | | paragraph = new Paragraph(result, defaultFont); |
| | | for (Map.Entry<String, List<TjOrderYcxm>> entry : stringListMap.entrySet()) { |
| | | List<TjOrderYcxm> details = entry.getValue(); |
| | | String xmmc = entry.getKey(); |
| | | boolean isXmWrite = false; |
| | | int index = 1; |
| | | for (TjOrderYcxm detail : details) { |
| | | if (!isXmWrite) { |
| | | paragraph = new Paragraph(xmXh + ". " + xmmc, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | isXmWrite = true; |
| | | } |
| | | if (isXmWrite) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setLeading(0f); |
| | | paragraph.setSpacingBefore(0f); |
| | | paragraph.setSpacingAfter(5f); |
| | | document2.add(paragraph); |
| | | xmXh++; |
| | | } |
| | | } |
| | | String result = detail.getJcjg(); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | result = result.replaceAll("本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查", ""); |
| | | StringBuilder builder = new StringBuilder(); |
| | | if (StrUtil.isBlank(result.replaceAll("\n", "").trim())) continue; |
| | | |
| | | // 检验 |
| | | for (Map.Entry<String, Object> item : map.entrySet()) { |
| | | String xmmc = item.getKey(); |
| | | HashMap<String, Object> entryValue = (HashMap<String, Object>) item.getValue(); |
| | | ArrayList<List<String>> lists = (ArrayList<List<String>>) entryValue.get("data"); |
| | | boolean isXmWrite = false; |
| | | int index = 1; |
| | | for (List<String> i : lists) { |
| | | if (!i.get(6).contains(String.valueOf(proVo.getProId()))) continue; |
| | | if (i.contains("↓") || i.contains("↑")) { |
| | | if (jianYanYiDa.contains(i.get(5))) continue; |
| | | jianYanYiDa.add(i.get(5)); |
| | | builder.append(" (").append(index).append(")").append(detail.getJcxm()).append(": ").append(result).append("\n"); |
| | | index++; |
| | | |
| | | result = builder.toString(); |
| | | } |
| | | paragraph = new Paragraph(result, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | | if (isXmWrite) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setLeading(0f); |
| | | paragraph.setSpacingBefore(0f); |
| | | paragraph.setSpacingAfter(5f); |
| | | document2.add(paragraph); |
| | | xmXh++; |
| | | } |
| | | } |
| | | } |
| | | /* 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) { |
| | | proVos = proVos.stream() |
| | | .sorted(Comparator.comparingLong(CsProVo::getProId)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | // 已经遍历过的 |
| | | ArrayList<String> jianYanYiDa = new ArrayList<>(); |
| | | for (CsProVo proVo : proVos) { |
| | | |
| | | // 检查 |
| | | for (Map.Entry<Long, List<TjOrderDetail>> entry : collect.entrySet()) { |
| | | if (!entry.getKey().equals(proVo.getProId())) continue; |
| | | List<TjOrderDetail> details = entry.getValue(); |
| | | String xmmc = proVo.getProName(); |
| | | // String xmmc = details.get(0).getProName(); |
| | | boolean isXmWrite = false; |
| | | int index = 1; |
| | | for (TjOrderDetail detail : details) { |
| | | // if (!entry.getKey().equals(detail.getProId())) continue; |
| | | if (!isXmWrite) { |
| | | paragraph = new Paragraph(xmXh + ". " + xmmc, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | isXmWrite = true; |
| | | } |
| | | String content = " (" + index + ") " + i.get(0) + ":" + i.get(1) + " " + i.get(3) + " " + i.get(4) + " " + i.get(2); |
| | | paragraph = new Paragraph(content, defaultFont); |
| | | String result = detail.getProResult(); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | result = result.replaceAll("本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查", ""); |
| | | StringBuilder builder = new StringBuilder(); |
| | | if (StrUtil.isBlank(result.replaceAll("\n", "").trim())) continue; |
| | | builder.append(" (").append(index).append(")").append(detail.getProName()).append(": ").append(result).append("\n"); |
| | | index++; |
| | | |
| | | result = builder.toString(); |
| | | } |
| | | paragraph = new Paragraph(result, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | index++; |
| | | } |
| | | if (isXmWrite) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setLeading(0f); |
| | | paragraph.setSpacingBefore(0f); |
| | | paragraph.setSpacingAfter(5f); |
| | | document2.add(paragraph); |
| | | xmXh++; |
| | | } |
| | | } |
| | | if (isXmWrite) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setSpacingBefore(0f); |
| | | paragraph.setSpacingAfter(5f); |
| | | document2.add(paragraph); |
| | | xmXh++; |
| | | |
| | | // 检验 |
| | | for (Map.Entry<String, Object> item : map.entrySet()) { |
| | | String xmmc = item.getKey(); |
| | | HashMap<String, Object> entryValue = (HashMap<String, Object>) item.getValue(); |
| | | ArrayList<List<String>> lists = (ArrayList<List<String>>) entryValue.get("data"); |
| | | boolean isXmWrite = false; |
| | | int index = 1; |
| | | for (List<String> i : lists) { |
| | | if (!i.get(6).contains(String.valueOf(proVo.getProId()))) continue; |
| | | if (i.contains("↓") || i.contains("↑")) { |
| | | if (jianYanYiDa.contains(i.get(5))) continue; |
| | | jianYanYiDa.add(i.get(5)); |
| | | if (!isXmWrite) { |
| | | paragraph = new Paragraph(xmXh + ". " + xmmc, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | isXmWrite = true; |
| | | } |
| | | String content = " (" + index + ") " + i.get(0) + ":" + i.get(1) + " " + i.get(3) + " " + i.get(4) + " " + i.get(2); |
| | | paragraph = new Paragraph(content, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | index++; |
| | | } |
| | | } |
| | | if (isXmWrite) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | | paragraph.setSpacingBefore(0f); |
| | | paragraph.setSpacingAfter(5f); |
| | | document2.add(paragraph); |
| | | xmXh++; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } */ |
| | | |
| | | |
| | | |
| | | 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; |
| | | LambdaQueryWrapper<TjOrderYcxm> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderYcxm::getTjh, tjOrder.getTjNumber()); |
| | | List<TjOrderYcxm> ycxms = ycxmService.list(wq); |
| | | 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) { |
| | |
| | | } |
| | | String result = detail.getProResult(); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | // result = result.replaceAll(" ","").replaceAll("\t",""); |
| | | // result = result.replaceAll("\n本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查", ""); |
| | | // result = "\n " + result.replaceAll("\n", "\n "); |
| | | int index1 = 1; |
| | | String[] split = result.split("\n"); |
| | | // boolean contains = result.contains("本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"); |
| | |
| | | builder.append(" (").append(index1).append(")").append(s).append("\n"); |
| | | index1++; |
| | | } |
| | | // if (!contains) builder.append(" (").append(index1).append(")").append("本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"); |
| | | // if (!contains) builder.append(" (").append(index1).append(")").append(" "); |
| | | // else builder.substring(0,builder.length() - 1); |
| | | result = builder.toString(); |
| | | } |
| | | // String content = " (" + index + ") " + detail.getProName() + ":" + result; |
| | | // content = content.replaceAll("[\\n\\r]+$", ""); |
| | | // content = content.replaceAll("\\s+$", ""); |
| | | // paragraph = new Paragraph(content, defaultFont); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | paragraph = new Paragraph(result, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | |
| | | document2.add(paragraph); |
| | | } |
| | | String str = " "; |
| | | // List<Map<String, Object>> maps = tjRulesService.getyichangxiangmujianyiguize(entry.getKey().toString(),"", |
| | | // detail.getYcbz(),tjOrder.getTjNumber(),detail.getProName().replaceAll("[((][^))]*[))]", "") |
| | | // .replaceAll("[ 测定检测]",""),detail.getProResult()); |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | if (detail.getDeptId().equals("2")) { |
| | | String[] split = result.split("。|,|,"); |
| | | for (String s : split) { |
| | | s = s.replaceAll("\n", "").replaceAll("[((][^))]*[))]", ""); |
| | | // Map<String,Object> mapss= tjRulesService.getyichangxiangmujianyiguizeJianCha(s); |
| | | Map<String, Object> mapss = tjProAdvicerulesService.getyichangxiangmujianyiguizeJianCha(detail.getKs(), s, "0"); |
| | | if (null != mapss) { |
| | | Object bt = mapss.get("bt"); |
| | |
| | | |
| | | for (Map<String, Object> objectMap : collect1) { |
| | | String content = str + objectMap.get("bt").toString() + objectMap.get("nr").toString(); |
| | | // if (StrUtil.isBlank(content)) content = " 本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"; |
| | | if (StrUtil.isBlank(content)) content = " "; |
| | | paragraph = new Paragraph(content, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | |
| | | paragraph = new Paragraph(content, defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | // 第六位是lis项目id |
| | | // LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjProject::getLisXmbm,i.get(5)); |
| | | // TjProject project = projectService.getOne(wrapper); |
| | | // if (project != null) { |
| | | // LambdaQueryWrapper<TjRules> queryWrapper = new LambdaQueryWrapper<>(); |
| | | // queryWrapper.eq(TjRules::getProId,project.getProId()); |
| | | // List<TjRules> rules = tjRulesService.list(queryWrapper); |
| | | // if (!rules.isEmpty()){ |
| | | // |
| | | // } |
| | | String str = " "; |
| | | List<Map<String, Object>> maps = tjRulesService.getyichangxiangmujianyiguize(i.get(5), "", |
| | | i.get(2), tjOrder.getTjNumber(), i.get(0).replaceAll("[((][^))]*[))]", "") |
| | | .replaceAll("[ 测定检测]", ""), i.get(1)); |
| | | List<Map<String, Object>> maps = tjRulesService.getyichangxiangmujianyiguize(i.get(5), i.get(0).replaceAll("[((][^))]*[))]", "") |
| | | .replaceAll("[ 测定检测]", "").replaceAll("\\[.*?\\]", ""), |
| | | i.get(2), tjOrder.getTjNumber(), i.get(0).replaceAll("[((][^))]*[\u4e00-\u9fa5]+[^))]*[))]", "") |
| | | .replaceAll("[ 测定检测]", "").replaceAll("\\[.*?\\]", ""), i.get(1)); |
| | | |
| | | if (!maps.isEmpty()) { |
| | | for (Map<String, Object> objectMap : maps) { |
| | | // paragraph = new Paragraph(str+"建议标题",defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | // |
| | | // paragraph = new Paragraph(str+objectMap.get("bt").toString(),defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | // |
| | | // paragraph = new Paragraph(str+"建议内容",defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | // |
| | | // paragraph = new Paragraph(str+objectMap.get("nr").toString(),defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | Object bt = objectMap.get("bt"); |
| | | Object nr = objectMap.get("nr"); |
| | | if (null != bt && null != nr) { |
| | |
| | | if (StrUtil.isBlank(content)) content1 = " "; |
| | | paragraph = new Paragraph(content1, defaultFont); |
| | | } |
| | | // if (StrUtil.isBlank(content)) content1 = " 本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"; |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } */ |
| | | |
| | | for (int i = 0; i < 1; i++) { |
| | | paragraph = PdfUtils.setParagraph(defaultFont, ""); |
| | |
| | | tableQz.addCell(cell); |
| | | |
| | | String keyId = DataSourceContextHolder.getDataSourceKey(); |
| | | keyId = keyId.replace("typeis10_",""); |
| | | keyId = keyId.replace("ltkjpeis10_",""); |
| | | |
| | | File file = new File(value + File.separator + keyId + File.separator + "yinzhang.png"); |
| | | cell = new PdfPCell(); |
| | |
| | | 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); |
| | |
| | | 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( |