fix(接口测试): 修复场景执行报告顺序不正确的缺陷 (#11371)

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
metersphere-bot 2022-03-11 18:16:38 +08:00 committed by GitHub
parent af14559d2d
commit 03c3a918bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ public class ApiScenarioReportStructureService {
}
// 循环步骤请求从新排序
if (dtoList.stream().filter(e -> e.getValue() != null && e.getAllIndex() != null).collect(Collectors.toList()).size() == dtoList.size()) {
List<StepTreeDTO> list = dtoList.stream().sorted(Comparator.comparing(x -> x.getAllIndex())).collect(Collectors.toList());
List<StepTreeDTO> list = dtoList.stream().sorted(Comparator.comparing(x -> x.getIndex())).collect(Collectors.toList());
for (int index = 0; index < list.size(); index++) {
list.get(index).setIndex((index + 1));
}