优化部分代码
This commit is contained in:
@@ -92,24 +92,26 @@ public class BookmarkUtil {
|
||||
}
|
||||
idx = idx + 1;
|
||||
parentContent.add(idx, p);
|
||||
} else if (textFromP.startsWith(PowerIndexEnum.IMBV.getDesc())
|
||||
|| textFromP.startsWith(PowerIndexEnum.HV.getDesc())
|
||||
|| textFromP.startsWith(PowerIndexEnum.HI.getDesc())
|
||||
|
||||
) {
|
||||
// 另起一页
|
||||
P pagePara = Docx4jUtil.getPageBreak();
|
||||
idx = idx + 1;
|
||||
parentContent.add(idx, pagePara);
|
||||
idx = idx + 1;
|
||||
parentContent.add(idx, element);
|
||||
}else if(textFromP.startsWith("注:基波电流幅值5.000A,基波频率50.0Hz,各次间谐波电流含有率均为3.0%。")){
|
||||
idx = idx + 1;
|
||||
parentContent.add(idx, element);
|
||||
P pagePara = Docx4jUtil.getPageBreak();
|
||||
idx = idx + 1;
|
||||
parentContent.add(idx, pagePara);
|
||||
} else {
|
||||
}
|
||||
// else if (textFromP.startsWith(PowerIndexEnum.IMBV.getDesc())
|
||||
// || textFromP.startsWith(PowerIndexEnum.HV.getDesc())
|
||||
// || textFromP.startsWith(PowerIndexEnum.HI.getDesc())
|
||||
//
|
||||
// ) {
|
||||
// // 另起一页
|
||||
// P pagePara = Docx4jUtil.getPageBreak();
|
||||
// idx = idx + 1;
|
||||
// parentContent.add(idx, pagePara);
|
||||
// idx = idx + 1;
|
||||
// parentContent.add(idx, element);
|
||||
// }else if(textFromP.startsWith("注:基波电流幅值5.000A,基波频率50.0Hz,各次间谐波电流含有率均为3.0%。")){
|
||||
// idx = idx + 1;
|
||||
// parentContent.add(idx, element);
|
||||
// P pagePara = Docx4jUtil.getPageBreak();
|
||||
// idx = idx + 1;
|
||||
// parentContent.add(idx, pagePara);
|
||||
// }
|
||||
else {
|
||||
idx = idx + 1;
|
||||
parentContent.add(idx, element);
|
||||
}
|
||||
|
||||
@@ -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 ? "合格" : "不合格";
|
||||
|
||||
Reference in New Issue
Block a user