Merge remote-tracking branch 'origin/master'

master
陈江保 2 weeks ago
commit 8b2933388f
  1. 7
      dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/controller/TestRecordReagentController.java
  2. 31
      dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/service/impl/TestRecordSampleDataServiceImpl.java
  3. 7
      dlp-drugtesting-biz/src/main/resources/bootstrap.yml

@ -86,7 +86,12 @@ public class TestRecordReagentController {
@PutMapping("/useReagent") @PutMapping("/useReagent")
@ApiOperation(value = "添加或移除实验过程中的试剂耗材", notes = "testRecordId:实验ID、reagentId:试剂耗材ID、opCode:1使用,-1取消使用") @ApiOperation(value = "添加或移除实验过程中的试剂耗材", notes = "testRecordId:实验ID、reagentId:试剂耗材ID、opCode:1使用,-1取消使用")
public R useTestRecordReagent(@RequestBody TestRecordArgumentDto testRecordArgumentDto) { public R useTestRecordReagent(@RequestBody TestRecordArgumentDto testRecordArgumentDto) {
return testRecordReagentService.useTestRecordReagent(testRecordArgumentDto) ? R.ok("添加成功!") : R.failed("添加失败!"); try {
return testRecordReagentService.useTestRecordReagent(testRecordArgumentDto) ? R.ok("添加成功!") : R.failed("添加失败!");
} catch (Exception e) {
e.printStackTrace();
return R.failed(e.getMessage());
}
} }
@PutMapping("/useReagentToTemplate") @PutMapping("/useReagentToTemplate")

@ -1547,15 +1547,30 @@ public class TestRecordSampleDataServiceImpl extends ServiceImpl<TestRecordSampl
TestRecordSampleData sampleData = createSampleData(compoundName, TestRecordSampleDataConstant.SAMPLE_TYPE_ANALYTE, item.getAcceptNo(), testId, cnName); TestRecordSampleData sampleData = createSampleData(compoundName, TestRecordSampleDataConstant.SAMPLE_TYPE_ANALYTE, item.getAcceptNo(), testId, cnName);
sampleDataList.add(sampleData); sampleDataList.add(sampleData);
}); });
// 判断标准物质中是否存在对应的 drug 信息,并且相应的定性离子对和质谱离子峰是否存在
if (drug != null && StrUtil.isNotBlank(drug.getCharacteristicIons())) { if (
// 当对应的毒品信息不为空,添加扩展数据 drug == null
List<TestRecordSampleDataExpand> testRecordSampleDataExpandList = sampleDataList.stream().flatMap(sampleData -> { ||
List<TestRecordSampleDataExpand> testRecordSampleDataExpand = testRecordSampledataExpandService.saveExpDataByBusinessType(sampleData.getId(), drug, testRecord.getBusinessType()); (
return testRecordSampleDataExpand.stream(); StrUtil.isBlank(drug.getCharacteristicIons())
}).collect(Collectors.toList()); &&
testRecordSampledataExpandService.saveBatch(testRecordSampleDataExpandList); (
StrUtil.isBlank(drug.getMainProductIon())
||
StrUtil.isBlank(drug.getMinorProductIon())
)
)
) {
throw new CheckedException("标准物质中对应的毒品信息不完善!");
} }
// 当对应的毒品信息不为空,添加扩展数据
List<TestRecordSampleDataExpand> testRecordSampleDataExpandList = sampleDataList.stream().flatMap(sampleData -> {
List<TestRecordSampleDataExpand> testRecordSampleDataExpand = testRecordSampledataExpandService.saveExpDataByBusinessType(sampleData.getId(), drug, testRecord.getBusinessType());
return testRecordSampleDataExpand.stream();
}).collect(Collectors.toList());
testRecordSampledataExpandService.saveBatch(testRecordSampleDataExpandList);
super.saveBatch(sampleDataList); super.saveBatch(sampleDataList);
} }

@ -51,7 +51,7 @@ mybatis-plus:
oss: oss:
endpoint: http://dlp-minio:9000 endpoint: http://dlp-minio:9000
accessKey: dlp accessKey: admin
secretKey: 87990016 secretKey: 87990016
bucket-name: dlpfiles bucket-name: dlpfiles
# 贵阳禁毒情报平台推送数据配置 # 贵阳禁毒情报平台推送数据配置
@ -64,3 +64,8 @@ gyjd:
biology-qualitative-record: /thirdparty/report-generate/shenWuJianCaiDingXingJiLuReport/v1 biology-qualitative-record: /thirdparty/report-generate/shenWuJianCaiDingXingJiLuReport/v1
non-infrared-general-qualitative-record: /thirdparty/report-generate/puTongJianCaiDingXingJiLuFeiReport/v1 non-infrared-general-qualitative-record: /thirdparty/report-generate/puTongJianCaiDingXingJiLuFeiReport/v1
infrared-general-qualitative-record: /thirdparty/report-generate/puTongJianCaiDingXingJiLuReport/v1 infrared-general-qualitative-record: /thirdparty/report-generate/puTongJianCaiDingXingJiLuReport/v1
# 配置feign 调用时是否从redis中读取缓存
lcsoft:
feign:
cache:
enabled: false

Loading…
Cancel
Save