This commit is contained in:
wr
2025-12-19 10:19:59 +08:00
parent 2b79cefad6
commit 670eaf7d38
2 changed files with 4 additions and 6 deletions

View File

@@ -8,9 +8,7 @@
SELECT
line_id AS lineId,
SUM(total) AS total,
SUM(total_all) AS totalAll,
SUM(flicker) AS flicker,
SUM(flicker_all) AS flickerAll
SUM(total_all) AS totalAll
FROM
pq_data_verify_count
<where>

View File

@@ -440,7 +440,7 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
List<String> verifyLine = verifyList.stream().map(PqDataVerifyCount::getLineId).distinct().collect(Collectors.toList());
List<String> devIdsLine = lineMapper.getDevIdsLine(verifyLine);
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 {
return new BigDecimal(0);
}
@@ -455,7 +455,7 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
if (totalAll == 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 {
return new BigDecimal(0);
}
@@ -470,7 +470,7 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
if (dueTime == 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 {
return new BigDecimal(0);
}