|
@@ -1,4 +1,4 @@
|
|
|
-package com.github.jfcloud.gene.sample.service.impl;
|
|
|
+package com.github.jfcloud.gene.sample.service.biz;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
@@ -70,12 +70,26 @@ public class SamplePathologicalServiceImpl extends ServiceImpl<SamplePathologica
|
|
|
SamplePathological samplePathological = BeanUtil.copyProperties(pathological, SamplePathological.class);
|
|
|
samplePathological.setId(CustomIdGenerator.nextId());
|
|
|
samplePathological.setSampleId(sampleId);
|
|
|
+ //清空预实验相关的参数
|
|
|
+ if (!pathological.getPreExperiment()) {
|
|
|
+ samplePathological.setPreDate("")
|
|
|
+ .setPrePeople("")
|
|
|
+ .setPreSubjectName("")
|
|
|
+ .setPreApplicantId(null)
|
|
|
+ .setPreApplicantName("")
|
|
|
+ .setPreApplicantLeaderId(null)
|
|
|
+ .setPreApplicantLeaderName("")
|
|
|
+ .setPreContent("")
|
|
|
+ .setPreConclusion("");
|
|
|
+ }
|
|
|
samplePathological.insert();
|
|
|
|
|
|
//保存预实验列表
|
|
|
- List<PathologicalPreExperiment> preExperiments = BeanUtil.copyToList(pathological.getExperiments(), PathologicalPreExperiment.class);
|
|
|
- preExperiments.forEach(item -> item.setPathologicalId(samplePathological.getId()));
|
|
|
- preExperimentService.saveBatch(preExperiments);
|
|
|
+ if (pathological.getPreExperiment()) {
|
|
|
+ List<PathologicalPreExperiment> preExperiments = BeanUtil.copyToList(pathological.getExperiments(), PathologicalPreExperiment.class);
|
|
|
+ preExperiments.forEach(item -> item.setPathologicalId(samplePathological.getId()));
|
|
|
+ preExperimentService.saveBatch(preExperiments);
|
|
|
+ }
|
|
|
|
|
|
//保存附件列表
|
|
|
List<FileInfo> fileInfos = new ArrayList<>();
|