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

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

...@@ -24,5 +24,5 @@ public class Apply { ...@@ -24,5 +24,5 @@ public class Apply {
/** /**
* 原因 * 原因
*/ */
private String reason = "***********"; private String reason = "";
} }
...@@ -20,12 +20,12 @@ public class DatabaseDifficulty { ...@@ -20,12 +20,12 @@ public class DatabaseDifficulty {
/** /**
* 系统评估 * 系统评估
*/ */
private double systemEvaluation = 1.1; //private double systemEvaluation = 1.1;
/** /**
* 额外信息 * 额外信息
*/ */
private double message = 1.1; //private double message = 1.1;
/** /**
* 综合难度 * 综合难度
......
...@@ -20,12 +20,12 @@ public class ProgramDifficulty { ...@@ -20,12 +20,12 @@ public class ProgramDifficulty {
/** /**
* 系统评估 * 系统评估
*/ */
private double systemEvaluation = 1.1; //private double systemEvaluation = 1.1;
/** /**
* 额外信息 * 额外信息
*/ */
private double message = 1.1; //private double message = 1.1;
/** /**
* 综合难度 * 综合难度
......
...@@ -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代表当前依赖有问题
......
...@@ -53,7 +53,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver ...@@ -53,7 +53,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/adaptation?useSSL=false&serverTimezone=UTC&autoReconnect=true&characterEncoding=utf-8 spring.datasource.url=jdbc:mysql://localhost:3306/adaptation?useSSL=false&serverTimezone=UTC&autoReconnect=true&characterEncoding=utf-8
#spring.datasource.url=jdbc:mysql://120.55.57.35:3306/adaptation?characterEncoding=utf-8 #spring.datasource.url=jdbc:mysql://120.55.57.35:3306/adaptation?characterEncoding=utf-8
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=123456 spring.datasource.password=root
maven.home=/usr/share/maven maven.home=/usr/share/maven
maven.command=dependency:tree -DoutputType=txt -DoutputFile= maven.command=dependency:tree -DoutputType=txt -DoutputFile=
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论