优化部分代码
This commit is contained in:
@@ -92,24 +92,26 @@ public class BookmarkUtil {
|
|||||||
}
|
}
|
||||||
idx = idx + 1;
|
idx = idx + 1;
|
||||||
parentContent.add(idx, p);
|
parentContent.add(idx, p);
|
||||||
} else if (textFromP.startsWith(PowerIndexEnum.IMBV.getDesc())
|
}
|
||||||
|| textFromP.startsWith(PowerIndexEnum.HV.getDesc())
|
// else if (textFromP.startsWith(PowerIndexEnum.IMBV.getDesc())
|
||||||
|| textFromP.startsWith(PowerIndexEnum.HI.getDesc())
|
// || textFromP.startsWith(PowerIndexEnum.HV.getDesc())
|
||||||
|
// || textFromP.startsWith(PowerIndexEnum.HI.getDesc())
|
||||||
) {
|
//
|
||||||
// 另起一页
|
// ) {
|
||||||
P pagePara = Docx4jUtil.getPageBreak();
|
// // 另起一页
|
||||||
idx = idx + 1;
|
// P pagePara = Docx4jUtil.getPageBreak();
|
||||||
parentContent.add(idx, pagePara);
|
// idx = idx + 1;
|
||||||
idx = idx + 1;
|
// parentContent.add(idx, pagePara);
|
||||||
parentContent.add(idx, element);
|
// idx = idx + 1;
|
||||||
}else if(textFromP.startsWith("注:基波电流幅值5.000A,基波频率50.0Hz,各次间谐波电流含有率均为3.0%。")){
|
// parentContent.add(idx, element);
|
||||||
idx = idx + 1;
|
// }else if(textFromP.startsWith("注:基波电流幅值5.000A,基波频率50.0Hz,各次间谐波电流含有率均为3.0%。")){
|
||||||
parentContent.add(idx, element);
|
// idx = idx + 1;
|
||||||
P pagePara = Docx4jUtil.getPageBreak();
|
// parentContent.add(idx, element);
|
||||||
idx = idx + 1;
|
// P pagePara = Docx4jUtil.getPageBreak();
|
||||||
parentContent.add(idx, pagePara);
|
// idx = idx + 1;
|
||||||
} else {
|
// parentContent.add(idx, pagePara);
|
||||||
|
// }
|
||||||
|
else {
|
||||||
idx = idx + 1;
|
idx = idx + 1;
|
||||||
parentContent.add(idx, element);
|
parentContent.add(idx, element);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1314,7 +1314,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
// 持续时间,需要注意时间单位处理,默认是秒
|
// 持续时间,需要注意时间单位处理,默认是秒
|
||||||
String timeUnit = "s";
|
String timeUnit = "s";
|
||||||
for (String tableKey : tableKeys) {
|
for (String tableKey : tableKeys) {
|
||||||
if (tableKey.contains(ItemReportKeyEnum.STANDARD_DUR.getKey())) {
|
if (tableKey.contains("standardDur")) {
|
||||||
//截取单位
|
//截取单位
|
||||||
String[] tempStr = tableKey.split(StrPool.UNDERLINE);
|
String[] tempStr = tableKey.split(StrPool.UNDERLINE);
|
||||||
if (tempStr.length > 1) {
|
if (tempStr.length > 1) {
|
||||||
@@ -1322,6 +1322,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
timeUnit = "ms";
|
timeUnit = "ms";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(tempT.getResultData())) {
|
if (Objects.nonNull(tempT.getResultData())) {
|
||||||
@@ -1331,7 +1332,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
testDur = PubUtils.doubleRoundStr(4, tempT.getData());
|
testDur = PubUtils.doubleRoundStr(4, tempT.getData());
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(tempT.getErrorData())) {
|
if (Objects.nonNull(tempT.getErrorData())) {
|
||||||
testDur = PubUtils.doubleRoundStr(4, tempT.getErrorData().doubleValue());
|
errorDur = PubUtils.doubleRoundStr(4, tempT.getErrorData().doubleValue());
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(tempT.getIsData())) {
|
if (Objects.nonNull(tempT.getIsData())) {
|
||||||
resultDur = tempT.getIsData() == 1 ? "合格" : "不合格";
|
resultDur = tempT.getIsData() == 1 ? "合格" : "不合格";
|
||||||
|
|||||||
Reference in New Issue
Block a user