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

mcj:

修复导入excel问题
上级 17667656
......@@ -384,8 +384,11 @@ public class InspectController {
@PostMapping("/uploads")
private ServerResponse uploads(@RequestParam(value = "file") MultipartFile multfile) {
try {
HashMap<String, String> map = new HashMap<>();
map.put("unzip","获取压缩文件");
File file = FileUtil.saveToLocal(multfile);
map.put("unzip","压缩文件解压完毕");
asyncTask.sendMessageToAll(map);
String name = file.getName();
String path = file.getCanonicalPath();
return ServerResponse.ok(new com.zjty.inspect.entity.File(name, path));
......
......@@ -155,7 +155,12 @@ public class Inspector {
//初始化成员变量
initData();
//扫描文件,进行文件分类
HashMap<String, String> map = new HashMap<>();
map.put("file","开始扫描文件");
asyncTask.sendMessageToAll(map);
scanFiles();
map.put("file","文件扫描结束");
asyncTask.sendMessageToAll(map);
//配置参数
inspectParameter.setCodeSize((int) codeSize);
report.setFileNum(fileNum);
......@@ -166,7 +171,11 @@ public class Inspector {
//根据扫描结果以及用户配置得出需要使用的规则及技术
ruleTransform(inspectParameter.getRecastMethod());
//扫描源代码文件
map.put("file","开始扫描源代码文件");
asyncTask.sendMessageToAll(map);
forEachFilesMap();
map.put("file","源代码文件扫描结束");
asyncTask.sendMessageToAll(map);
//将得到的告警信息根据技术id进行转换
Set<String> technologyIds = warns.stream().map(Warn::getTechnologyId).collect(Collectors.toSet());
List<Technology> technologies = technologyDao.findAllById(technologyIds);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论