微调
This commit is contained in:
@@ -8,9 +8,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
line_id AS lineId,
|
line_id AS lineId,
|
||||||
SUM(total) AS total,
|
SUM(total) AS total,
|
||||||
SUM(total_all) AS totalAll,
|
SUM(total_all) AS totalAll
|
||||||
SUM(flicker) AS flicker,
|
|
||||||
SUM(flicker_all) AS flickerAll
|
|
||||||
FROM
|
FROM
|
||||||
pq_data_verify_count
|
pq_data_verify_count
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
|||||||
List<String> verifyLine = verifyList.stream().map(PqDataVerifyCount::getLineId).distinct().collect(Collectors.toList());
|
List<String> verifyLine = verifyList.stream().map(PqDataVerifyCount::getLineId).distinct().collect(Collectors.toList());
|
||||||
List<String> devIdsLine = lineMapper.getDevIdsLine(verifyLine);
|
List<String> devIdsLine = lineMapper.getDevIdsLine(verifyLine);
|
||||||
if (CollUtil.isNotEmpty(devIdsLine)) {
|
if (CollUtil.isNotEmpty(devIdsLine)) {
|
||||||
return NumberUtil.round(Math.min(devIdsLine.size() * 100 / devIds.size(), 100), 2);
|
return NumberUtil.round(Math.min(devIdsLine.size() * 100.0 / devIds.size(), 100), 2);
|
||||||
} else {
|
} else {
|
||||||
return new BigDecimal(0);
|
return new BigDecimal(0);
|
||||||
}
|
}
|
||||||
@@ -455,7 +455,7 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
|||||||
if (totalAll == 0) {
|
if (totalAll == 0) {
|
||||||
return new BigDecimal(0);
|
return new BigDecimal(0);
|
||||||
}
|
}
|
||||||
return NumberUtil.round(Math.min((total ) * 100 / (totalAll), 100), 2);
|
return NumberUtil.round(Math.min(total * 100.0 / totalAll, 100), 2);
|
||||||
} else {
|
} else {
|
||||||
return new BigDecimal(0);
|
return new BigDecimal(0);
|
||||||
}
|
}
|
||||||
@@ -470,7 +470,7 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
|||||||
if (dueTime == 0) {
|
if (dueTime == 0) {
|
||||||
return new BigDecimal(0);
|
return new BigDecimal(0);
|
||||||
}
|
}
|
||||||
return NumberUtil.round(Math.min(realTime * 100 / dueTime, 100), 2);
|
return NumberUtil.round(Math.min(realTime * 100.0 / dueTime, 100), 2);
|
||||||
} else {
|
} else {
|
||||||
return new BigDecimal(0);
|
return new BigDecimal(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user