This commit is contained in:
ls
2025-08-06 23:29:20 +08:00
parent 93fb02eb92
commit c795636ea4

View File

@@ -171,6 +171,13 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
if (!StringUtils.startsWith(experimentNo, "KC")) { if (!StringUtils.startsWith(experimentNo, "KC")) {
return Result.error("实验编号格式不正确!"); return Result.error("实验编号格式不正确!");
} }
if (StringUtils.isBlank(experiment.getId())) {
Experiment dbExp = experimentService.getByExperimentNo(experimentNo);
if (Objects.isNull(dbExp)) {
return Result.error("实验数据不正确!");
}
experiment.setId(dbExp.getId());
}
//校验试验的基本信息 //校验试验的基本信息
String result = validateSampleInfos(experiment); String result = validateSampleInfos(experiment);
if (StringUtils.isNotBlank(result)) { if (StringUtils.isNotBlank(result)) {