zhaowenxuan
2024-12-09 f927144c5adf51420fbde9b4a83434edd189a06d
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java
@@ -147,7 +147,7 @@
                pageSize = pdfWriter.getPageNumber();
            }
        } catch (DocumentException e) {
            e.printStackTrace();
            log.error(String.valueOf(e));
            return AjaxResult.error();
        }
        document1.setMargins(70, 70, 40, 40);
@@ -159,7 +159,7 @@
            notHuaYanTable(document1, printReport,dictHosp,color);
        } catch (DocumentException e) {
            log.error("非化验项目填充表格异常");
            e.printStackTrace();
            log.error(String.valueOf(e));
            return AjaxResult.error();
        }
        // 组装检验数据
@@ -193,7 +193,7 @@
            copy.close();
        } catch (IOException e) {
            log.error("拷贝pdf异常");
            e.printStackTrace();
            log.error(String.valueOf(e));
            return AjaxResult.error();
        }
        String outputFileName1 = customer.getCusId() + tjOrder.getTjNumber() + customer.getCusName() + "_报告.pdf";
@@ -219,7 +219,7 @@
            pdfReader.close();
            finalOutPut = outputStream;
        } catch (IOException e) {
            e.printStackTrace();
            log.error(String.valueOf(e));
            return AjaxResult.error();
        }
        savePDFFile(outputFileName1, tjOrder, customer, finalOutPut);
@@ -802,6 +802,9 @@
                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);
                data.put(xmmc, map);
            }
@@ -895,7 +898,7 @@
                acroFields.setField(key, data.get(key).toString());
            }
            //设置为无法编辑
//            pdfStamper.setFormFlattening(true);
            pdfStamper.setFormFlattening(true);
            pdfStamper.close();
            reader.close();
            // 将修改后的PDF内容写入