fix(测试计划): 计划组报告生成失败

--bug=1042533 --user=宋昌昌 【测试计划】定时任务执行测试计划组-只有子计划的报告,没有计划组报告 https://www.tapd.cn/55049933/s/1531631
This commit is contained in:
song-cc-rock 2024-06-19 14:02:48 +08:00 committed by 刘瑞斌
parent 2d51739c1c
commit 29bf611f59
2 changed files with 21 additions and 27 deletions

View File

@ -9,6 +9,9 @@ import lombok.Data;
@Data
public class TestPlanReportDetailResponse {
/**
* 基础报告详情信息
*/
@Schema(description = "报告ID")
private String id;
@Schema(description = "报告名称")
@ -21,6 +24,8 @@ public class TestPlanReportDetailResponse {
private Long endTime;
@Schema(description = "报告内容")
private String summary;
@Schema(description = "用例总数")
private Integer caseTotal = 0;
/**
* 报告分析
@ -39,6 +44,18 @@ public class TestPlanReportDetailResponse {
@Schema(description = "计划总数")
private Integer planCount;
/**
* 执行分析面板
*/
@Schema(description = "执行分析-用例数")
private CaseCount executeCount;
@Schema(description = "功能用例分析-用例数")
private CaseCount functionalCount;
@Schema(description = "接口用例分析-用例数")
private CaseCount apiCaseCount;
@Schema(description = "接口场景用例分析-用例数")
private CaseCount apiScenarioCount;
/**
* 一键总结参数
*/
@ -48,39 +65,16 @@ public class TestPlanReportDetailResponse {
private Integer failCountOfPlan = 0;
@Schema(description = "功能用例明细的缺陷数量")
private Integer functionalBugCount = 0;
@Schema(description = "功能用例明细的缺陷数量")
@Schema(description = "接口用例明细的缺陷数量")
private Integer apiBugCount = 0;
@Schema(description = "功能用例明细的缺陷数量")
@Schema(description = "场景用例明细的缺陷数量")
private Integer scenarioBugCount = 0;
@Schema(description = "用例总数")
private Integer caseTotal = 0;
/**
* 执行分析
* 报告明细列表 参数
*/
@Schema(description = "执行分析-用例数")
private CaseCount executeCount;
/**
* 功能用例分析
*/
@Schema(description = "功能用例分析-用例数")
private CaseCount functionalCount;
/**
* 接口用例分析
*/
@Schema(description = "接口用例分析-用例数")
private CaseCount apiCaseCount;
/**
* 接口场景用例分析
*/
@Schema(description = "接口场景用例分析-用例数")
private CaseCount apiScenarioCount;
@Schema(description = "报告是否删除")
private boolean deleted;
@Schema(description = "报告状态")
private String resultStatus;
}

View File

@ -302,7 +302,7 @@ public class TestPlanReportService {
report.setCreateUser(currentUser);
report.setCreateTime(System.currentTimeMillis());
report.setDeleted(false);
report.setPassThreshold(config.getPassThreshold());
report.setPassThreshold(config == null ? null : config.getPassThreshold());
report.setParentId(genParam.getGroupReportId());
testPlanReportMapper.insertSelective(report);