| | |
| | | import com.ltkj.system.service.ISysDictDataService; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.config.pdfutils.PdfUtils; |
| | | import com.ltkj.web.controller.system.SysDeptController; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private TjOrderRemarkMapper tjOrderRemarkMapper; |
| | | @Autowired |
| | | private TjOrderDetailMapper tjOrderDetailMapper; |
| | | @Autowired |
| | | private SysDeptController sysDeptController; |
| | | |
| | | private Integer pdfPage = 0; |
| | | |
| | | private static final int DEFAULT_FONT_SIZE = 10; |
| | | private static final int DEFAULT_LITTLE_TITLE_FONT_SIZE = 11; |
| | | private static final int DEFAULT_TITLE_FONT_SIZE = 12; |
| | | private static final int DEFAULT_ZONGJIAN_FONT_SIZE = 15; |
| | | private static int DEFAULT_FONT_SIZE = 10; |
| | | private static int DEFAULT_LITTLE_TITLE_FONT_SIZE = 11; |
| | | private static int DEFAULT_TITLE_FONT_SIZE = 12; |
| | | private static int DEFAULT_ZONGJIAN_FONT_SIZE = 15; |
| | | private static String HOSP_NAME; |
| | | |
| | | private List<Map<String, Object>> makePDFInfo(HashMap<String, Object> map, AjaxResult ajaxResult, String key) { |
| | | List<Map<String, Object>> data = null; |
| | |
| | | int pageSize = 0; |
| | | try { |
| | | pdfWriter = PdfWriter.getInstance(document1, byteArrayOutputStream1); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (true){ |
| | | String sex = ""; |
| | | if (customer.getCusSex() != null) { |
| | | for (SysDictData userSex : sysUserSex) { |
| | |
| | | } |
| | | } |
| | | if (StrUtil.isBlank(sex)) sex = "未知"; |
| | | pdfWriter.setPageEvent(new FooterHeaderPageEvent("澄合矿务局中心医院",customer.getCusName(),tjOrder.getTjNumber(),sex,String.valueOf(DateUtil.ageOfNow(customer.getCusBrithday())),null)); |
| | | // pdfWriter.setPageEvent(new FooterHeaderPageEvent("澄合矿务局中心医院",customer.getCusName(),tjOrder.getTjNumber(),sex,String.valueOf(DateUtil.ageOfNow(customer.getCusBrithday())),null)); |
| | | pdfWriter.setPageEvent(new FooterHeaderPageEvent(dictHosp.getHospName(),customer.getCusName(),tjOrder.getTjNumber(),sex,String.valueOf(DateUtil.ageOfNow(customer.getCusBrithday())),null)); |
| | | pageSize = pdfWriter.getPageNumber(); |
| | | } |
| | | } catch (DocumentException e) { |
| | |
| | | document1.setMargins(70, 70, 40, 40); |
| | | document1.open(); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (true){ |
| | | // 组装体检检查项目报告 |
| | | Map<TjOrderRemark, List<TjPdfVO>> printReport = new HashMap<>(); |
| | | notHuaYanData(tjOrder.getTjNumber(), printReport, tjOrder, customer); |
| | |
| | | copy.addPage(page); |
| | | } |
| | | |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | List<ByteArrayOutputStream> jianchas = makeHisJianChaTable(tjOrder); |
| | | // List<ByteArrayOutputStream> jianchas = makeCcgcHisJianChaTable(tjOrder); |
| | | try { |
| | |
| | | int pages = pdfReader.getNumberOfPages(); |
| | | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
| | | PdfStamper pdfStamper = new PdfStamper(pdfReader, outputStream); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | PdfContentByte contentByte; |
| | | BaseFont baseFont = PdfUtils.createBaseFont(null); |
| | | for (int i = 2; i <= pages; i++) { |
| | |
| | | // paragraph = new Paragraph(str+objectMap.get("nr").toString(),defaultFont); |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | String content1 = str+objectMap.get("bt").toString().trim()+objectMap.get("nr").toString().trim(); |
| | | if (StrUtil.isBlank(content1)) content1 = " 本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"; |
| | | |
| | | paragraph = new Paragraph(str+objectMap.get("bt").toString().trim()+objectMap.get("nr").toString().trim(),defaultFont); |
| | | paragraph = new Paragraph(content1,defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | |
| | | String str = " "; |
| | | List<Map<String, Object>> maps = tjRulesService.getyichangxiangmujianyiguize(entry.getKey().toString(),"","",tjOrder.getTjNumber()); |
| | | for (Map<String, Object> objectMap : maps) { |
| | | paragraph = new Paragraph(str+objectMap.get("bt").toString()+objectMap.get("nr").toString(),defaultFont); |
| | | String content1 = str+objectMap.get("bt").toString()+objectMap.get("nr").toString(); |
| | | if (StrUtil.isBlank(content1)) content1 = " 本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"; |
| | | |
| | | paragraph = new Paragraph(content1,defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | |
| | | } |
| | | |
| | | public AjaxResult hisPDFNew2(TjOrder tjOrder, TjCustomer customer, TjReportTemplate tjReportTemplate,TjReportTemplate zongJianYiShiQianMing) throws Exception { |
| | | String s1 = sysConfigService.selectConfigByKey("tjreport_font_size_second_page_info"); |
| | | String s2 = sysConfigService.selectConfigByKey("tjreport_font_size_second_page_title"); |
| | | String s3 = sysConfigService.selectConfigByKey("tjreport_font_size_result_title"); |
| | | String s4 = sysConfigService.selectConfigByKey("tjreport_font_size_zongjian"); |
| | | // String hospName = sysDeptController.getdangqiandengluyuanqu().get("msg").toString(); |
| | | if (StrUtil.isNotBlank(s1) && Integer.parseInt(s1) > 10) DEFAULT_FONT_SIZE = Integer.parseInt(s1); |
| | | else DEFAULT_FONT_SIZE = 10; |
| | | if (StrUtil.isNotBlank(s2) && Integer.parseInt(s2) > 10) DEFAULT_LITTLE_TITLE_FONT_SIZE = Integer.parseInt(s2); |
| | | else DEFAULT_LITTLE_TITLE_FONT_SIZE = 10; |
| | | if (StrUtil.isNotBlank(s3) && Integer.parseInt(s3) > 10) DEFAULT_TITLE_FONT_SIZE = Integer.parseInt(s3); |
| | | else DEFAULT_TITLE_FONT_SIZE = 10; |
| | | if (StrUtil.isNotBlank(s4) && Integer.parseInt(s4) > 10) DEFAULT_ZONGJIAN_FONT_SIZE = Integer.parseInt(s4); |
| | | else DEFAULT_ZONGJIAN_FONT_SIZE = 10; |
| | | pdfPage = 0; |
| | | DictHosp dictHosp = dictHospService.list().get(0); |
| | | HOSP_NAME = dictHosp.getHospName(); |
| | | String color = sysConfigService.selectConfigByKey("report_title_color"); |
| | | List<SysDictData> sysUserSex = sysDictDataService.list(new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getDictType, "sys_user_sex")); |
| | | // 检验数据 |
| | |
| | | String str = " "; |
| | | List<Map<String, Object>> maps = tjRulesService.getyichangxiangmujianyiguize(entry.getKey().toString(),"","",tjOrder.getTjNumber()); |
| | | for (Map<String, Object> objectMap : maps) { |
| | | paragraph = new Paragraph(str+objectMap.get("bt").toString()+objectMap.get("nr").toString(),defaultFont); |
| | | String content = str + objectMap.get("bt").toString() + objectMap.get("nr").toString(); |
| | | if (StrUtil.isBlank(content)) content = " 本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"; |
| | | paragraph = new Paragraph(content,defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | |
| | | // paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | // document2.add(paragraph); |
| | | |
| | | paragraph = new Paragraph(str+objectMap.get("bt").toString().trim()+objectMap.get("nr").toString().trim(),defaultFont); |
| | | String content1 = str + objectMap.get("bt").toString() + objectMap.get("nr").toString().trim(); |
| | | if (StrUtil.isBlank(content)) content1 = " 本报告仅对本次检查负责,临床医生依据病情如有疑问,请及时复查或进一步检查"; |
| | | paragraph = new Paragraph(content1,defaultFont); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | document2.add(paragraph); |
| | | } |
| | |
| | | } |
| | | } |
| | | //分割线 |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | LineSeparator objectName = new LineSeparator(); |
| | | objectName.setOffset(-5); |
| | | document1.add(objectName); |
| | |
| | | Font titleFonts = PdfUtils.setFont(9); |
| | | Paragraph paragraph = PdfUtils.setParagraph(titleFonts, titleName); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | Font titleFont = PdfUtils.setFont(DEFAULT_TITLE_FONT_SIZE); |
| | | titleFont.setStyle(Font.BOLD); |
| | | PdfPCell cellTitle = new PdfPCell(PdfUtils.setParagraph(titleFont, titleName)); |
| | |
| | | // PdfPTable table = PdfUtils.setTable2(headFont, textFont, titles, value,dictHosp.getHospName().equals("澄合矿务局中心医院")); |
| | | // document1.add(table); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | if (true && !value.isEmpty()){ |
| | | if (value.size()>1){ |
| | | if (value.get(0).getPid().equals("1862852701533012001")){ |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("结论:"+entry.getKey().getRemark(), 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); |
| | |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("结论:"+entry.getKey().getRemark(), 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); |
| | |
| | | if (entry.getKey().getRemark() == null) { |
| | | entry.getKey().setRemark(""); |
| | | } |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | String remark = "备注:" + entry.getKey().getRemark(); |
| | | if (entry.getKey().getRemark().length() > 50) { |
| | | int j = 0; |
| | |
| | | //判断主检医师是否为空 空不能显示null |
| | | zhuJianYiShi(document1, entry,orderRemark.getCreateTime(),dictHosp); |
| | | //分割线 |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | LineSeparator objectName = new LineSeparator(); |
| | | document1.add(objectName); |
| | | } |
| | | } else { |
| | | if (null != one11) { |
| | | titleName = one11.getProName(); |
| | | if (entry.getValue().get(0).getProName().contains(";")) |
| | | titleName = entry.getValue().get(0).getProName(); |
| | | else titleName = one11.getProName(); |
| | | } else { |
| | | titleName = entry.getKey().getProName(); |
| | | } |
| | |
| | | Font titleFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph paragraph = PdfUtils.setParagraph(titleFonts, titleName); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | if (StrUtil.isBlank(value.get(0).getProResult()) && (StrUtil.isBlank(value.get(0).getTs()) && StrUtil.isBlank(value.get(0).getSj()))){ |
| | | continue; |
| | | } |
| | |
| | | // PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value,dictHosp.getHospName().equals("澄合矿务局中心医院")); |
| | | // document1.add(table); |
| | | |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院") && !value.isEmpty()){ |
| | | if (true && !value.isEmpty()){ |
| | | if (value.size()>1){ |
| | | if (value.get(0).getPid().equals("1862852701533012001")){ |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("结论:"+entry.getKey().getRemark(), 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); |
| | |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | ppp = new Paragraph("结论:"+entry.getKey().getRemark(), 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); |
| | |
| | | if (entry.getKey().getRemark() == null) { |
| | | entry.getKey().setRemark(""); |
| | | } |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true){ |
| | | String remark = "备注:" + entry.getKey().getRemark(); |
| | | if (entry.getKey().getRemark().length() > 50) { |
| | | int j = 0; |
| | |
| | | } |
| | | //判断主检医师是否为空 空不能显示null |
| | | zhuJianYiShi(document1, entry,orderRemark.getCreateTime(),dictHosp); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | //分割线 |
| | | LineSeparator objectName = new LineSeparator(); |
| | | document1.add(objectName); |
| | |
| | | * @throws DocumentException |
| | | */ |
| | | private void zhuJianYiShi(Document document1, Map.Entry<TjOrderRemark, List<TjPdfVO>> entry,Date createTime,DictHosp dictHosp) throws DocumentException { |
| | | if ((null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) || dictHosp.getHospName().equals("澄合矿务局中心医院") ) { |
| | | // if ((null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) || dictHosp.getHospName().equals("澄合矿务局中心医院") ) { |
| | | if ((null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) || true ) { |
| | | //主检医师 |
| | | String key = sysConfigService.selectConfigByKey("is_report_pdf_use_ysqm"); |
| | | SysUser sysUser = userService.getById(entry.getKey().getDoctorName()); |
| | | String doctorNameDefault = "无"; |
| | | if (sysUser != null)doctorNameDefault = sysUser.getNickName(); |
| | | if (!entry.getValue().isEmpty() && StrUtil.isNotBlank(entry.getValue().get(0).getShys()) && dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (!entry.getValue().isEmpty() && StrUtil.isNotBlank(entry.getValue().get(0).getShys()) && dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!entry.getValue().isEmpty() && StrUtil.isNotBlank(entry.getValue().get(0).getShys()) && true){ |
| | | doctorNameDefault = entry.getValue().get(0).getShys(); |
| | | } |
| | | Font doctorFonts = PdfUtils.setFont(9); |
| | |
| | | } |
| | | //拼接重大阳性结果 |
| | | StringBuffer str = new StringBuffer(); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | str.append("【重大阳性项目】\n"); |
| | | LambdaQueryWrapper<TjBigPositive> bigPositiveLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | bigPositiveLambdaQueryWrapper.eq(TjBigPositive::getTjNumber, tjNumber); |
| | |
| | | } |
| | | //拼接异常项目 |
| | | str.append("【异常情况项目】\n"); |
| | | if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | if (list.size() > 0) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | if (list.get(i).getExceptionDesc() == 1) { |
| | |
| | | if (null != tjProject && tjProject.getNeedReport().equals("Y")) { |
| | | tjOrderDetail.setProject(tjProject); |
| | | |
| | | if (tjOrderDetail.getProject().getProParentId().equals(entry.getKey().getProId())) { |
| | | if (tjOrderDetail.getProject().getProParentId().equals(entry.getKey().getProId()) && entry.getKey().getType() == 1) { |
| | | TjPdfVO tjPdfVO = new TjPdfVO(); |
| | | tjPdfVO.setProName(tjOrderDetail.getProject().getProName()); |
| | | tjPdfVO.setProResult(tjOrderDetail.getProResult()); |
| | |
| | | for (TjOrderRemark tjOrderRemark : tjOrderRemarks) { |
| | | printReport.put(tjOrderRemark, null); |
| | | } |
| | | String ids = ""; |
| | | for (Map.Entry<TjOrderRemark, List<TjPdfVO>> entry : printReport.entrySet()) { |
| | | List<TjPdfVO> tjPdfVOS = new ArrayList<>(); |
| | | List<TjOrderDetail> tjOrderDetails = tjOrderDetailService.getDetailByOrderIdAndParId(one.getOrderId(), entry.getKey().getProId()); |
| | |
| | | if (null != tjProject && tjProject.getNeedReport().equals("Y")) { |
| | | tjOrderDetail.setProject(tjProject); |
| | | |
| | | if (tjOrderDetail.getProject().getProParentId().equals(entry.getKey().getProId())) { |
| | | if (tjOrderDetail.getProject().getProParentId().equals(entry.getKey().getProId()) |
| | | && entry.getKey().getType() == 1 |
| | | && !ids.contains(String.valueOf(tjOrderDetail.getProject().getProParentId()))) { |
| | | TjPdfVO tjPdfVO = new TjPdfVO(); |
| | | tjPdfVO.setProName(tjOrderDetail.getProject().getProName()); |
| | | tjPdfVO.setProResult(tjOrderDetail.getProResult()); |
| | |
| | | tjPdfVO.setProId(String.valueOf(tjOrderDetail.getProject().getProId())); |
| | | LambdaQueryWrapper<LtkjExamJcbgd> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(LtkjExamJcbgd::getTjh,tjNumber); |
| | | wrapper.eq(LtkjExamJcbgd::getXmdm,String.valueOf(tjOrderDetail.getProject().getProParentId())); |
| | | wrapper.like(LtkjExamJcbgd::getXmdm,String.valueOf(tjOrderDetail.getProject().getProParentId())); |
| | | LtkjExamJcbgd jcbgd = jcbgdService.getOne(wrapper); |
| | | if (jcbgd != null){ |
| | | tjPdfVO.setTs(jcbgd.getYxbx()); |
| | | tjPdfVO.setSj(jcbgd.getBgNr()); |
| | | tjPdfVO.setShys(jcbgd.getShysxm()); |
| | | tjPdfVO.setProName(jcbgd.getXmmc()); |
| | | ids+="|"+jcbgd.getXmdm(); |
| | | } |
| | | tjPdfVOS.add(tjPdfVO); |
| | | } |
| | |
| | | private static void addJianYanTable(Document document, String titleName, String[] titles, float[] titlesWidth, ArrayList<List<String>> lists,DictHosp dictHosp,String colorStr) throws DocumentException { |
| | | // 大项标题 |
| | | Font titleFont = PdfUtils.setFont(DEFAULT_TITLE_FONT_SIZE); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | titleFont.setSize(DEFAULT_TITLE_FONT_SIZE); |
| | | titleFont.setStyle(Font.BOLD); |
| | | } |
| | |
| | | paragraph.setSpacingBefore(10f); |
| | | // 设置段落下空白 |
| | | paragraph.setSpacingAfter(10f); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (true) { |
| | | // 行间距 |
| | | paragraph.setLeading(7f); |
| | | // 设置段落上空白 |
| | |
| | | for (List<String> list : lists) { |
| | | boolean isYc = false; |
| | | textFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | // if (dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (true){ |
| | | if (list.contains("↓") || list.contains("↑")){ |
| | | isYc = true; |
| | | } |
| | |
| | | table1.setSpacingAfter(10f); |
| | | |
| | | Font titleFont = PdfUtils.setFont(12); |
| | | PdfPCell mergedCell = new PdfPCell(new Phrase("陕健医澄合矿务局中心医院", titleFont)); |
| | | // PdfPCell mergedCell = new PdfPCell(new Phrase("陕健医澄合矿务局中心医院", titleFont)); |
| | | PdfPCell mergedCell = new PdfPCell(new Phrase(HOSP_NAME, titleFont)); |
| | | mergedCell.setBorder(Rectangle.NO_BORDER); |
| | | mergedCell.setColspan(10); |
| | | mergedCell.setHorizontalAlignment(Element.ALIGN_CENTER); |