20250318 更新
This commit is contained in:
@@ -1154,7 +1154,7 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
|
||||
*/
|
||||
private void calculateHairCaseIonAbundanceRatioWithinError(HairSewageDataDto hairSewageDataDto, HairSewageDataDto hairSewageDataDtoStd) {
|
||||
if (hairSewageDataDto.getIonAbundanceRatio() != -999) {
|
||||
double ionAbundanceRatioWithinError = getHairCaseIonAbundanceRatioWithinError(hairSewageDataDto, hairSewageDataDtoStd);
|
||||
double ionAbundanceRatioWithinError = getHairCaseIonAbundanceRatioWithinError(hairSewageDataDto.getIonAbundanceRatio(), hairSewageDataDtoStd.getIonAbundanceRatio());
|
||||
hairSewageDataDto.setIonAbundanceRatioWithinError(ionAbundanceRatioWithinError);
|
||||
double stdIonAbundanceRatio = hairSewageDataDtoStd.getIonAbundanceRatio();
|
||||
// 判断是否在离子丰度比允许的最大偏差范围
|
||||
@@ -1195,12 +1195,12 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
|
||||
/**
|
||||
* 计算离子丰度比相对误差
|
||||
*
|
||||
* @param hairSewageDataDto
|
||||
* @param hairSewageDataDtoStd
|
||||
* @param ionAbundanceRatio 目标物的离子丰度比
|
||||
* @param stdIonAbundanceRatio 标准物质的离子丰度比
|
||||
* @return
|
||||
*/
|
||||
private double getHairCaseIonAbundanceRatioWithinError(HairSewageDataDto hairSewageDataDto, HairSewageDataDto hairSewageDataDtoStd) {
|
||||
return (hairSewageDataDto.getIonAbundanceRatio() - hairSewageDataDtoStd.getIonAbundanceRatio()) / hairSewageDataDtoStd.getIonAbundanceRatio() * 100;
|
||||
private double getHairCaseIonAbundanceRatioWithinError(double ionAbundanceRatio, double stdIonAbundanceRatio) {
|
||||
return (ionAbundanceRatio - stdIonAbundanceRatio) / stdIonAbundanceRatio * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1230,10 +1230,10 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
|
||||
private void calculateHairCaseRtTimeError(HairSewageDataDto hairSewageDataDto, HairSewageDataDto hairSewageDataDtoStd) {
|
||||
if (hairSewageDataDto.getTargetRtTime() != -999) {
|
||||
// 计算保留时间的相对误差
|
||||
double rtTimeError = getHairCaseRtTimeError(hairSewageDataDto, hairSewageDataDtoStd);
|
||||
double rtTimeError = getHairCaseRtTimeError(hairSewageDataDto.getTargetRtTime(), hairSewageDataDtoStd.getStdRtTime());
|
||||
hairSewageDataDto.setRtTimeError(rtTimeError);
|
||||
// 判断保留时间相对误差是否符合误差范围
|
||||
setHairCaseRtTimeWithinError(hairSewageDataDto);
|
||||
hairSewageDataDto.setRtTimeWithinError(setHairCaseRtTimeWithinError(hairSewageDataDto.getRtTimeError()));
|
||||
} else {
|
||||
hairSewageDataDto.setRtTimeError(-999);
|
||||
hairSewageDataDto.setRtTimeWithinError("/");
|
||||
@@ -1243,25 +1243,25 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
|
||||
/**
|
||||
* 计算保留时间的相对误差
|
||||
*
|
||||
* @param hairSewageDataDto 目标物信息
|
||||
* @param hairSewageDataDtoStd 标准物信息
|
||||
* @param targetRtTime 目标物保留时间信息
|
||||
* @param stdRtTime 标准物保留时间信息
|
||||
* @return
|
||||
*/
|
||||
private double getHairCaseRtTimeError(HairSewageDataDto hairSewageDataDto, HairSewageDataDto hairSewageDataDtoStd) {
|
||||
return (hairSewageDataDto.getTargetRtTime() - hairSewageDataDtoStd.getStdRtTime()) / hairSewageDataDtoStd.getStdRtTime() * 100;
|
||||
private double getHairCaseRtTimeError(double targetRtTime, double stdRtTime) {
|
||||
return (targetRtTime - stdRtTime) / stdRtTime * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断保留时间相对误差是否符合误差范围
|
||||
*
|
||||
* @param hairSewageDataDto
|
||||
* @param rtTimeError
|
||||
*/
|
||||
private void setHairCaseRtTimeWithinError(HairSewageDataDto hairSewageDataDto) {
|
||||
if (hairSewageDataDto.getRtTimeError() > TestRecordSampleDataConstant.HAIR_CASE_NEGATIVE_RT_ERROR
|
||||
&& hairSewageDataDto.getRtTimeError() < TestRecordSampleDataConstant.HAIR_CASE_POSITIVE_RT_ERROR) {
|
||||
hairSewageDataDto.setRtTimeWithinError(TestRecordSampleDataConstant.IS);
|
||||
private String setHairCaseRtTimeWithinError(double rtTimeError) {
|
||||
if (rtTimeError > TestRecordSampleDataConstant.HAIR_CASE_NEGATIVE_RT_ERROR
|
||||
&& rtTimeError < TestRecordSampleDataConstant.HAIR_CASE_POSITIVE_RT_ERROR) {
|
||||
return TestRecordSampleDataConstant.IS;
|
||||
} else {
|
||||
hairSewageDataDto.setRtTimeWithinError(TestRecordSampleDataConstant.NO);
|
||||
return TestRecordSampleDataConstant.NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1334,7 +1334,7 @@ public class TestRecordServiceImpl extends ServiceImpl<TestRecordMapper, TestRec
|
||||
Map<String, String> resultData = new HashMap<>();
|
||||
resultData.put("fileName", fileName);
|
||||
resultData.put("path", commonPath);
|
||||
return R.failed(resultData, "上传实验图谱删除失败");
|
||||
return R.failed(resultData, "上传实验图谱失败");
|
||||
}
|
||||
if (testAtlas.size() > 0) {
|
||||
// 删除之前上传的
|
||||
@@ -1756,7 +1756,7 @@ public class TestRecordServiceImpl extends ServiceImpl<TestRecordMapper, TestRec
|
||||
// 封装数据到map中
|
||||
Map<String, Object> docMap = buildCommonInspectRecordDocMap(entrustInfo, testRecord);
|
||||
|
||||
return null;
|
||||
return docMap;
|
||||
}
|
||||
|
||||
|
||||
@@ -1783,6 +1783,9 @@ public class TestRecordServiceImpl extends ServiceImpl<TestRecordMapper, TestRec
|
||||
data.put("inspectMonth", testRecord.getTestStartDate().getMonthValue());
|
||||
data.put("inspectDay", testRecord.getTestStartDate().getDayOfMonth());
|
||||
|
||||
// 检材性状描述和检验要求成分
|
||||
// buildMaterialCharacterDesc()
|
||||
|
||||
// 设置使用的标准物质和试剂
|
||||
List<TestRecordReagent> references = testRecordReagentService.list(Wrappers.<TestRecordReagent>lambdaQuery()
|
||||
.in(TestRecordReagent::getId, testRecord.getReagentConsumablesList())
|
||||
|
||||
Reference in New Issue
Block a user