|
@@ -179,28 +179,20 @@ public class FlowInfoServiceImpl extends ServiceImpl<FlowInfoMapper, FlowInfo> i
|
|
|
Assert.notNull(flowInfo, "基因定制流程不存在");
|
|
|
BeanUtil.copyProperties(vo, flowInfo);
|
|
|
|
|
|
- StringBuilder target = new StringBuilder();
|
|
|
- if (vo.getCustom() == null) {
|
|
|
- customInfoService.remove(new LambdaQueryWrapper<>(StrainCustomInfo.class).eq(StrainCustomInfo::getFlowId, id));
|
|
|
- } else {
|
|
|
+ if (vo.getTarget().contains(GeneTargetEnum.CUSTOM.getCode())) {
|
|
|
vo.getCustom().setFlowId(id);
|
|
|
customInfoService.updateForm(vo.getCustom());
|
|
|
- target.append(GeneTargetEnum.CUSTOM);
|
|
|
+ } else {
|
|
|
+ customInfoService.remove(new LambdaQueryWrapper<>(StrainCustomInfo.class).eq(StrainCustomInfo::getFlowId, id));
|
|
|
}
|
|
|
|
|
|
- if (vo.getPurification() == null) {
|
|
|
- purificationInfoService.remove(new LambdaQueryWrapper<>(StrainPurificationInfo.class).eq(StrainPurificationInfo::getFlowId, id));
|
|
|
- } else {
|
|
|
+ if (vo.getTarget().contains(GeneTargetEnum.PURIFICATION.getCode())) {
|
|
|
vo.getPurification().setFlowId(id);
|
|
|
purificationInfoService.updateForm(vo.getPurification());
|
|
|
-
|
|
|
- if (target.length() > 0) {
|
|
|
- target.append(",");
|
|
|
- }
|
|
|
- target.append(GeneTargetEnum.PURIFICATION);
|
|
|
+ } else {
|
|
|
+ purificationInfoService.remove(new LambdaQueryWrapper<>(StrainPurificationInfo.class).eq(StrainPurificationInfo::getFlowId, id));
|
|
|
}
|
|
|
|
|
|
- flowInfo.setTarget(target.toString());
|
|
|
flowInfo.updateById();
|
|
|
|
|
|
geneWord(flowInfo.getId());
|