| @@ -293,19 +293,19 @@ class ReportController( | |||||
| lastOutDateEnd | lastOutDateEnd | ||||
| ) | ) | ||||
| val excelBytes = reportService.createExcelResponse( | |||||
| val pdfBytes = reportService.createPdfResponse( | |||||
| "/jasper/StockBalanceReport.jrxml", | "/jasper/StockBalanceReport.jrxml", | ||||
| parameters, | parameters, | ||||
| dbData | dbData | ||||
| ) | ) | ||||
| val headers = HttpHeaders().apply { | val headers = HttpHeaders().apply { | ||||
| contentType = MediaType.parseMediaType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") | |||||
| setContentDispositionFormData("attachment", "StockBalanceReport.xlsx") | |||||
| set("filename", "StockBalanceReport.xlsx") | |||||
| contentType = MediaType.APPLICATION_PDF | |||||
| setContentDispositionFormData("attachment", "StockBalanceReport.pdf") | |||||
| set("filename", "StockBalanceReport.pdf") | |||||
| } | } | ||||
| return ResponseEntity(excelBytes, headers, HttpStatus.OK) | |||||
| return ResponseEntity(pdfBytes, headers, HttpStatus.OK) | |||||
| } | } | ||||
| } | } | ||||