Finish Task #9031 Cost:3h 开发导出word
This commit is contained in:
parent
3c75bedb8e
commit
aefd70308e
@ -335,7 +335,7 @@ public class ContractService {
|
|||||||
outFile.mkdirs();
|
outFile.mkdirs();
|
||||||
}
|
}
|
||||||
String templatePath = Consts.getTemplatePath();
|
String templatePath = Consts.getTemplatePath();
|
||||||
String abTemplatePath = templatePath + File.separator + templateName + ".Xlsx";
|
String abTemplatePath = templatePath + File.separator + templateName + ".xlsx";
|
||||||
//判断模板是否存在
|
//判断模板是否存在
|
||||||
File file = new File(abTemplatePath);
|
File file = new File(abTemplatePath);
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
@ -344,7 +344,7 @@ public class ContractService {
|
|||||||
TemplateExportParams params = new TemplateExportParams(
|
TemplateExportParams params = new TemplateExportParams(
|
||||||
abTemplatePath);
|
abTemplatePath);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(params, dataMap);
|
Workbook workbook = ExcelExportUtil.exportExcel(params, dataMap);
|
||||||
String docxFile = "/"+ UUID.randomUUID().toString().replace("-", "") + ".Xlsx";
|
String docxFile = "/"+ UUID.randomUUID().toString().replace("-", "") + ".xlsx";
|
||||||
//通过填参 生产文件 并放到 upload 文件夹中
|
//通过填参 生产文件 并放到 upload 文件夹中
|
||||||
String path = Consts.uploadAbsDir();
|
String path = Consts.uploadAbsDir();
|
||||||
String pathFile = path + docxFile;
|
String pathFile = path + docxFile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user