|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package digital.laboratory.platform.inspection.service.impl; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
import digital.laboratory.platform.inspection.constant.TestRecordSampleDataConstant; |
|
|
|
@ -38,13 +39,13 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor |
|
|
|
|
// 设置基峰的扩展数据
|
|
|
|
|
if (!TestRecordSampleDataConstant.isInvalidValue(hairSewageDataDto.getPeakAreaUp())) { |
|
|
|
|
hairSewageInspectExpDataList.add(createTestRecordSampleDataExpand(testDataId, Boolean.TRUE, |
|
|
|
|
hairSewageDataDto.getPeakAreaUp(), null, null, null, null)); |
|
|
|
|
hairSewageDataDto.getPeakAreaUp(), null, null, null, null, null, hairSewageDataDto.getQualitativeIonPairUp(), null)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!TestRecordSampleDataConstant.isInvalidValue(hairSewageDataDto.getPeakAreaDown())) { |
|
|
|
|
hairSewageInspectExpDataList.add(createTestRecordSampleDataExpand(testDataId, Boolean.FALSE, |
|
|
|
|
hairSewageDataDto.getPeakAreaDown(), hairSewageDataDto.getIonAbundanceRatio(), |
|
|
|
|
hairSewageDataDto.getIonAbundanceRatioWithinError(), hairSewageDataDto.getWhetherCheckOut(), null)); |
|
|
|
|
hairSewageDataDto.getIonAbundanceRatioWithinError(), hairSewageDataDto.getWhetherCheckOut(), null, null, hairSewageDataDto.getQualitativeIonPairDown(), null)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return hairSewageInspectExpDataList; |
|
|
|
@ -70,7 +71,9 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor |
|
|
|
|
item.getAbundanceRatio(), |
|
|
|
|
item.getAbundanceRatioError(), |
|
|
|
|
item.getWithinError(), |
|
|
|
|
null |
|
|
|
|
item.getRetTime(), |
|
|
|
|
item.getMass(), |
|
|
|
|
null, null |
|
|
|
|
); |
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
@ -81,13 +84,16 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor |
|
|
|
|
/** |
|
|
|
|
* 根据提供的参数创建一个TestRecordSampleDataExpand对象。 |
|
|
|
|
* |
|
|
|
|
* @param testDataId 测试数据ID |
|
|
|
|
* @param isBasePeak 是否为基本峰 |
|
|
|
|
* @param peakArea 峰面积 |
|
|
|
|
* @param ionAbundanceRatio 离子丰度比 |
|
|
|
|
* @param ionAbundanceRatioError 离子丰度比误差 |
|
|
|
|
* @param testDataId 测试数据ID |
|
|
|
|
* @param isBasePeak 是否为基本峰 |
|
|
|
|
* @param peakArea 峰面积 |
|
|
|
|
* @param ionAbundanceRatio 离子丰度比 |
|
|
|
|
* @param ionAbundanceRatioError 离子丰度比误差 |
|
|
|
|
* @param ionAbundanceRatioWithinError 离子丰度比是否在误差范围内 |
|
|
|
|
* @param someOtherValue 其他值 |
|
|
|
|
* @param retTime 碎片保留时间,目前该字段仅对nps实验有用 |
|
|
|
|
* @param mass 质荷比(m/z),nps案件 |
|
|
|
|
* @param qualitativeIonPair 定性离子对,生物案件使用 |
|
|
|
|
* @param someOtherValue 其他值 |
|
|
|
|
* @return 创建的TestRecordSampleDataExpand对象 |
|
|
|
|
*/ |
|
|
|
|
private TestRecordSampleDataExpand createTestRecordSampleDataExpand( |
|
|
|
@ -97,6 +103,9 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor |
|
|
|
|
Double ionAbundanceRatio, |
|
|
|
|
Double ionAbundanceRatioError, |
|
|
|
|
String ionAbundanceRatioWithinError, |
|
|
|
|
Double retTime, |
|
|
|
|
String mass, |
|
|
|
|
String qualitativeIonPair, |
|
|
|
|
Double someOtherValue |
|
|
|
|
) { |
|
|
|
|
TestRecordSampleDataExpand testRecordSampleDataExpand = new TestRecordSampleDataExpand(); |
|
|
|
@ -117,6 +126,14 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor |
|
|
|
|
testRecordSampleDataExpand.setIonAbundanceRatioWithinError(ionAbundanceRatioWithinError); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (retTime != null) { |
|
|
|
|
testRecordSampleDataExpand.setFragmentRetTime(BigDecimal.valueOf(retTime)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(mass)) { |
|
|
|
|
testRecordSampleDataExpand.setMassToChargeRatio(new BigDecimal(mass)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 如果有其他需要设置的值,可以继续扩展
|
|
|
|
|
if (someOtherValue != null) { |
|
|
|
|
// 处理其他值的设置逻辑
|
|
|
|
|