代码调整
This commit is contained in:
@@ -93,24 +93,24 @@ 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 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);
|
||||
|
||||
@@ -1132,7 +1132,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
if (Objects.nonNull(tempA.getErrorData())) {
|
||||
errorA = PubUtils.doubleRoundStr(4, tempA.getErrorData().doubleValue());
|
||||
}
|
||||
resultA = tempA.getIsData() == 1 ? "合格" : tempA.getIsData() == 0 ? "不合格" : "/";
|
||||
resultA = tempA.getIsData() == 1 ? "合格" : tempA.getIsData() == 2 ? "不合格" : "/";
|
||||
errorScope = tempA.getRadius() == null ? "/" : tempA.getRadius();
|
||||
unit = tempA.getUnit() == null ? "" : tempA.getUnit();
|
||||
standard = PubUtils.doubleRoundStr(4, tempA.getResultData()) == null ? "/" : PubUtils.doubleRoundStr(4, tempA.getResultData());
|
||||
@@ -1143,7 +1143,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
if (Objects.nonNull(tempB.getErrorData())) {
|
||||
errorB = PubUtils.doubleRoundStr(4, tempB.getErrorData().doubleValue());
|
||||
}
|
||||
resultB = tempB.getIsData() == 1 ? "合格" : tempB.getIsData() == 0 ? "不合格" : "/";
|
||||
resultB = tempB.getIsData() == 1 ? "合格" : tempB.getIsData() == 2 ? "不合格" : "/";
|
||||
if (errorScope.equals("/")) {
|
||||
errorScope = tempB.getRadius() == null ? "/" : tempB.getRadius();
|
||||
}
|
||||
@@ -1160,7 +1160,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
if (Objects.nonNull(tempC.getErrorData())) {
|
||||
errorC = PubUtils.doubleRoundStr(4, tempC.getErrorData().doubleValue());
|
||||
}
|
||||
resultC = tempC.getIsData() == 1 ? "合格" : tempC.getIsData() == 0 ? "不合格" : "/";
|
||||
resultC = tempC.getIsData() == 1 ? "合格" : tempC.getIsData() == 2 ? "不合格" : "/";
|
||||
if (errorScope.equals("/")) {
|
||||
errorScope = tempC.getRadius() == null ? "/" : tempC.getRadius();
|
||||
}
|
||||
@@ -1172,11 +1172,11 @@ public class ResultServiceImpl implements IResultService {
|
||||
}
|
||||
}
|
||||
// 浙江脚本特殊处理
|
||||
// if (scriptCode.equalsIgnoreCase("I")) {
|
||||
// resultA = "/";
|
||||
// resultB = "/";
|
||||
// resultC = "/";
|
||||
// }
|
||||
if (scriptCode.equalsIgnoreCase("I")) {
|
||||
resultA = "/";
|
||||
resultB = "/";
|
||||
resultC = "/";
|
||||
}
|
||||
if (standardA.equals(standardB) && standardA.equals(standardC)) {
|
||||
standard = standardA;
|
||||
}
|
||||
@@ -1267,7 +1267,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
if (Objects.nonNull(tempT.getErrorData())) {
|
||||
error = PubUtils.doubleRoundStr(4, tempT.getErrorData().doubleValue());
|
||||
}
|
||||
result = tempT.getIsData() == 1 ? "合格" : tempT.getIsData() == 0 ? "不合格" : "/";
|
||||
result = tempT.getIsData() == 1 ? "合格" : tempT.getIsData() == 2 ? "不合格" : "/";
|
||||
unit = tempT.getUnit() == null ? "" : tempT.getUnit();
|
||||
errorScope = tempT.getRadius() == null ? "/" : tempT.getRadius();
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ public class ResultServiceImpl implements IResultService {
|
||||
if (Objects.nonNull(tempT.getErrorData())) {
|
||||
errorMag = PubUtils.doubleRoundStr(4, tempT.getErrorData().doubleValue());
|
||||
}
|
||||
resultMag = tempT.getIsData() == 1 ? "合格" : tempT.getIsData() == 0 ? "不合格" : "/";
|
||||
resultMag = tempT.getIsData() == 1 ? "合格" : tempT.getIsData() == 2 ? "不合格" : "/";
|
||||
unitMag = tempT.getUnit();
|
||||
errorScopeMag = tempT.getRadius();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user