文件夹路径修改i
This commit is contained in:
parent
deddab999d
commit
de418ea444
@ -264,10 +264,10 @@ public class TeamSalaryExportTest {
|
|||||||
// 生成文件名和路径
|
// 生成文件名和路径
|
||||||
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss"));
|
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss"));
|
||||||
String fileName = String.format("team_salary_%s_%s.xlsx", billBelong, timestamp);
|
String fileName = String.format("team_salary_%s_%s.xlsx", billBelong, timestamp);
|
||||||
String filePath = "D:/workspace/likei-services/rc-service/rc-service-other/other-start/src/test/resources/export/" + fileName;
|
String filePath = "D:/export/" + fileName;
|
||||||
|
|
||||||
// 确保目录存在
|
// 确保目录存在
|
||||||
java.io.File dir = new java.io.File("D:/workspace/likei-services/rc-service/rc-service-other/other-start/src/test/resources/export/");
|
java.io.File dir = new java.io.File("D:/export/");
|
||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
dir.mkdirs();
|
dir.mkdirs();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user