This commit is contained in:
ls
2025-01-22 23:05:08 +08:00
parent 9dfcab88be
commit fe6ceb0db0

View File

@@ -139,9 +139,10 @@ 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.isNotBlank(experiment.getId())) { if (StringUtils.isNotBlank(experiment.getId())) {
Experiment dbExp = experimentService.getById(experiment.getId()); Experiment dbExp = experimentService.getById(experiment.getId());
if (!StringUtils.equals(dbExp.getStatus(), ExperimentStatus.STAGING)) { if (!StringUtils.equals(dbExp.getStatus(), ExperimentStatus.STAGING)
|| !StringUtils.equals(dbExp.getStatus(), ExperimentStatus.PRE_TEST)) {
return Result.error("实验状态不正确!"); return Result.error("实验状态不正确!");
} }
} }