优化部分代码

This commit is contained in:
2025-06-09 20:09:35 +08:00
parent 9820d0a915
commit 9eca074ffb
2 changed files with 23 additions and 20 deletions

View File

@@ -1314,7 +1314,7 @@ public class ResultServiceImpl implements IResultService {
// 持续时间,需要注意时间单位处理,默认是秒
String timeUnit = "s";
for (String tableKey : tableKeys) {
if (tableKey.contains(ItemReportKeyEnum.STANDARD_DUR.getKey())) {
if (tableKey.contains("standardDur")) {
//截取单位
String[] tempStr = tableKey.split(StrPool.UNDERLINE);
if (tempStr.length > 1) {
@@ -1322,6 +1322,7 @@ public class ResultServiceImpl implements IResultService {
timeUnit = "ms";
}
}
break;
}
}
if (Objects.nonNull(tempT.getResultData())) {
@@ -1331,7 +1332,7 @@ public class ResultServiceImpl implements IResultService {
testDur = PubUtils.doubleRoundStr(4, tempT.getData());
}
if (Objects.nonNull(tempT.getErrorData())) {
testDur = PubUtils.doubleRoundStr(4, tempT.getErrorData().doubleValue());
errorDur = PubUtils.doubleRoundStr(4, tempT.getErrorData().doubleValue());
}
if (Objects.nonNull(tempT.getIsData())) {
resultDur = tempT.getIsData() == 1 ? "合格" : "不合格";