调整检测报告
This commit is contained in:
@@ -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","负责人、审核人"),
|
||||
|
||||
@@ -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());
|
||||
// 检测人
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user