Experiment edit

This commit is contained in:
ls
2025-07-09 15:49:35 +08:00
parent e795867f78
commit 6561996f16
2 changed files with 12 additions and 16 deletions

View File

@@ -15,7 +15,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.modules.database.entity.ExperimentSampleInfo; import org.jeecg.modules.database.entity.ExperimentSampleInfo;
import org.jeecg.modules.database.service.IExperimentSampleInfoService; import org.jeecg.modules.database.service.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -35,7 +35,13 @@ import java.util.*;
@Slf4j @Slf4j
public class ExperimentSampleInfoController extends JeecgController<ExperimentSampleInfo, IExperimentSampleInfoService> { public class ExperimentSampleInfoController extends JeecgController<ExperimentSampleInfo, IExperimentSampleInfoService> {
@Autowired @Autowired
private IExperimentSampleInfoService experimentSampleInfoService; private IExperimentSampleInfoService experimentSampleInfoService;
@Autowired
private IExperimentDeviationEquipmentService experimentDeviationEquipmentService;
@Autowired
private IExperimentDeviationConditionService experimentDeviationConditionService;
@Autowired
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
/** /**
* 分页列表查询 * 分页列表查询
@@ -138,6 +144,9 @@ public class ExperimentSampleInfoController extends JeecgController<ExperimentSa
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
experimentSampleInfoService.removeById(id); experimentSampleInfoService.removeById(id);
experimentDeviationEquipmentService.removeBySampleId(id);
experimentDeviationConditionService.removeBySampleId(id);
experimentIrradiationBoardService.removeBySampleId(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }

View File

@@ -26,12 +26,6 @@ public class ExperimentSampleInfoServiceImpl extends ServiceImpl<ExperimentSampl
implements IExperimentSampleInfoService { implements IExperimentSampleInfoService {
@Autowired @Autowired
private IClientService clientService; private IClientService clientService;
@Autowired
private IExperimentDeviationEquipmentService experimentDeviationEquipmentService;
@Autowired
private IExperimentDeviationConditionService experimentDeviationConditionService;
@Autowired
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
@Override @Override
public ExperimentSampleInfo getById(Serializable id) { public ExperimentSampleInfo getById(Serializable id) {
@@ -40,14 +34,7 @@ public class ExperimentSampleInfoServiceImpl extends ServiceImpl<ExperimentSampl
return byId; return byId;
} }
@Override
public boolean removeById(Serializable id) {
super.removeById(id);
experimentDeviationEquipmentService.removeBySampleId(id);
experimentDeviationConditionService.removeBySampleId(id);
experimentIrradiationBoardService.removeBySampleId(id);
return true;
}
private void assembleDetails(ExperimentSampleInfo sampleInfo) { private void assembleDetails(ExperimentSampleInfo sampleInfo) {
if (ObjUtil.isNull(sampleInfo)) { if (ObjUtil.isNull(sampleInfo)) {