Experiment edit
This commit is contained in:
@@ -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.QueryRuleEnum;
|
||||
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.util.Assert;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -35,7 +35,13 @@ import java.util.*;
|
||||
@Slf4j
|
||||
public class ExperimentSampleInfoController extends JeecgController<ExperimentSampleInfo, IExperimentSampleInfoService> {
|
||||
@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")
|
||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
experimentSampleInfoService.removeById(id);
|
||||
experimentDeviationEquipmentService.removeBySampleId(id);
|
||||
experimentDeviationConditionService.removeBySampleId(id);
|
||||
experimentIrradiationBoardService.removeBySampleId(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
|
||||
@@ -26,12 +26,6 @@ public class ExperimentSampleInfoServiceImpl extends ServiceImpl<ExperimentSampl
|
||||
implements IExperimentSampleInfoService {
|
||||
@Autowired
|
||||
private IClientService clientService;
|
||||
@Autowired
|
||||
private IExperimentDeviationEquipmentService experimentDeviationEquipmentService;
|
||||
@Autowired
|
||||
private IExperimentDeviationConditionService experimentDeviationConditionService;
|
||||
@Autowired
|
||||
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
|
||||
|
||||
@Override
|
||||
public ExperimentSampleInfo getById(Serializable id) {
|
||||
@@ -40,14 +34,7 @@ public class ExperimentSampleInfoServiceImpl extends ServiceImpl<ExperimentSampl
|
||||
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) {
|
||||
if (ObjUtil.isNull(sampleInfo)) {
|
||||
|
||||
Reference in New Issue
Block a user