liujie
2025-08-04 56fc347f856b9cbd61c0191c94694f8326470e8a
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/pdf/TripSheetGenerator.java
@@ -43,7 +43,7 @@
            throw new IllegalArgumentException("订单列表不能为空");
        }
        String fileName = "行程单_" + UUID.randomUUID() + ".pdf";
        String fileName = "贵人家园行程单_" + UUID.randomUUID() + ".pdf";
        String filePath = pdfDir + fileName;
        File file = new File(filePath);
        FileUtils.forceMkdirParent(file);
@@ -145,7 +145,6 @@
// 首先定义SimpleDateFormat(可以是类的静态成员)
        SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 然后修改格式化代码
        String tripTimeStart = first.getBoardingTime() != null
                ? DATE_FORMATTER.format(first.getBoardingTime()) : "N/A";
        String tripTimeEnd = last.getBoardingTime() != null
@@ -304,11 +303,6 @@
        table.addCell(cell);
    }
    private void addTableCell(PdfPTable table, String text, Font font) {
        PdfPCell cell = new PdfPCell(new Paragraph(text != null ? text : "", font));
        cell.setPadding(5);
        table.addCell(cell);
    }
    /**
     * 获取中文字体,优先自定义字体,fallback到 CJK 内置