Commit 107ea8c2 authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

数据统计

See merge request !367
parents 327b3b4c 28e4f3ef
......@@ -871,35 +871,38 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
Integer unprocessedNum = 0;
for (CaseStatisticsVO vo : statisticsVOList) {
// 忽略
if (Objects.equals(vo.getStatus(), "IGNORED")) {
ignoredNum = vo.getCount();
}
if (Objects.equals(vo.getStatus(), "PASSED")) {
// 测试通过
response.setTestDetailsPassNum(vo.getCount());
}
if (Objects.equals(vo.getStatus(), "FAILED")) {
// 测试未通过
response.setTestDetailsNoPassNum(vo.getCount());
if (statisticsVOList != null) {
for (CaseStatisticsVO vo : statisticsVOList) {
// 忽略
if (Objects.equals(vo.getStatus(), "IGNORED")) {
ignoredNum = vo.getCount();
}
if (Objects.equals(vo.getStatus(), "PASSED")) {
// 测试通过
response.setTestDetailsPassNum(vo.getCount());
}
if (Objects.equals(vo.getStatus(), "FAILED")) {
// 测试未通过
response.setTestDetailsNoPassNum(vo.getCount());
}
// 处理中
if (Objects.equals(vo.getStatus(), "PROCESSING")) {
processingNum = vo.getCount();
}
// 未处理
if (Objects.equals(vo.getStatus(), "UNPROCESSED")) {
unprocessedNum = vo.getCount();
}
}
// 处理中
if (Objects.equals(vo.getStatus(), "PROCESSING")) {
processingNum = vo.getCount();
}
// 未处理
if (Objects.equals(vo.getStatus(), "UNPROCESSED")) {
unprocessedNum = vo.getCount();
}
}
// 执行未完成
response.setTestDetailsUnderNum(processingNum + unprocessedNum);
// 执行未完成
response.setTestDetailsUnderNum(processingNum + unprocessedNum);
// 测试通过率
BigDecimal num = new BigDecimal(((double) response.getTestDetailsPassNum() / response.getTestDetails()) * 100);
response.setTestDetailsPass(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
}
// 测试通过率
BigDecimal num = new BigDecimal(((double) response.getTestDetailsPassNum() / response.getTestDetails()) * 100);
response.setTestDetailsPass(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
}
// 合规维度
......@@ -915,35 +918,38 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
Integer unprocessedNum = 0;
for (CaseStatisticsVO vo : statisticsVOList) {
// 忽略
if (Objects.equals(vo.getStatus(), "IGNORED")) {
ignoredNum = vo.getCount();
}
if (Objects.equals(vo.getStatus(), "PASSED")) {
// 测试通过
response.setTestStandardsPassNum(vo.getCount());
}
if (Objects.equals(vo.getStatus(), "FAILED")) {
// 测试未通过
response.setTestStandardsNoPassNum(vo.getCount());
if (statisticsVOList != null) {
for (CaseStatisticsVO vo : statisticsVOList) {
// 忽略
if (Objects.equals(vo.getStatus(), "IGNORED")) {
ignoredNum = vo.getCount();
}
if (Objects.equals(vo.getStatus(), "PASSED")) {
// 测试通过
response.setTestStandardsPassNum(vo.getCount());
}
if (Objects.equals(vo.getStatus(), "FAILED")) {
// 测试未通过
response.setTestStandardsNoPassNum(vo.getCount());
}
// 处理中
if (Objects.equals(vo.getStatus(), "PROCESSING")) {
processingNum = vo.getCount();
}
// 未处理
if (Objects.equals(vo.getStatus(), "UNPROCESSED")) {
unprocessedNum = vo.getCount();
}
}
// 处理中
if (Objects.equals(vo.getStatus(), "PROCESSING")) {
processingNum = vo.getCount();
}
// 未处理
if (Objects.equals(vo.getStatus(), "UNPROCESSED")) {
unprocessedNum = vo.getCount();
}
}
// 执行未完成
response.setTestStandardsUnderNum(processingNum + unprocessedNum);
// 执行未完成
response.setTestStandardsUnderNum(processingNum + unprocessedNum);
// 测试通过率
BigDecimal num = new BigDecimal(((double) response.getTestStandardsPassNum() / response.getTestStandards()) * 100);
response.setTestStandardsPass(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
}
// 测试通过率
BigDecimal num = new BigDecimal(((double) response.getTestStandardsPassNum() / response.getTestStandards()) * 100);
response.setTestStandardsPass(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment