fix:生成报告命名修改

This commit is contained in:
2026-01-23 10:21:50 +08:00
parent 0dbdb09553
commit 9a2c8d8795

View File

@@ -1449,7 +1449,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
try {
// 获取临时路径中脚本生成的报告
String reportName = "report_" +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) +
".docx";
FileInputStream fileInputStream = new FileInputStream(TEMP_REPORT_PATH + randomId + File.separator + "report.docx");
fileData = fileInputStream.readAllBytes();
@@ -1643,7 +1643,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
try {
// 获取临时路径中脚本生成的报告
String reportName = "report_" +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) +
".docx";
FileInputStream fileInputStream = new FileInputStream(TEMP_REPORT_PATH + randomId + File.separator + reportName);
fileData = fileInputStream.readAllBytes();
@@ -1762,7 +1762,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
try {
// 获取临时路径中脚本生成的报告
String reportName = "report_" +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) +
".docx";
FileInputStream fileInputStream = new FileInputStream(TEMP_REPORT_PATH + randomId + File.separator + reportName);
fileData = fileInputStream.readAllBytes();