| | |
| | | zongJianFont = PdfUtils.setFont(DEFAULT_ZONGJIAN_FONT_SIZE - 6); |
| | | zongJianTitleFont = PdfUtils.setFont(DEFAULT_ZONGJIAN_FONT_SIZE -4); |
| | | zongJianTitleFont.setStyle(Font.BOLD); |
| | | PdfPTable tableQz = new PdfPTable(new float[]{90f, 90f, 60f, 60f, 60f, 60f}); |
| | | PdfPTable tableQz = new PdfPTable(new float[]{80f, 80f, 60f, 40f,40f, 60f, 55f}); |
| | | tableQz.setTotalWidth(PageSize.A4.getWidth() - 100); |
| | | tableQz.setLockedWidth(true); |
| | | tableQz.setHorizontalAlignment(Element.ALIGN_LEFT); |
| | |
| | | cell = new PdfPCell(); |
| | | cell.setBorder(Rectangle.NO_BORDER); |
| | | cell.setVerticalAlignment(Element.ALIGN_MIDDLE); |
| | | cell.setHorizontalAlignment(Element.ALIGN_CENTER); |
| | | cell.setPadding(10); |
| | | cell.setHorizontalAlignment(Element.ALIGN_LEFT); |
| | | // cell.setPadding(10); |
| | | if (!file.exists()) { |
| | | cell.setPhrase(new Phrase("", zongJianFont)); |
| | | } else { |
| | |
| | | cell = new PdfPCell(); |
| | | cell.setBorder(Rectangle.NO_BORDER); |
| | | cell.setVerticalAlignment(Element.ALIGN_MIDDLE); |
| | | cell.setHorizontalAlignment(Element.ALIGN_CENTER); |
| | | cell.setPadding(10); |
| | | // cell.setHorizontalAlignment(Element.ALIGN_CENTER); |
| | | // cell.setPadding(10); |
| | | |
| | | cell.setHorizontalAlignment(Element.ALIGN_LEFT); |
| | | String zongjianysname = sysConfigService.selectConfigByKey("pdf_report_zongjianysname"); |
| | | if (zongJianYiShiQianMing == null && StrUtil.isNotBlank(zongjianysname) && !zongjianysname.equals("无")) { |
| | | cell.setPhrase(new Phrase(zongjianysname, zongJianFont)); |
| | |
| | | } else { |
| | | byte[] bytes = Base64.getDecoder().decode(zongJianYiShiQianMing.getTemplate()); |
| | | Image image = Image.getInstance(bytes); |
| | | image.scaleToFit(60, 60); |
| | | image.scaleToFit(20, 20); |
| | | // image.scaleAbsolute(20,20); |
| | | // cell.addElement(image); |
| | | |
| | | cell.setPaddingLeft(-10); |
| | | // cell.setPaddingTop(5); |
| | | // cell.setPaddingBottom(15); |
| | | String pdfSfsgqz = sysConfigService.selectConfigByKey("pdf_sfsgqz"); |
| | |
| | | } |
| | | cell.setImage(image); |
| | | } |
| | | tableQz.addCell(cell); |
| | | |
| | | cell = new PdfPCell(new Phrase("", zongJianTitleFont)); |
| | | cell.setBorder(Rectangle.NO_BORDER); |
| | | cell.setVerticalAlignment(Element.ALIGN_MIDDLE); |
| | | cell.setHorizontalAlignment(Element.ALIGN_RIGHT); |
| | | cell.setPadding(0); |
| | | tableQz.addCell(cell); |
| | | |
| | | cell = new PdfPCell(new Phrase("总检日期:", zongJianTitleFont)); |
| | |
| | | cell = new PdfPCell(new Phrase(new SimpleDateFormat("yyyy-MM-dd").format(tjOrder.getCheckTime()), zongJianFont)); |
| | | cell.setBorder(Rectangle.NO_BORDER); |
| | | cell.setVerticalAlignment(Element.ALIGN_MIDDLE); |
| | | cell.setHorizontalAlignment(Element.ALIGN_CENTER); |
| | | cell.setPadding(10); |
| | | // cell.setHorizontalAlignment(Element.ALIGN_CENTER); |
| | | // cell.setPadding(10); |
| | | |
| | | cell.setHorizontalAlignment(Element.ALIGN_LEFT); |
| | | tableQz.addCell(cell); |
| | | document2.add(tableQz); |
| | | } else { |
| | |
| | | doctorNameDefault = entry.getValue().get(0).getShys(); |
| | | } |
| | | Font doctorFonts = PdfUtils.setFont(9); |
| | | if (key.equals("Y")) { |
| | | if (entry.getValue().get(0).getIsShowYiShi() == null){ |
| | | entry.getValue().get(0).setIsShowYiShi(true); |
| | | } |
| | | if (key.equals("Y") && entry.getValue().get(0).getIsShowYiShi()) { |
| | | String qmImg = dictUserInfoMapper.selectQmImgInnerJoinUserByUserId(String.valueOf(sysUser.getUserId())); |
| | | if (null != qmImg && StrUtil.isNotBlank(qmImg)) { |
| | | Paragraph elements = new Paragraph(); |
| | |
| | | df.setAlignment(Element.ALIGN_RIGHT); |
| | | document1.add(df); |
| | | } |
| | | } else { |
| | | } else if (entry.getValue().get(0).getIsShowYiShi()) { |
| | | String doctorName = "主检医师:" + doctorNameDefault; |
| | | if (createTime != null) |
| | | doctorName = "检查时间:" + new SimpleDateFormat("yyyy-MM-dd").format(createTime) + " 主检医师:" + doctorNameDefault; |
| | |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | | String key = sysConfigService.selectConfigByKey("is_report_pdf_use_ysqm"); |
| | | if (null != shys && null != shysmc && key.equals("Y")) { |
| | | hashSet.add(shysmc + "|" + shys); |
| | | } else { |
| | | if (null != shysmc) hashSet.add(shysmc); |
| | | } |
| | | // 结果弃检重复去除医师打印 |
| | | // String key = sysConfigService.selectConfigByKey("is_report_pdf_use_ysqm"); |
| | | // if (null != shys && null != shysmc && key.equals("Y")) { |
| | | // hashSet.add(shysmc + "|" + shys); |
| | | // } else { |
| | | // if (null != shysmc) hashSet.add(shysmc); |
| | | // } |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | strings.add(xmmc); |
| | | strings.add(groupOnceProResult); |
| | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("data", lists); |
| | | map.put("jyys", hashSet); |
| | | if (StrUtil.isNotBlank(shsj)) { |
| | | shsj = shsj.split(" ")[0]; |
| | | } |
| | | map.put("shsj", shsj); |
| | | // if (StrUtil.isNotBlank(shsj)) { |
| | | // shsj = shsj.split(" ")[0]; |
| | | // } |
| | | // map.put("shsj", shsj); |
| | | map.put("shsj",""); |
| | | data.put(xmmc, map); |
| | | } |
| | | } |
| | |
| | | // LambdaQueryWrapper<LtkjExamJcbgd> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(LtkjExamJcbgd::getTjh, tjNumber); |
| | | // wrapper.eq(LtkjExamJcbgd::getXmdm, String.valueOf(tjOrderDetail.getProject().getProParentId())); |
| | | tjPdfVO.setIsShowYiShi(true); |
| | | tjPdfVOS.add(tjPdfVO); |
| | | } |
| | | } |
| | |
| | | tjPdfVO.setProId(String.valueOf(orderRemark.getProId())); |
| | | tjPdfVO.setPid(String.valueOf(orderRemark.getProId())); |
| | | tjPdfVO.setXh(1); |
| | | tjPdfVO.setIsShowYiShi(false); |
| | | tjPdfVOS.add(tjPdfVO); |
| | | } |
| | | } |