提交 d350b6c7 authored 作者: 马晨俊's avatar 马晨俊

mcj:更新

上级 2d5f9627
......@@ -152,7 +152,7 @@ public class Inspector {
//统计项目语言
setReportLanguageAndFrame();
//根据扫描结果以及用户配置得出需要使用的规则及技术
ruleTransform(report.getRecastMethod());
ruleTransform(inspectParameter.getRecastMethod());
//解析配置文件集合
for (Map.Entry<String, List<Path>> entry : configFileTypePathsMapping.entrySet()) {
switch (entry.getKey()) {
......@@ -228,6 +228,7 @@ public class Inspector {
HashMap<String, List<Warn>> warnMap = getWarnMap();
ruleDao.saveAll(rules);
report.setWarnDetails(warnMap);
report.setSupportSize(supportWarns.size());
log.info("评估报告关键技术,{}", warnMap);
return report;
}
......@@ -268,17 +269,11 @@ public class Inspector {
*/
private void ruleTransform(Integer status) {
if (status == 1) {
this.ruleList = ruleDao.findAll();
} else {
List<Technology> front = technologyDao.findAllByBackorfrontEquals(1);
List<String> ids = front.stream().map(Technology::getId).collect(Collectors.toList());
this.ruleList = ruleDao.findAllByTechnologyIdIn(ids);
} else {
if (inspectParameter.getRecastMethod() == 1) {
this.ruleList = ruleDao.findAll();
} else {
List<Technology> front = technologyDao.findAllByBackorfrontEquals(1);
List<String> ids = front.stream().map(Technology::getId).collect(Collectors.toList());
this.ruleList = ruleDao.findAllByTechnologyIdIn(ids);
}
}
Set<String> id = ruleList.stream().map(Rule::getTechnologyId).collect(Collectors.toSet());
List<Technology> technologies = technologyDao.findAllByIdIn(new ArrayList<>(id));
......@@ -492,9 +487,6 @@ public class Inspector {
if (supportWarns.size() != 10) {
supportWarns.add(warn);
}
Integer size = report.getSupportSize();
Integer integer = size + 1;
report.setSupportSize(integer);
supportStatus = 1;
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论