fix(接口测试): 修复场景报告循环控制器下没有显示条件控制器的缺陷

--bug=1014306 --user=王孝刚 【接口测试】github #15189接口自动化测试报告中,没有显示条件控制器的请求
https://www.tapd.cn/55049933/s/1188832
This commit is contained in:
wxg0103 2022-06-22 19:36:26 +08:00 committed by f2c-ci-robot[bot]
parent a1f552be5d
commit 779dfc440e
2 changed files with 2 additions and 5 deletions

View File

@ -385,7 +385,7 @@ public class ApiScenarioReportStructureService {
*/
private void orderLoops(List<StepTreeDTO> dtoList) {
try {
List<StepTreeDTO> steps = dtoList.stream().filter(e -> e.getValue() == null)
List<StepTreeDTO> steps = dtoList.stream().filter(e -> e.getValue() == null || StringUtils.isEmpty(e.getValue().getId()))
.collect(Collectors.toList());
// 都是没有结果的步骤不需要再次排序
if (dtoList.size() == steps.size()) {

View File

@ -6,10 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.metersphere.base.domain.*;
import io.metersphere.base.mapper.IssueFollowMapper;
import io.metersphere.base.mapper.IssuesMapper;
import io.metersphere.base.mapper.TestCaseIssuesMapper;
import io.metersphere.base.mapper.TestPlanTestCaseMapper;
import io.metersphere.base.mapper.*;
import io.metersphere.base.mapper.ext.ExtIssuesMapper;
import io.metersphere.commons.constants.IssueRefType;
import io.metersphere.commons.constants.IssuesManagePlatform;