| | |
| | | */ |
| | | @SneakyThrows |
| | | @Operation(summary = "下载气体工单数据导入模板", description = "下载气体工单数据导入模板") |
| | | @RequiresPermissions("gasPipeline:mo:template") |
| | | @Log(title = "下载气体工单数据导入模板", businessType = BusinessType.EXPORT) |
| | | // @RequiresPermissions("gasPipeline:mo:template") |
| | | // @Log(title = "下载气体工单数据导入模板", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/template") |
| | | public ResponseEntity<ByteArrayResource> exportTemplate() { |
| | | byte[] file = IOUtils.resourceToByteArray("/templates/上传气体工单数据模板.xlsx"); |
| | | byte[] file = IOUtils.resourceToByteArray("/templates/气体工单数据模板v1.0.xlsx"); |
| | | ByteArrayResource resource = new ByteArrayResource(file); |
| | | return ResponseEntity.ok() |
| | | .header("Access-Control-Expose-Headers", HttpHeaders.CONTENT_DISPOSITION) |
| | | .header(HttpHeaders.CONTENT_DISPOSITION, |
| | | String.format("attachment;filename=%s", URLEncoder.encode("气体工单数据模板.xlsx", StandardCharsets.UTF_8))) |
| | | .header(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") |