Commit bae691d3 authored by chenzhao's avatar chenzhao

ziliaoxiazai youhua

parent d927cd82
...@@ -579,13 +579,8 @@ public class CommonServiceImpl { ...@@ -579,13 +579,8 @@ public class CommonServiceImpl {
System.out.println("模版文件所在目录是: " + templateDir); System.out.println("模版文件所在目录是: " + templateDir);
Path tempDir = createUniqueDirectory(ziLiaoDir, returnDto.getSurveyInformation().getOwnersName()); Path tempDir = createUniqueDirectory(ziLiaoDir, returnDto.getSurveyInformation().getOwnersName());
boolean directoryExists = Files.exists(tempDir); String wenjianjia = tempDir.toString().replace("\\","/");
if (directoryExists){
}else {
}
try { try {
Files.createDirectories(tempDir); // 创建临时目录 Files.createDirectories(tempDir); // 创建临时目录
System.out.println("Temporary directory created at: " + tempDir); System.out.println("Temporary directory created at: " + tempDir);
...@@ -593,10 +588,11 @@ public class CommonServiceImpl { ...@@ -593,10 +588,11 @@ public class CommonServiceImpl {
e.printStackTrace(); e.printStackTrace();
return; return;
} }
String templatePath = "templates/informationTemp.xlsx"; String templatePath = "templates/informationTemp.xlsx";
//String templatePath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\informationTemp.xlsx"; //String templatePath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\informationTemp.xlsx";
// String outputPath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\temp\\"+returnDto.getSurveyInformation().getOwnersName()+".xlsx"; // String outputPath = "F:\\work\\amos-boot-zx-biz\\amos-boot-system-jxiop\\amos-boot-module-hygf-biz\\src\\main\\resources\\templates\\temp\\"+returnDto.getSurveyInformation().getOwnersName()+".xlsx";
String outputPath ="批量资料/"+ returnDto.getSurveyInformation().getOwnersName()+"/"+returnDto.getSurveyInformation().getOwnersName()+".xlsx"; String outputPath =wenjianjia+"/"+returnDto.getSurveyInformation().getOwnersName()+".xlsx";
Workbook workbook = null; Workbook workbook = null;
try ( InputStream fis = new ClassPathResource(templatePath).getInputStream()){ try ( InputStream fis = new ClassPathResource(templatePath).getInputStream()){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment