From bbbf29882532206ba6e34f2e9b96155414627a56 Mon Sep 17 00:00:00 2001 From: Gauthier LO Date: Fri, 5 Jan 2024 09:41:57 +0100 Subject: [PATCH] Update ShippingInvoiceController.java cleanup convertToPdf function not deleted during merge --- .../ShippingInvoiceController.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/admin/shippingInvoice/ShippingInvoiceController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/admin/shippingInvoice/ShippingInvoiceController.java index ec4888ff8..5363a0ea6 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/admin/shippingInvoice/ShippingInvoiceController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/admin/shippingInvoice/ShippingInvoiceController.java @@ -314,31 +314,6 @@ public class ShippingInvoiceController { } } - public String convertToPdf(String invoiceNumber, String fileType) throws Exception { - String excelFilePath = shippingInvoiceService.getInvoiceList(invoiceNumber, fileType);// (C:\PATH\filename.xlsx) - - if(!excelFilePath.equals("ERROR")) { - String pdfFilePath= INVOICE_PDF_LOCATION + "/" + invoiceNumber + ".pdf"; - if(fileType.equals("invoice")){ - pdfFilePath = INVOICE_PDF_LOCATION + "/Invoice N°" + invoiceNumber + ".pdf"; - } - if(fileType.equals("detail")) { - pdfFilePath = INVOICE_DETAIL_PDF_LOCAION + "/Détail_calcul_de_facture_" + invoiceNumber + ".pdf"; - } - - Pattern p = Pattern.compile("^(.*)[\\/\\\\](.*)(\\.[a-z]+)"); //group(1): "C:\PATH" , group(2) : "filename", group(3): ".xlsx" - Matcher m = p.matcher(excelFilePath); - if (m.matches()) { - pdfFilePath = INVOICE_PDF_LOCATION + "/" + m.group(2) + ".pdf"; - } - // Créé un classeur pour charger le fichier Excel - Workbook workbook = new Workbook(excelFilePath); - // On enregistre le document au format PDF - workbook.save(pdfFilePath, SaveFormat.PDF); - return pdfFilePath; - } - return "ERROR"; - } /** * * @param invoiceNumber