fix: 测试计划报告缺陷统计不完全

This commit is contained in:
chenjianxing 2021-08-24 15:06:01 +08:00 committed by jianxing
parent c1599107c2
commit 420c4b4ed0
3 changed files with 18 additions and 16 deletions

View File

@ -43,7 +43,7 @@
where project_id = #{projectId} and platform != 'Local';
</select>
<select id="selectForPlanReport" resultType="io.metersphere.track.dto.PlanReportIssueDTO">
select id,status,platform_status,platform from issues where resource_id = #{planId} and platform_status != 'delete';;
select id,status,platform_status,platform from issues where resource_id = #{planId} and ( platform_status != 'delete' or platform_status is null);
</select>
<sql id="queryWhereCondition">

View File

@ -1460,21 +1460,23 @@ public class TestPlanService {
allCases.forEach(item -> {
LoadCaseReportRequest request = new LoadCaseReportRequest();
String reportId = item.getLoadReportId();
request.setTestPlanLoadCaseId(item.getId());
request.setReportId(reportId);
Boolean existReport = testPlanLoadCaseService.isExistReport(request);
if (existReport) {
LoadTestReportWithBLOBs loadTestReport = performanceReportService.getLoadTestReport(reportId);
ReportTimeInfo reportTimeInfo = performanceReportService.getReportTimeInfo(reportId);
TestPlanLoadCaseDTO.ReportDTO reportDTO = new TestPlanLoadCaseDTO.ReportDTO();
if (loadTestReport != null) {
BeanUtils.copyBean(reportDTO, loadTestReport);
if (StringUtils.isNotBlank(reportId)) {
request.setTestPlanLoadCaseId(item.getId());
request.setReportId(reportId);
Boolean existReport = testPlanLoadCaseService.isExistReport(request);
if (existReport) {
LoadTestReportWithBLOBs loadTestReport = performanceReportService.getLoadTestReport(reportId);
ReportTimeInfo reportTimeInfo = performanceReportService.getReportTimeInfo(reportId);
TestPlanLoadCaseDTO.ReportDTO reportDTO = new TestPlanLoadCaseDTO.ReportDTO();
if (loadTestReport != null) {
BeanUtils.copyBean(reportDTO, loadTestReport);
}
if (reportTimeInfo != null) {
BeanUtils.copyBean(reportDTO, reportTimeInfo);
}
item.setResponse(reportDTO);
// todo 报告详情
}
if (reportTimeInfo != null) {
BeanUtils.copyBean(reportDTO, reportTimeInfo);
}
item.setResponse(reportDTO);
// todo 报告详情
}
});
}

View File

@ -16,7 +16,7 @@
</el-popover>
</el-row>
<el-row>
<el-button icon="el-icon-download" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleSave()">
<el-button icon="el-icon-receiving" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleSave()">
{{'保存'}}
</el-button>
</el-row>