|
|
|
@@ -293,19 +293,19 @@ class ReportController( |
|
|
|
lastOutDateEnd |
|
|
|
) |
|
|
|
|
|
|
|
val excelBytes = reportService.createExcelResponse( |
|
|
|
val pdfBytes = reportService.createPdfResponse( |
|
|
|
"/jasper/StockBalanceReport.jrxml", |
|
|
|
parameters, |
|
|
|
dbData |
|
|
|
) |
|
|
|
|
|
|
|
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) |
|
|
|
} |
|
|
|
|
|
|
|
} |