From 5c02263e1dee4960eb81757dc6b13f2e2d6cadb6 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期三, 11 十二月 2024 22:59:31 +0800 Subject: [PATCH] zjh202412011 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java index 50044bc..4924895 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java @@ -102,6 +102,8 @@ private ITjBigPositiveService tjBigPositiveService; @Autowired private HisPDFUtil hisPDFUtil; + @Autowired + private IDictHospService dictHospService; @GetMapping("/savePdf") @ApiOperation(value = "浠庢湰鍦板瓨鍌ㄦā鏉垮埌鏁版嵁搴�") @@ -410,8 +412,10 @@ public AjaxResult shengchengbgmoban(String tjNumber, TjOrder tjOrder, TjCustomer tjCustomer, TjReportTemplate reportTemplate) { AjaxResult ajaxResult = null; try { - ajaxResult = hisPDFUtil.hisPDF(tjOrder, tjCustomer, reportTemplate); +// ajaxResult = hisPDFUtil.hisPDF(tjOrder, tjCustomer, reportTemplate); + ajaxResult = hisPDFUtil.hisPDFNew(tjOrder, tjCustomer, reportTemplate); } catch (Exception e) { + e.printStackTrace(); log.error(String.valueOf(e)); } if (!ajaxResult.get("code").toString().equals("200")) { @@ -905,7 +909,8 @@ // 璁剧疆姝f枃瀛椾綋鏍峰紡锛�12鍙� Font textFont = PdfUtils.setFont(9); //鍒涘缓琛ㄦ牸 灏嗚〃澶村瓧浣撳拰姝f枃瀛椾綋鏀捐繘鍘� - PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value); + DictHosp dictHosp = dictHospService.list().get(0); + PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value,dictHosp.equals("婢勫悎鐭垮姟灞�涓績鍖婚櫌")); document.add(paragraph); document.add(table); //鍒ゆ柇澶囨敞鏄惁涓虹┖ 绌轰笉鑳芥樉绀簄ull @@ -959,6 +964,7 @@ } private AjaxResult oldFun(String tjNumber) { + DictHosp dictHosp = dictHospService.list().get(0); long startTime = System.currentTimeMillis(); int num = tjOrderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber); if (num > 0) return AjaxResult.error("鏈夊欢鏈熼」鐩殏涓嶈兘鐢熸垚鎶ュ憡!!!"); @@ -1285,7 +1291,7 @@ // 璁剧疆姝f枃瀛椾綋鏍峰紡锛�12鍙� Font textFont = PdfUtils.setFont(9); //鍒涘缓琛ㄦ牸 灏嗚〃澶村瓧浣撳拰姝f枃瀛椾綋鏀捐繘鍘� - PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value); + PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value,dictHosp.equals("婢勫悎鐭垮姟灞�涓績鍖婚櫌")); document.add(paragraph); document.add(table); -- Gitblit v1.8.0