feat(settle report): download settle report excel from ui

master
yixian 5 years ago
parent 1534515ee3
commit c43a7e2816

@ -172,7 +172,7 @@ public class SettlementDevController {
public ResponseEntity<ByteArrayResource> getSettlementReportForBatch(@PathVariable int batchId) { public ResponseEntity<ByteArrayResource> getSettlementReportForBatch(@PathVariable int batchId) {
ByteArrayResource body = cleanService.downloadBatchSettleReportXlsx(batchId); ByteArrayResource body = cleanService.downloadBatchSettleReportXlsx(batchId);
return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM) return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM)
.header(HttpHeaders.CONTENT_DISPOSITION, body.getFilename()) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + body.getFilename())
.body(body); .body(body);
} }

Loading…
Cancel
Save