From 00ab259f3580d2e6ef3007129068acce03602bc2 Mon Sep 17 00:00:00 2001 From: chen <2710907404@qq.com> Date: Tue, 18 Mar 2025 14:22:20 +0800 Subject: [PATCH] =?UTF-8?q?20250318=20=E6=9B=B4=E6=96=B0=201.=E5=AD=98?= =?UTF-8?q?=E5=85=A5=E4=BF=9D=E7=95=99=E6=97=B6=E9=97=B4=E7=9B=B8=E5=AF=B9?= =?UTF-8?q?=E5=81=8F=E5=B7=AE=E6=98=AF=E5=90=A6=E5=9C=A8=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/dto/NPSCaseTestSampleData.java | 3 +- .../impl/TestRecordSampleDataServiceImpl.java | 107 ++++-------------- 2 files changed, 24 insertions(+), 86 deletions(-) diff --git a/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/dto/NPSCaseTestSampleData.java b/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/dto/NPSCaseTestSampleData.java index 873ac33..8c24054 100644 --- a/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/dto/NPSCaseTestSampleData.java +++ b/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/dto/NPSCaseTestSampleData.java @@ -1,6 +1,5 @@ package digital.laboratory.platform.inspection.dto; -import digital.laboratory.platform.inspection.utils.datafile.nps.NPSTestDetailDataStruct; import lombok.Data; @Data @@ -22,7 +21,7 @@ public class NPSCaseTestSampleData { private String area;//峰面积 private String stdRetTime; private String sn; - private String abundanceRatio;//丰度比,如果是基峰,我们设置为1,丰度比的公式为自己的峰面积/基峰峰面积 + private String abundanceRatio;//丰度比,如果是基峰,我们设置为1,丰度比的公式为自己的峰面积/基峰峰面积 private String abundanceRatio_std;// 标准物质的丰度比 private String abundanceRatioError;//丰度比偏差,如果是基峰不需要比,公式是 (自己的丰度比-标准品的MZ对应丰度比)/标准品的MZ对应丰度比 private String errorRange;//误差范围 diff --git a/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/service/impl/TestRecordSampleDataServiceImpl.java b/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/service/impl/TestRecordSampleDataServiceImpl.java index ef35c05..0b17015 100644 --- a/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/service/impl/TestRecordSampleDataServiceImpl.java +++ b/dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/service/impl/TestRecordSampleDataServiceImpl.java @@ -741,72 +741,9 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl { -// Map> groupByCompoundMap = v.stream().collect(Collectors.groupingBy(DataSolutionSampleDTO::getCompoundName)); -// stringBuilder.append("\t").append(index.getAndIncrement()).append("、从").append(v.get(0).getSampleName() + "(" + v.get(0).getSampleNo() + ")"); -// String checkOutResult = ""; -// String notCheckOutResult = ""; -// Set keySet = groupByCompoundMap.keySet(); -// for (String key : keySet) { -// List dtoS1 = groupByCompoundMap.get(key); -// boolean detected = true; -// /// 下面先判断是否检出 -// if (dtoS1.size() > 1) { -// Set isDetected = dtoS1.stream().map(DataSolutionSampleDTO::getIsDetected).collect(Collectors.toSet()); -// // 如果set的长度大于1 则证明其中有的检出,有的未检出, 或者其中值有0 -// if (isDetected.size() > 1 || isDetected.contains(0)) { -// detected = false; -// } -// } else { -// // 不等于1 未检出 -// detected = dtoS1.get(0).getIsDetected() == 1; -// } -// // 拼接结果 -// if (detected) { -// if (StrUtil.isBlank(checkOutResult)) { -// checkOutResult = TestRecordSampleDataConstant.CHECK_OUT + key; -// } else { -// checkOutResult = checkOutResult + "、" + key; -// } -// -// } else { -// if (StrUtil.isBlank(notCheckOutResult)) { -// notCheckOutResult = TestRecordSampleDataConstant.NOT_CHECK_OUT + key; -// } else { -// notCheckOutResult = notCheckOutResult + "、" + key; -// } -// } -// } -// if (StrUtil.isNotBlank(checkOutResult) && StrUtil.isNotBlank(notCheckOutResult)) { -// stringBuilder.append(checkOutResult + ","); -// stringBuilder.append(notCheckOutResult + "。"); -// } else if (StrUtil.isNotBlank(checkOutResult)) { -// stringBuilder.append(checkOutResult + "。"); -// } else { -// stringBuilder.append(notCheckOutResult + "。"); -// } -// stringBuilder.append("\n"); -// }); - return stringBuilder.toString(); } -// 之前生成定性结果的代码 - // Map> isDetectedMap = v.stream().collect(Collectors.groupingBy(DataSolutionSampleDTO::getIsDetected)); -// List checkOutList = isDetectedMap.get(1); -// List notCheckOutList = isDetectedMap.get(0); -//// String result = "从" + v.get(0).getSampleName(); -// stringBuilder.append("\t"); -// stringBuilder.append(index.getAndIncrement() + "、从" + v.get(0).getSampleName()); -// if (CollUtil.isNotEmpty(checkOutList)) { -// String result = TestRecordSampleDataConstant.CHECK_OUT + -// StrUtil.join("、", checkOutList.stream().map(DataSolutionSampleDTO::getCompoundName).collect(Collectors.toList())) + ","; -// stringBuilder.append(result); -// } -// if (CollUtil.isNotEmpty(notCheckOutList)) { -// String result = TestRecordSampleDataConstant.NOT_CHECK_OUT + -// StrUtil.join("、", notCheckOutList.stream().map(DataSolutionSampleDTO::getCompoundName).collect(Collectors.toList())) + "。"; -// stringBuilder.append(result); -// } + /** * 完成实验 @@ -1153,7 +1090,7 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl