提交 58e801d2 authored 作者: 孙洁清's avatar 孙洁清

关键技术接口根据name查询功能

上级 e61b1478
......@@ -114,17 +114,17 @@ public class InspectController {
map.put("techMap",techMap);
map.put("warnMap",warnMap);
map.put("technologies",technologies);
// try {
// String template = FreemarkerUtils.getTemplate("pg.ftl", map);
// String s = inspectService.generateHtml(template, map);
// String filePath = FileUtil.createFilePath();
// File file1 = new File("./pgbg/" + filePath + "/" + file.getName() + ".html");
// FileUtil.write(s,"./pgbg/"+filePath+"/"+file.getName()+".html");
// reportVo.setHtmlAddress(file1.getCanonicalPath());
// System.out.println("内容"+s);
// } catch (TemplateException e) {
// e.printStackTrace();
// }
try {
String template = FreemarkerUtils.getTemplate("pg.ftl", map);
String s = inspectService.generateHtml(template, map);
String filePath = FileUtil.createFilePath();
File file1 = new File("/freemaker/" + filePath + "/" + file.getName() + ".html");
FileUtil.write(s,"/opt/inspect/freemaker/"+filePath+"/"+file.getName()+".html");
reportVo.setHtmlAddress(file1.getCanonicalPath());
System.out.println("内容"+s);
} catch (TemplateException e) {
e.printStackTrace();
}
Report report = new Report();
String random = RandomUtil.getRandom();
report.setId(RandomUtil.getRandom());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论