update
This commit is contained in:
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.xwpf.usermodel.*;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.MinioUtil;
|
||||
import org.jeecg.modules.database.entity.*;
|
||||
import org.jeecg.modules.database.mapper.ExperimentDocMapper;
|
||||
import org.jeecg.modules.database.service.*;
|
||||
@@ -103,13 +104,13 @@ public class ExperimentDocServiceImpl extends ServiceImpl<ExperimentDocMapper, E
|
||||
addPageNumberToHeader("报告编号:" + experiment.getExperimentNo(), h);
|
||||
}
|
||||
|
||||
try (FileOutputStream out = new FileOutputStream("/Users/lise/" + fileName + ".docx")) {
|
||||
try (FileOutputStream out = new FileOutputStream(outputFile)) {
|
||||
document.write(out);
|
||||
}
|
||||
document.close();
|
||||
//String path = MinioUtil.upload(FileUtil.getInputStream(outputFile),
|
||||
// "experiment_doc/" + experimentId + "/" + version + "/" + experiment.getName() + "-" + fileName + ".docx");
|
||||
return "path";
|
||||
String path = MinioUtil.upload(FileUtil.getInputStream(outputFile),
|
||||
"experiment_doc/" + experimentId + "/" + version + "/" + experiment.getName() + "-" + fileName + ".docx");
|
||||
return path;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user