hongjli
2025-05-22 e4efff6637f4d598a7efdfca8b62fbb4c3286b02
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsGasPipelineMoController.java
@@ -130,13 +130,14 @@
     */
    @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")