update
This commit is contained in:
@@ -51,14 +51,14 @@ public class ExperimentDocServiceImpl extends ServiceImpl<ExperimentDocMapper, E
|
||||
}
|
||||
|
||||
public String generateExperimentDoc(String experimentId, String fileName, String version) {
|
||||
String absolutePath = templatePath + File.separator + version + File.separator + docTempalteMap.get(fileName);
|
||||
String absolutePath = templatePath + File.separator + docTempalteMap.get(fileName);
|
||||
log.info("doc template path: " + absolutePath);
|
||||
if (!FileUtil.exist(absolutePath)) {
|
||||
throw new RuntimeException("模板文件不存在!");
|
||||
}
|
||||
try {
|
||||
String tmpDirPath = FileUtil.getTmpDirPath();
|
||||
String outputFile = tmpDirPath + fileName + "-" + experimentId + ".docx";
|
||||
String outputFile = tmpDirPath + fileName + "-" + experimentId + "-" + version + ".docx";
|
||||
if (FileUtil.exist(outputFile)) {
|
||||
FileUtil.del(outputFile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user