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

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

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