Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -44,11 +44,15 @@ public class TestRecordReagentController {
|
||||
@PutMapping("/updateReagent")
|
||||
@ApiOperation(value = "修改实验使用试剂耗材、标准物质", notes = "")
|
||||
public R updateReagent(@RequestBody TestRecordReagent testRecordReagent) {
|
||||
TestRecordReagent ret = testRecordReagentService.updateTestRecordReagent(testRecordReagent);
|
||||
if (ret != null) {
|
||||
return R.ok(ret, "添加成功");
|
||||
} else {
|
||||
return R.failed("false", "添加失败");
|
||||
try {
|
||||
TestRecordReagent ret = testRecordReagentService.updateTestRecordReagent(testRecordReagent);
|
||||
if (ret != null) {
|
||||
return R.ok(ret, "添加成功");
|
||||
} else {
|
||||
return R.failed("false", "添加失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,4 +55,13 @@ public class TestRecordSampleDataExpand extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal fragmentRetTime;
|
||||
|
||||
/**
|
||||
* 质荷比(m/z), nps案件
|
||||
*/
|
||||
private BigDecimal massToChargeRatio;
|
||||
|
||||
/**
|
||||
* 定性离子对,生物案件使用
|
||||
*/
|
||||
private String qualitativeIonPair;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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.dto.TestRecordArgumentDto;
|
||||
import digital.laboratory.platform.inspection.entity.TestRecordReagent;
|
||||
@@ -76,10 +77,10 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
||||
|
||||
@Override
|
||||
public TestRecordReagent updateTestRecordReagent(TestRecordReagent testRecordReagent) {
|
||||
if (testRecordReagent.getSource() == 0) {
|
||||
log.info("数据是其他系统推送录入的,不能修改");
|
||||
return null;
|
||||
}
|
||||
// todo 添加了标准品成分,必填,其他系统过来的可以修改
|
||||
// if (testRecordReagent.getSource() == 0) {
|
||||
// throw new CheckedException("数据是其他系统推送录入的,不能修改");
|
||||
// }
|
||||
boolean ret = this.updateById(testRecordReagent);
|
||||
if (ret) {
|
||||
return testRecordReagent;
|
||||
@@ -123,7 +124,8 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
||||
* @return
|
||||
*/
|
||||
@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);
|
||||
TestRecordVo testRecordVo = testRecordMapper.getTestRecordMapById(testId);
|
||||
return testRecordReagentPage(page, keywords, opCode, categoryList, testRecordVo.getReagentConsumablesList());
|
||||
@@ -140,7 +142,8 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
||||
* @return
|
||||
*/
|
||||
@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);
|
||||
TestTemplateVo templateVo = testTemplateMapper.getTestTemplateMapById(templateId);
|
||||
return testRecordReagentPage(page, keywords, opCode, categoryList, templateVo.getReagentConsumables());
|
||||
@@ -156,7 +159,6 @@ public class TestRecordReagentServiceImpl extends ServiceImpl<TestRecordReagentM
|
||||
* @param reagentConsumablesList 试剂耗材ID列表,用于筛选符合条件的记录
|
||||
* @return 分页结果
|
||||
*/
|
||||
@DlpResultProc
|
||||
public IPage<TestRecordReagentVO> testRecordReagentPage(Page page, String keywords, Integer opCode, List<String> categoryList, List<String> reagentConsumablesList) {
|
||||
LambdaQueryWrapper<TestRecordReagent> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.and(StringUtils.isNotBlank(keywords), qw -> qw
|
||||
|
||||
@@ -1861,9 +1861,7 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
|
||||
.eq(TestRecordSampleData::getTestId, data.getTestId())
|
||||
.eq(TestRecordSampleData::getSampleType, "STD"));
|
||||
|
||||
if (
|
||||
data.getTargetRtTime() != null && std.getTargetRtTime() != null
|
||||
) {
|
||||
if ( data.getTargetRtTime() != null && std.getTargetRtTime() != null ) {
|
||||
TestRecord testRecord = testRecordService.getById(data.getTestId());
|
||||
if (testRecord.getBusinessType().equals(BusinessType.BOINT_CASE.getBusinessType())) {
|
||||
data.setRtTimeWithinError(
|
||||
|
||||
@@ -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) {
|
||||
// 处理其他值的设置逻辑
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<result property="ionAbundanceRatioError" column="ion_abundance_ratio_error" jdbcType="DECIMAL"/>
|
||||
<result property="ionAbundanceRatioWithinError" column="ion_abundance_ratio_within_error" jdbcType="VARCHAR"/>
|
||||
<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="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
@@ -28,6 +30,8 @@
|
||||
exp.ion_abundance_ratio_error,
|
||||
exp.fragment_ret_time
|
||||
exp.ion_abundance_ratio_within_error,
|
||||
exp.mass_to_charge_ratio,
|
||||
exp.qualitative_ion_pair,
|
||||
exp.create_by,
|
||||
exp.create_time,
|
||||
exp.update_by,
|
||||
|
||||
Reference in New Issue
Block a user