提交 cd73ee57 作者: 925993793@qq.com

【事件】ppt生成结果保存

上级 24dcd827
......@@ -908,7 +908,20 @@ public class EventAnalysisController {
public void downloadPPT(@RequestParam String versionId, HttpServletResponse response) {
EventAnalysisVersion eventAnalysisVersion = eventAnalysisVersionService.getById(versionId);
if (eventAnalysisVersion != null && StringUtils.isNotEmpty(eventAnalysisVersion.getPptPath())) {
commonService.downloadTemplate(response, eventAnalysisVersion.getPptPath());
String pptPath = eventAnalysisVersion.getPptPath();
JSONObject jsonObject = JSON.parseObject(pptPath);
Integer code = jsonObject.getInteger("code");
if (code == 200) {
commonService.downloadTemplate(response, jsonObject.getString("result"));
} else {
String json = JSON.toJSONString(Result.FAIL("PPT生成失败"));
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=utf-8");
try (PrintWriter writer = response.getWriter()) {
writer.println(json);
} catch (Exception ignored) {
}
}
} else {
String json = JSON.toJSONString(Result.FAIL(201, "PPT还在生成中。。。"));
response.setCharacterEncoding("UTF-8");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论