提交 2d6540de authored 作者: 孙洁清's avatar 孙洁清

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

上级 92cf482c
...@@ -80,26 +80,26 @@ public class InspectController { ...@@ -80,26 +80,26 @@ public class InspectController {
reportVo.setSourceAddress(file.getCanonicalPath()); reportVo.setSourceAddress(file.getCanonicalPath());
ReportVo inspect = inspectService.inspect(reportVo,inspectParameter); ReportVo inspect = inspectService.inspect(reportVo,inspectParameter);
Map map=new HashMap(); // Map map=new HashMap();
map.put("inspect",inspect); // map.put("inspect",inspect);
map.put("time",TimeUtil.getTime()); // map.put("time",TimeUtil.getTime());
HashMap<String, List<Warn>> warnMap = inspect.getWarnDetails(); // HashMap<String, List<Warn>> warnMap = inspect.getWarnDetails();
List<Technology> technologies = inspect.getTechnologies(); // List<Technology> technologies = inspect.getTechnologies();
Map techMap=new HashMap(); // Map techMap=new HashMap();
for (Technology technology : technologies) { // for (Technology technology : technologies) {
techMap.put(technology.getTechnologyName(),technology.getSupport()); // techMap.put(technology.getTechnologyName(),technology.getSupport());
} // }
map.put("techMap",techMap); // map.put("techMap",techMap);
map.put("warnMap",warnMap); // map.put("warnMap",warnMap);
map.put("technologies",technologies); // map.put("technologies",technologies);
try { // try {
String template = FreemarkerUtils.getTemplate("pg.ftl", map); // String template = FreemarkerUtils.getTemplate("pg.ftl", map);
String s = inspectService.generateHtml(template, map); // String s = inspectService.generateHtml(template, map);
FileUtil.write(s,"/opt/pgbg/"+fileName+".html"); // FileUtil.write(s,"/opt/pgbg/"+fileName+".html");
System.out.println("内容"+s); // System.out.println("内容"+s);
} catch (TemplateException e) { // } catch (TemplateException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
return ResponseEntity.ok(inspect); return ResponseEntity.ok(inspect);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论