调整检测报告

This commit is contained in:
2025-10-16 13:36:14 +08:00
parent 6843497908
commit 15e93b6734
146 changed files with 14 additions and 9588 deletions

View File

@@ -31,6 +31,7 @@ public enum BaseReportKeyEnum {
DAY("day",""),
YEAR_MONTH_DAY("year-month-day","年-月-日"),
REPORT_DATE("reportDate","年-月-日"),
GD_NAME("gdName","供电部门"),
SUB_NAME("subName","变电站"),
CHECK_BY("checkBy","检测人"),
AUDIT_BY("auditBy","负责人、审核人"),

View File

@@ -2010,6 +2010,8 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
baseModelMap.put(BaseReportKeyEnum.SAMPLE_ID.getKey(), StrUtil.isEmpty(pqDevVO.getName()) ? StrPool.TAB : pqDevVO.getName());
// 报告日期
baseModelMap.put(BaseReportKeyEnum.REPORT_DATE.getKey(), DateUtil.format(new Date(), DatePattern.CHINESE_DATE_PATTERN));
// 供电部门
baseModelMap.put(BaseReportKeyEnum.GD_NAME.getKey(), pqDevVO.getGdName());
// 变电站名称
baseModelMap.put(BaseReportKeyEnum.SUB_NAME.getKey(), pqDevVO.getSubName());
// 检测人

View File

@@ -1993,7 +1993,6 @@ public class ResultServiceImpl implements IResultService {
String resultTemp = singlePhaseData.get(ItemReportKeyEnum.RESULT.getKey());
if (StrUtil.isNotBlank(resultTemp)) {
allResult.add(resultTemp);
// 收集特殊情况
if ("无法比较".equals(resultTemp)) {
String numOfDataStr = singlePhaseData.get(ItemReportKeyEnum.NUM_OF_DATA.getKey());
@@ -2440,10 +2439,13 @@ public class ResultServiceImpl implements IResultService {
}
dataMap.put(ItemReportKeyEnum.TEST.getKey(), testValue);
// 误差 - 根据参数决定是否格式化
String errorValue = String.valueOf(detectionData.getErrorData());
if (decimalPlaces != null && detectionData.getErrorData() != null) {
if (decimalPlaces != null && detectionData.getErrorData() != null ) {
errorValue = formatSignificantDigits(detectionData.getErrorData().doubleValue(), decimalPlaces);
}else{
errorValue = "/";
}
dataMap.put(ItemReportKeyEnum.ERROR.getKey(), errorValue);
@@ -2451,6 +2453,8 @@ public class ResultServiceImpl implements IResultService {
String errorScope = String.valueOf(detectionData.getRadius());
if (decimalPlaces != null && detectionData.getRadius() != null) {
errorScope = formatErrorRange(detectionData.getRadius(), decimalPlaces);
}else{
errorScope = "/";
}
dataMap.put(ItemReportKeyEnum.A_ERROR_SCOPE.getKey(), errorScope);
@@ -2573,6 +2577,8 @@ public class ResultServiceImpl implements IResultService {
String errorValue = String.valueOf(detectionData.getErrorData());
if (decimalPlaces != null && detectionData.getErrorData() != null) {
errorValue = formatSignificantDigits(detectionData.getErrorData().doubleValue(), decimalPlaces);
}else{
errorValue = "/";
}
dataMap.put(ItemReportKeyEnum.ERROR.getKey(), errorValue);
@@ -2580,6 +2586,8 @@ public class ResultServiceImpl implements IResultService {
String errorScope = String.valueOf(detectionData.getRadius());
if (decimalPlaces != null && detectionData.getRadius() != null) {
errorScope = formatErrorRange(detectionData.getRadius(), decimalPlaces);
}else{
errorScope = "/";
}
dataMap.put(ItemReportKeyEnum.A_ERROR_SCOPE.getKey(), errorScope);