Finish Task #9031 Cost:3h 开发导出word

This commit is contained in:
daijunxiong 2024-01-09 12:25:57 +08:00
parent 3c75bedb8e
commit aefd70308e

View File

@ -335,7 +335,7 @@ public class ContractService {
outFile.mkdirs();
}
String templatePath = Consts.getTemplatePath();
String abTemplatePath = templatePath + File.separator + templateName + ".Xlsx";
String abTemplatePath = templatePath + File.separator + templateName + ".xlsx";
//判断模板是否存在
File file = new File(abTemplatePath);
if (!file.exists()) {
@ -344,7 +344,7 @@ public class ContractService {
TemplateExportParams params = new TemplateExportParams(
abTemplatePath);
Workbook workbook = ExcelExportUtil.exportExcel(params, dataMap);
String docxFile = "/"+ UUID.randomUUID().toString().replace("-", "") + ".Xlsx";
String docxFile = "/"+ UUID.randomUUID().toString().replace("-", "") + ".xlsx";
//通过填参 生产文件 并放到 upload 文件夹中
String path = Consts.uploadAbsDir();
String pathFile = path + docxFile;