update
This commit is contained in:
@@ -270,15 +270,15 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
|
||||
List<ExperimentAnnealProcess> experimentAnnealProcess = experimentAnnealProcessService.getByExperimentId(old.getId());
|
||||
if (CollUtil.isNotEmpty(experimentAnnealProcess)) {
|
||||
experimentAnnealProcess.forEach(v -> experimentAnnealProcessService.copy(old.getId(),copied.getId()));
|
||||
experimentAnnealProcess.forEach(v -> experimentAnnealProcessService.copy(v.getId(),copied.getId()));
|
||||
}
|
||||
List<ExperimentRadiationProcess> experimentRadiationProcess = experimentRadiationProcessService.getByExperimentId(old.getId());
|
||||
if (CollUtil.isNotEmpty(experimentRadiationProcess)) {
|
||||
experimentRadiationProcess.forEach(v -> experimentRadiationProcessService.copy(old.getId(),copied.getId()));
|
||||
experimentRadiationProcess.forEach(v -> experimentRadiationProcessService.copy(v.getId(),copied.getId()));
|
||||
}
|
||||
List<ExperimentTestProcess> experimentTestProcess = experimentTestProcessService.getByExperimentId(old.getId());
|
||||
if (CollUtil.isNotEmpty(experimentTestProcess)) {
|
||||
experimentTestProcess.forEach(v -> experimentTestProcessService.copy(old.getId(),copied.getId()));
|
||||
experimentTestProcess.forEach(v -> experimentTestProcessService.copy(v.getId(),copied.getId()));
|
||||
}
|
||||
return Result.OK("复制成功!");
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ public interface IExperimentAnnealProcessService extends IService<ExperimentAnne
|
||||
|
||||
void saveWithDetails(ExperimentAnnealProcess experimentAnnealProcess);
|
||||
|
||||
void copy(String oldExperimentId,String newExperimentId);
|
||||
void copy(String oldId,String newExperimentId);
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ public interface IExperimentRadiationProcessService extends IService<ExperimentR
|
||||
|
||||
void saveWithDetails(ExperimentRadiationProcess experimentRadiationProcess);
|
||||
|
||||
void copy(String oldExperimentId,String newExperimentId);
|
||||
void copy(String oldId, String newExperimentId);
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ public interface IExperimentTestProcessService extends IService<ExperimentTestPr
|
||||
|
||||
void saveWithDetails(ExperimentTestProcess experimentTestProcess);
|
||||
|
||||
void copy(String oldExperimentId,String newExperimentId);
|
||||
void copy(String oldId,String newExperimentId);
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ public class ExperimentAnnealProcessServiceImpl extends ServiceImpl<ExperimentAn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copy(String oldExperimentId,String newExperimentId){
|
||||
public void copy(String oldId,String newExperimentId){
|
||||
ExperimentAnnealProcess experiment = new ExperimentAnnealProcess();
|
||||
BeanUtil.copyProperties(getByExperimentId(oldExperimentId), experiment);
|
||||
BeanUtil.copyProperties(getById(oldId), experiment);
|
||||
experiment.setId(null);
|
||||
experiment.setExperimentId(newExperimentId);
|
||||
experiment.setAnnealStartTime(null);
|
||||
|
||||
@@ -107,9 +107,9 @@ public class ExperimentRadiationProcessServiceImpl extends ServiceImpl<Experimen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copy(String oldExperimentId,String newExperimentId) {
|
||||
public void copy(String oldId,String newExperimentId) {
|
||||
ExperimentRadiationProcess experiment = new ExperimentRadiationProcess();
|
||||
BeanUtil.copyProperties(getByExperimentId(oldExperimentId), experiment);
|
||||
BeanUtil.copyProperties(getById(oldId), experiment);
|
||||
experiment.setId(null);
|
||||
experiment.setExperimentId(newExperimentId);
|
||||
experiment.setRadiationStartTime(null);
|
||||
|
||||
@@ -78,9 +78,9 @@ public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTest
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copy(String oldExperimentId, String newExperimentId) {
|
||||
public void copy(String oldId, String newExperimentId) {
|
||||
ExperimentTestProcess experiment = new ExperimentTestProcess();
|
||||
BeanUtil.copyProperties(getByExperimentId(oldExperimentId), experiment);
|
||||
BeanUtil.copyProperties(getById(oldId), experiment);
|
||||
experiment.setExperimentId(newExperimentId);
|
||||
experiment.setId(null);
|
||||
experiment.setTestStartTime(null);
|
||||
|
||||
Reference in New Issue
Block a user