update
This commit is contained in:
@@ -305,6 +305,28 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
return Result.OK(experiment);
|
||||
}
|
||||
|
||||
@Operation(summary = "试验管理-检查能否生成报告")
|
||||
@GetMapping(value = "/checkCanReport")
|
||||
public Result<Experiment> checkCanReport(@RequestParam(name = "id", required = true) String id) {
|
||||
Experiment experiment = experimentService.getById(id);
|
||||
if (experiment == null) {
|
||||
return Result.error("未找到试验数据!");
|
||||
}
|
||||
List<ExperimentTestProcess> experimentTestProcesses = experimentTestProcessService.getByExperimentId(experiment.getId());
|
||||
List<ExperimentRadiationProcess> radiationProcessList = experimentRadiationProcessService.getByExperimentId(experiment.getId());
|
||||
List<ExperimentAnnealProcess> experimentAnnealProcessList = experimentAnnealProcessService.getByExperimentId(experiment.getId());
|
||||
if (CollUtil.isEmpty(experimentTestProcesses)) {
|
||||
return Result.error("未填写测试过程!");
|
||||
}
|
||||
if (CollUtil.isEmpty(radiationProcessList)) {
|
||||
return Result.error("未填写辐照过程!");
|
||||
}
|
||||
if (CollUtil.isEmpty(experimentAnnealProcessList)) {
|
||||
return Result.error("未填写退火过程!");
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user