20250319 更新
1.补充字段
This commit is contained in:
+9
-5
@@ -44,11 +44,15 @@ public class TestRecordReagentController {
|
|||||||
@PutMapping("/updateReagent")
|
@PutMapping("/updateReagent")
|
||||||
@ApiOperation(value = "修改实验使用试剂耗材、标准物质", notes = "")
|
@ApiOperation(value = "修改实验使用试剂耗材、标准物质", notes = "")
|
||||||
public R updateReagent(@RequestBody TestRecordReagent testRecordReagent) {
|
public R updateReagent(@RequestBody TestRecordReagent testRecordReagent) {
|
||||||
TestRecordReagent ret = testRecordReagentService.updateTestRecordReagent(testRecordReagent);
|
try {
|
||||||
if (ret != null) {
|
TestRecordReagent ret = testRecordReagentService.updateTestRecordReagent(testRecordReagent);
|
||||||
return R.ok(ret, "添加成功");
|
if (ret != null) {
|
||||||
} else {
|
return R.ok(ret, "添加成功");
|
||||||
return R.failed("false", "添加失败");
|
} else {
|
||||||
|
return R.failed("false", "添加失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return R.failed(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
@@ -55,4 +55,13 @@ public class TestRecordSampleDataExpand extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal fragmentRetTime;
|
private BigDecimal fragmentRetTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质荷比(m/z), nps案件
|
||||||
|
*/
|
||||||
|
private BigDecimal massToChargeRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定性离子对,生物案件使用
|
||||||
|
*/
|
||||||
|
private String qualitativeIonPair;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-7
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import digital.laboratory.platform.common.aop.annotation.DlpResultProc;
|
import digital.laboratory.platform.common.aop.annotation.DlpResultProc;
|
||||||
|
import digital.laboratory.platform.common.core.exception.CheckedException;
|
||||||
import digital.laboratory.platform.inspection.convert.TestRecordReagentConvert;
|
import digital.laboratory.platform.inspection.convert.TestRecordReagentConvert;
|
||||||
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto;
|
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto;
|
||||||
import digital.laboratory.platform.inspection.entity.TestRecordReagent;
|
import digital.laboratory.platform.inspection.entity.TestRecordReagent;
|
||||||
@@ -76,10 +77,10 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TestRecordReagent updateTestRecordReagent(TestRecordReagent testRecordReagent) {
|
public TestRecordReagent updateTestRecordReagent(TestRecordReagent testRecordReagent) {
|
||||||
if (testRecordReagent.getSource() == 0) {
|
// todo 添加了标准品成分,必填,其他系统过来的可以修改
|
||||||
log.info("数据是其他系统推送录入的,不能修改");
|
// if (testRecordReagent.getSource() == 0) {
|
||||||
return null;
|
// throw new CheckedException("数据是其他系统推送录入的,不能修改");
|
||||||
}
|
// }
|
||||||
boolean ret = this.updateById(testRecordReagent);
|
boolean ret = this.updateById(testRecordReagent);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
return testRecordReagent;
|
return testRecordReagent;
|
||||||
@@ -123,7 +124,8 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IPage getTestRecordReagentPageList(Page page, String testId, String keywords, String category, Integer opCode) {
|
@DlpResultProc
|
||||||
|
public IPage<TestRecordReagentVO> getTestRecordReagentPageList(Page page, String testId, String keywords, String category, Integer opCode) {
|
||||||
List<String> categoryList = getCategoryList(category);
|
List<String> categoryList = getCategoryList(category);
|
||||||
TestRecordVo testRecordVo = testRecordMapper.getTestRecordMapById(testId);
|
TestRecordVo testRecordVo = testRecordMapper.getTestRecordMapById(testId);
|
||||||
return testRecordReagentPage(page, keywords, opCode, categoryList, testRecordVo.getReagentConsumablesList());
|
return testRecordReagentPage(page, keywords, opCode, categoryList, testRecordVo.getReagentConsumablesList());
|
||||||
@@ -140,7 +142,8 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IPage getTestTemplateReagentPageList(Page page, String templateId, String keywords, String category, Integer opCode) {
|
@DlpResultProc
|
||||||
|
public IPage<TestRecordReagentVO> getTestTemplateReagentPageList(Page page, String templateId, String keywords, String category, Integer opCode) {
|
||||||
List<String> categoryList = getCategoryList(category);
|
List<String> categoryList = getCategoryList(category);
|
||||||
TestTemplateVo templateVo = testTemplateMapper.getTestTemplateMapById(templateId);
|
TestTemplateVo templateVo = testTemplateMapper.getTestTemplateMapById(templateId);
|
||||||
return testRecordReagentPage(page, keywords, opCode, categoryList, templateVo.getReagentConsumables());
|
return testRecordReagentPage(page, keywords, opCode, categoryList, templateVo.getReagentConsumables());
|
||||||
@@ -156,7 +159,6 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
|||||||
* @param reagentConsumablesList 试剂耗材ID列表,用于筛选符合条件的记录
|
* @param reagentConsumablesList 试剂耗材ID列表,用于筛选符合条件的记录
|
||||||
* @return 分页结果
|
* @return 分页结果
|
||||||
*/
|
*/
|
||||||
@DlpResultProc
|
|
||||||
public IPage<TestRecordReagentVO> testRecordReagentPage(Page page, String keywords, Integer opCode, List<String> categoryList, List<String> reagentConsumablesList) {
|
public IPage<TestRecordReagentVO> testRecordReagentPage(Page page, String keywords, Integer opCode, List<String> categoryList, List<String> reagentConsumablesList) {
|
||||||
LambdaQueryWrapper<TestRecordReagent> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<TestRecordReagent> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.and(StringUtils.isNotBlank(keywords), qw -> qw
|
queryWrapper.and(StringUtils.isNotBlank(keywords), qw -> qw
|
||||||
|
|||||||
+1
-3
@@ -1861,9 +1861,7 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
|
|||||||
.eq(TestRecordSampleData::getTestId, data.getTestId())
|
.eq(TestRecordSampleData::getTestId, data.getTestId())
|
||||||
.eq(TestRecordSampleData::getSampleType, "STD"));
|
.eq(TestRecordSampleData::getSampleType, "STD"));
|
||||||
|
|
||||||
if (
|
if ( data.getTargetRtTime() != null && std.getTargetRtTime() != null ) {
|
||||||
data.getTargetRtTime() != null && std.getTargetRtTime() != null
|
|
||||||
) {
|
|
||||||
TestRecord testRecord = testRecordService.getById(data.getTestId());
|
TestRecord testRecord = testRecordService.getById(data.getTestId());
|
||||||
if (testRecord.getBusinessType().equals(BusinessType.BOINT_CASE.getBusinessType())) {
|
if (testRecord.getBusinessType().equals(BusinessType.BOINT_CASE.getBusinessType())) {
|
||||||
data.setRtTimeWithinError(
|
data.setRtTimeWithinError(
|
||||||
|
|||||||
+26
-9
@@ -1,5 +1,6 @@
|
|||||||
package digital.laboratory.platform.inspection.service.impl;
|
package digital.laboratory.platform.inspection.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import digital.laboratory.platform.inspection.constant.TestRecordSampleDataConstant;
|
import digital.laboratory.platform.inspection.constant.TestRecordSampleDataConstant;
|
||||||
@@ -38,13 +39,13 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor
|
|||||||
// 设置基峰的扩展数据
|
// 设置基峰的扩展数据
|
||||||
if (!TestRecordSampleDataConstant.isInvalidValue(hairSewageDataDto.getPeakAreaUp())) {
|
if (!TestRecordSampleDataConstant.isInvalidValue(hairSewageDataDto.getPeakAreaUp())) {
|
||||||
hairSewageInspectExpDataList.add(createTestRecordSampleDataExpand(testDataId, Boolean.TRUE,
|
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())) {
|
if (!TestRecordSampleDataConstant.isInvalidValue(hairSewageDataDto.getPeakAreaDown())) {
|
||||||
hairSewageInspectExpDataList.add(createTestRecordSampleDataExpand(testDataId, Boolean.FALSE,
|
hairSewageInspectExpDataList.add(createTestRecordSampleDataExpand(testDataId, Boolean.FALSE,
|
||||||
hairSewageDataDto.getPeakAreaDown(), hairSewageDataDto.getIonAbundanceRatio(),
|
hairSewageDataDto.getPeakAreaDown(), hairSewageDataDto.getIonAbundanceRatio(),
|
||||||
hairSewageDataDto.getIonAbundanceRatioWithinError(), hairSewageDataDto.getWhetherCheckOut(), null));
|
hairSewageDataDto.getIonAbundanceRatioWithinError(), hairSewageDataDto.getWhetherCheckOut(), null, null, hairSewageDataDto.getQualitativeIonPairDown(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
return hairSewageInspectExpDataList;
|
return hairSewageInspectExpDataList;
|
||||||
@@ -70,7 +71,9 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor
|
|||||||
item.getAbundanceRatio(),
|
item.getAbundanceRatio(),
|
||||||
item.getAbundanceRatioError(),
|
item.getAbundanceRatioError(),
|
||||||
item.getWithinError(),
|
item.getWithinError(),
|
||||||
null
|
item.getRetTime(),
|
||||||
|
item.getMass(),
|
||||||
|
null, null
|
||||||
);
|
);
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
@@ -81,13 +84,16 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor
|
|||||||
/**
|
/**
|
||||||
* 根据提供的参数创建一个TestRecordSampleDataExpand对象。
|
* 根据提供的参数创建一个TestRecordSampleDataExpand对象。
|
||||||
*
|
*
|
||||||
* @param testDataId 测试数据ID
|
* @param testDataId 测试数据ID
|
||||||
* @param isBasePeak 是否为基本峰
|
* @param isBasePeak 是否为基本峰
|
||||||
* @param peakArea 峰面积
|
* @param peakArea 峰面积
|
||||||
* @param ionAbundanceRatio 离子丰度比
|
* @param ionAbundanceRatio 离子丰度比
|
||||||
* @param ionAbundanceRatioError 离子丰度比误差
|
* @param ionAbundanceRatioError 离子丰度比误差
|
||||||
* @param ionAbundanceRatioWithinError 离子丰度比是否在误差范围内
|
* @param ionAbundanceRatioWithinError 离子丰度比是否在误差范围内
|
||||||
* @param someOtherValue 其他值
|
* @param retTime 碎片保留时间,目前该字段仅对nps实验有用
|
||||||
|
* @param mass 质荷比(m/z),nps案件
|
||||||
|
* @param qualitativeIonPair 定性离子对,生物案件使用
|
||||||
|
* @param someOtherValue 其他值
|
||||||
* @return 创建的TestRecordSampleDataExpand对象
|
* @return 创建的TestRecordSampleDataExpand对象
|
||||||
*/
|
*/
|
||||||
private TestRecordSampleDataExpand createTestRecordSampleDataExpand(
|
private TestRecordSampleDataExpand createTestRecordSampleDataExpand(
|
||||||
@@ -97,6 +103,9 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor
|
|||||||
Double ionAbundanceRatio,
|
Double ionAbundanceRatio,
|
||||||
Double ionAbundanceRatioError,
|
Double ionAbundanceRatioError,
|
||||||
String ionAbundanceRatioWithinError,
|
String ionAbundanceRatioWithinError,
|
||||||
|
Double retTime,
|
||||||
|
String mass,
|
||||||
|
String qualitativeIonPair,
|
||||||
Double someOtherValue
|
Double someOtherValue
|
||||||
) {
|
) {
|
||||||
TestRecordSampleDataExpand testRecordSampleDataExpand = new TestRecordSampleDataExpand();
|
TestRecordSampleDataExpand testRecordSampleDataExpand = new TestRecordSampleDataExpand();
|
||||||
@@ -117,6 +126,14 @@ public class TestRecordSampledataExpandServiceImpl extends ServiceImpl<TestRecor
|
|||||||
testRecordSampleDataExpand.setIonAbundanceRatioWithinError(ionAbundanceRatioWithinError);
|
testRecordSampleDataExpand.setIonAbundanceRatioWithinError(ionAbundanceRatioWithinError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (retTime != null) {
|
||||||
|
testRecordSampleDataExpand.setFragmentRetTime(BigDecimal.valueOf(retTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(mass)) {
|
||||||
|
testRecordSampleDataExpand.setMassToChargeRatio(new BigDecimal(mass));
|
||||||
|
}
|
||||||
|
|
||||||
// 如果有其他需要设置的值,可以继续扩展
|
// 如果有其他需要设置的值,可以继续扩展
|
||||||
if (someOtherValue != null) {
|
if (someOtherValue != null) {
|
||||||
// 处理其他值的设置逻辑
|
// 处理其他值的设置逻辑
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
<result property="ionAbundanceRatioError" column="ion_abundance_ratio_error" jdbcType="DECIMAL"/>
|
<result property="ionAbundanceRatioError" column="ion_abundance_ratio_error" jdbcType="DECIMAL"/>
|
||||||
<result property="ionAbundanceRatioWithinError" column="ion_abundance_ratio_within_error" jdbcType="VARCHAR"/>
|
<result property="ionAbundanceRatioWithinError" column="ion_abundance_ratio_within_error" jdbcType="VARCHAR"/>
|
||||||
<result property="fragmentRetTime" column="fragment_ret_time" jdbcType="DECIMAL"/>
|
<result property="fragmentRetTime" column="fragment_ret_time" jdbcType="DECIMAL"/>
|
||||||
|
<result property="massToChargeRatio" column="mass_to_charge_ratio" jdbcType="DECIMAL"/>
|
||||||
|
<result property="qualitativeIonPair" column="qualitative_ion_pair" jdbcType="VARCHAR"/>
|
||||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||||
@@ -28,6 +30,8 @@
|
|||||||
exp.ion_abundance_ratio_error,
|
exp.ion_abundance_ratio_error,
|
||||||
exp.fragment_ret_time
|
exp.fragment_ret_time
|
||||||
exp.ion_abundance_ratio_within_error,
|
exp.ion_abundance_ratio_within_error,
|
||||||
|
exp.mass_to_charge_ratio,
|
||||||
|
exp.qualitative_ion_pair,
|
||||||
exp.create_by,
|
exp.create_by,
|
||||||
exp.create_time,
|
exp.create_time,
|
||||||
exp.update_by,
|
exp.update_by,
|
||||||
|
|||||||
Reference in New Issue
Block a user