sgj
2026-02-25 23ba8d87f56be44209687ee03c8bda3e351412d1
fzzy-igdss-web/src/main/java/com/fzzy/common/manager/ExportManager.java
@@ -52,7 +52,7 @@
            }
            //获取模板路径
            String templatePath = fileService.getTemplateFilePath();
            String templatePath = fileService.getFileSavePath("TEMPLATE");
            File file = new File(templatePath + templateName);
            if (!file.exists()) {
                log.error("模板文件不存在,不执行导出!");
@@ -60,7 +60,7 @@
            }
            //获取文件保存路径,以库区分开
            String savePath = fileService.getWordPath(null);
            String savePath = fileService.getFileSavePath(null);
            param.setTemplatePath(templatePath);
            param.setTemplateName(templateName);
@@ -91,4 +91,23 @@
        }
    }
    /**
     * 渲染模板保存并下载
     *
     * @param response
     */
    public void downloadInoutExcel(HttpServletResponse response) {
        try {
            String savePath = fileService.getFileSavePath("TEMPLATE");
            String templateName = "出入库数据模板.xlsx";
            //下载文档
            WordUtil.download(savePath, templateName, response);
        } catch (Exception e) {
            log.error("下载文件失败", e);
        }
    }
}