update
This commit is contained in:
2491
nasa_data_record.sql
Normal file
2491
nasa_data_record.sql
Normal file
File diff suppressed because it is too large
Load Diff
15954
physical-boot.sql
Normal file
15954
physical-boot.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -270,9 +270,9 @@ logging:
|
||||
#swagger
|
||||
knife4j:
|
||||
#开启增强配置
|
||||
enable: true
|
||||
enable: false
|
||||
#开启生产环境屏蔽
|
||||
production: false
|
||||
production: true
|
||||
basic:
|
||||
enable: false
|
||||
username: jeecg
|
||||
|
||||
@@ -260,12 +260,8 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
@PostMapping(value = "/copy")
|
||||
public Result<String> copy(@RequestParam(name = "id", required = true) String id) {
|
||||
Experiment old = experimentService.getById(id);
|
||||
old.addCopyCount();
|
||||
experimentService.updateById(old);
|
||||
|
||||
Experiment copied = old.copy();
|
||||
copied.setExperimentNo(experimentSequenceService.next());
|
||||
experimentService.save(copied);
|
||||
experimentService.fetchExperimentDetail(old);
|
||||
Experiment copied = experimentService.copy(old);
|
||||
|
||||
List<ExperimentAnnealProcess> experimentAnnealProcess = experimentAnnealProcessService.getByExperimentId(old.getId());
|
||||
if (CollUtil.isNotEmpty(experimentAnnealProcess)) {
|
||||
|
||||
@@ -193,43 +193,13 @@ public class Experiment implements Serializable {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentUser> experimentUserList;
|
||||
//
|
||||
//public void addCopyCount() {
|
||||
// if (Objects.isNull(copyCount)) {
|
||||
// setCopyCount(1);
|
||||
// }
|
||||
// setCopyCount(copyCount + 1);
|
||||
//}
|
||||
|
||||
public void addCopyCount() {
|
||||
if (Objects.isNull(copyCount)) {
|
||||
setCopyCount(1);
|
||||
}
|
||||
setCopyCount(copyCount + 1);
|
||||
}
|
||||
|
||||
public Experiment copy() {
|
||||
Experiment experiment = new Experiment();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
String irradiationBoard = this.getIrradiationBoard();
|
||||
//[{"key":"1","sampleModel":"88h21","irradiationBoardNumber":"20","irradiationBoardCode":"293",
|
||||
// "measurementValidity":"2024-11-09","sourceArea":"20"}]
|
||||
if (StringUtils.isNotBlank(irradiationBoard)) {
|
||||
List<JSONObject> boardList = JSON.parseArray(irradiationBoard, JSONObject.class);
|
||||
boardList.forEach(board -> {
|
||||
board.put("measurementValidity", null);
|
||||
board.put("sourceArea", null);
|
||||
});
|
||||
experiment.setIrradiationBoard(JSON.toJSONString(boardList));
|
||||
}
|
||||
String deviationEquipment = this.getDeviationEquipment();
|
||||
//[{"key":"1","sampleModel":"88h21","equipmentModel":"siis","offsetCondition":"sjjsj","load":"2024-11-09",
|
||||
// "equipmentType":"sjjsjsj"}]
|
||||
if (StringUtils.isNotBlank(deviationEquipment)) {
|
||||
List<JSONObject> boardList = JSON.parseArray(deviationEquipment, JSONObject.class);
|
||||
boardList.forEach(board -> {
|
||||
board.put("load", null);
|
||||
});
|
||||
experiment.setDeviationEquipment(JSON.toJSONString(boardList));
|
||||
}
|
||||
experiment.setId(null);
|
||||
experiment.setCopyCount(0);
|
||||
experiment.setStatus(ExperimentStatus.PRE_TEST);
|
||||
experiment.setStartDate(null);
|
||||
experiment.setEndDate(null);
|
||||
return experiment;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +179,13 @@ public class ExperimentTestProcess implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private List<ExperimentSampleInfo> sampleInfoList;
|
||||
|
||||
@Excel(name = "测试标准", width = 15)
|
||||
@Schema(description = "测试标准")
|
||||
private String testStandardsId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private TestStandards testStandards;
|
||||
|
||||
public ExperimentTestProcess copy(String experimentId) {
|
||||
ExperimentTestProcess experiment = new ExperimentTestProcess();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package org.jeecg.modules.database.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -87,4 +85,16 @@ public class TestStandards implements Serializable {
|
||||
@Excel(name = "附件", width = 15)
|
||||
@Schema(description = "附件")
|
||||
private String attachment;
|
||||
/**
|
||||
* 温度要求
|
||||
*/
|
||||
@Excel(name = "温度要求", width = 15)
|
||||
@Schema(description = "温度要求")
|
||||
private String temperatureRequirements;
|
||||
/**
|
||||
* 湿度要求
|
||||
*/
|
||||
@Excel(name = "湿度要求", width = 15)
|
||||
@Schema(description = "湿度要求")
|
||||
private String humidityRequirements;
|
||||
}
|
||||
|
||||
@@ -12,4 +12,6 @@ import org.jeecg.modules.database.entity.Experiment;
|
||||
public interface IExperimentService extends IService<Experiment> {
|
||||
|
||||
void fetchExperimentDetail(Experiment experiment);
|
||||
|
||||
Experiment copy(Experiment oldExperiment);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package org.jeecg.modules.database.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.database.constant.ExperimentStatus;
|
||||
import org.jeecg.modules.database.entity.*;
|
||||
import org.jeecg.modules.database.mapper.ExperimentMapper;
|
||||
import org.jeecg.modules.database.service.*;
|
||||
@@ -36,6 +38,9 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
|
||||
@Autowired
|
||||
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
|
||||
|
||||
@Autowired
|
||||
private IExperimentSequenceService experimentSequenceService;
|
||||
|
||||
@Override
|
||||
public void fetchExperimentDetail(Experiment experiment) {
|
||||
if (StringUtils.isNotBlank(experiment.getSupervisor())) {
|
||||
@@ -80,4 +85,59 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Experiment copy(Experiment oldExperiment) {
|
||||
Experiment experiment = new Experiment();
|
||||
BeanUtil.copyProperties(this, experiment);
|
||||
experiment.setId(null);
|
||||
experiment.setExperimentNo(experimentSequenceService.next());
|
||||
experiment.setCopyCount(0);
|
||||
experiment.setStatus(ExperimentStatus.PRE_TEST);
|
||||
experiment.setStartDate(null);
|
||||
experiment.setEndDate(null);
|
||||
save(experiment);
|
||||
|
||||
List<ExperimentIrradiationBoard> irradiationBoardList = oldExperiment.getIrradiationBoardList();
|
||||
if (CollUtil.isNotEmpty(irradiationBoardList)) {
|
||||
irradiationBoardList.forEach(board -> {
|
||||
ExperimentIrradiationBoard target = new ExperimentIrradiationBoard();
|
||||
BeanUtil.copyProperties(board, target);
|
||||
target.setId(null);
|
||||
target.setMeasurementValidity(null);
|
||||
target.setSourceArea(null);
|
||||
target.setSampleImage(null);
|
||||
target.setExperimentId(experiment.getId());
|
||||
experimentIrradiationBoardService.save(target);
|
||||
});
|
||||
}
|
||||
List<ExperimentDeviationEquipment> deviationEquipmentList = oldExperiment.getDeviationEquipmentList();
|
||||
if (CollUtil.isNotEmpty(deviationEquipmentList)) {
|
||||
deviationEquipmentList.forEach(board -> {
|
||||
ExperimentDeviationEquipment target = new ExperimentDeviationEquipment();
|
||||
BeanUtil.copyProperties(board, target);
|
||||
|
||||
target.setId(null);
|
||||
target.setMeasurementValidity(null);
|
||||
target.setSampleImage(null);
|
||||
target.setExperimentId(experiment.getId());
|
||||
experimentDeviationEquipmentService.save(target);
|
||||
});
|
||||
}
|
||||
|
||||
List<ExperimentDeviationCondition> deviationConditionList = oldExperiment.getDeviationConditionList();
|
||||
if (CollUtil.isNotEmpty(deviationConditionList)) {
|
||||
deviationConditionList.forEach(board -> {
|
||||
ExperimentDeviationCondition target = new ExperimentDeviationCondition();
|
||||
BeanUtil.copyProperties(board, target);
|
||||
target.setId(null);
|
||||
target.setLoadCapacity(null);
|
||||
target.setSampleImage(null);
|
||||
target.setExperimentId(experiment.getId());
|
||||
experimentDeviationConditionService.save(target);
|
||||
});
|
||||
}
|
||||
return experiment;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,16 @@ package org.jeecg.modules.database.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.database.entity.ExperimentTestProcess;
|
||||
import org.jeecg.modules.database.entity.TestStandards;
|
||||
import org.jeecg.modules.database.mapper.ExperimentTestProcessMapper;
|
||||
import org.jeecg.modules.database.service.IExperimentTestProcessService;
|
||||
import org.jeecg.modules.database.service.ITestStandardsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -18,9 +23,21 @@ import java.util.List;
|
||||
@Service
|
||||
public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTestProcessMapper, ExperimentTestProcess>
|
||||
implements IExperimentTestProcessService {
|
||||
@Autowired
|
||||
private ITestStandardsService testStandardsService;
|
||||
|
||||
@Override
|
||||
public List<ExperimentTestProcess> getByExperimentId(String experimentId) {
|
||||
return list(new LambdaQueryWrapper<ExperimentTestProcess>().eq(ExperimentTestProcess::getExperimentId, experimentId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExperimentTestProcess getById(Serializable id) {
|
||||
ExperimentTestProcess experimentTestProcess = super.getById(id);
|
||||
if (StringUtils.isNotBlank(experimentTestProcess.getTestStandardsId())) {
|
||||
TestStandards testStandards = testStandardsService.getById(experimentTestProcess.getTestStandardsId());
|
||||
experimentTestProcess.setTestStandards(testStandards);
|
||||
}
|
||||
return experimentTestProcess;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user