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