fix(测试计划): 组的执行分析统计有误

This commit is contained in:
song-cc-rock 2024-06-17 19:45:28 +08:00 committed by Craftsman
parent 4b14f649a9
commit 86309845c0
1 changed files with 3 additions and 2 deletions

View File

@ -635,6 +635,7 @@ public class TestPlanReportService {
* @param reportId 报告ID
*/
public void summaryGroupReport(String reportId) {
// TODO: 更新计划组的用例明细执行结果
TestPlanReportSummaryExample summaryExample = new TestPlanReportSummaryExample();
summaryExample.createCriteria().andTestPlanReportIdEqualTo(reportId);
List<TestPlanReportSummary> testPlanReportSummaries = testPlanReportSummaryMapper.selectByExample(summaryExample);
@ -645,14 +646,14 @@ public class TestPlanReportService {
TestPlanReportSummary groupSummary = testPlanReportSummaries.get(0);
TestPlanReportExample example = new TestPlanReportExample();
example.createCriteria().andParentIdEqualTo(reportId);
example.createCriteria().andParentIdEqualTo(reportId).andIntegratedEqualTo(false);
List<TestPlanReport> testPlanReports = testPlanReportMapper.selectByExample(example);
if(CollectionUtils.isEmpty(testPlanReports)){
return;
}
List<String> ids = testPlanReports.stream().map(TestPlanReport::getId).toList();
summaryExample.clear();
summaryExample.createCriteria().andIdIn(ids);
summaryExample.createCriteria().andTestPlanReportIdIn(ids);
List<TestPlanReportSummary> summaryList = testPlanReportSummaryMapper.selectByExampleWithBLOBs(summaryExample);
List<CaseCount> functionalCaseCountList = new ArrayList<>();
List<CaseCount> apiCaseCountList = new ArrayList<>();