提交 e79ee54f authored 作者: czq's avatar czq

Merge branch 'master' of git.yfzx.zjtys.com.cn:912-system/monitor/inspect into czq

...@@ -43,4 +43,6 @@ public class Warn { ...@@ -43,4 +43,6 @@ public class Warn {
* 关键字 * 关键字
*/ */
private String rule; private String rule;
private String categoryId;
} }
...@@ -170,6 +170,10 @@ public class Inspector { ...@@ -170,6 +170,10 @@ public class Inspector {
ruleMap.put(rule.getTarget()+":"+rule.getSuffix(),rule); ruleMap.put(rule.getTarget()+":"+rule.getSuffix(),rule);
} }
} }
List<Technology> technologies = technologyDao.findAll();
for (Technology technology : technologies) {
technologyHashMap.put(technology.getId(), technology);
}
try { try {
//以下为计算文件名称匹配正则表达式 //以下为计算文件名称匹配正则表达式
FileSystem aDefault = FileSystems.getDefault(); FileSystem aDefault = FileSystems.getDefault();
...@@ -584,7 +588,9 @@ public class Inspector { ...@@ -584,7 +588,9 @@ public class Inspector {
warn.setRuleId(rule.getId()); warn.setRuleId(rule.getId());
warn.setRule(rule.getTarget()); warn.setRule(rule.getTarget());
warn.setTechnologyId(rule.getTechnologyId()); warn.setTechnologyId(rule.getTechnologyId());
warn.setTechnologyName(technologyHashMap.get(rule.getTechnologyId()).getTechnologyName()); Technology technology = technologyHashMap.get(rule.getTechnologyId());
warn.setTechnologyName(technology.getTechnologyName());
warn.setCategoryId(technology.getCategory_id());
if (technologyHashMap.get(rule.getTechnologyId()).getSupport() == 2) { if (technologyHashMap.get(rule.getTechnologyId()).getSupport() == 2) {
warns.add(warn); warns.add(warn);
//设置a=0代表当前依赖有问题 //设置a=0代表当前依赖有问题
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论