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
|
#swagger
|
||||||
knife4j:
|
knife4j:
|
||||||
#开启增强配置
|
#开启增强配置
|
||||||
enable: true
|
enable: false
|
||||||
#开启生产环境屏蔽
|
#开启生产环境屏蔽
|
||||||
production: false
|
production: true
|
||||||
basic:
|
basic:
|
||||||
enable: false
|
enable: false
|
||||||
username: jeecg
|
username: jeecg
|
||||||
|
|||||||
@@ -260,12 +260,8 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
|||||||
@PostMapping(value = "/copy")
|
@PostMapping(value = "/copy")
|
||||||
public Result<String> copy(@RequestParam(name = "id", required = true) String id) {
|
public Result<String> copy(@RequestParam(name = "id", required = true) String id) {
|
||||||
Experiment old = experimentService.getById(id);
|
Experiment old = experimentService.getById(id);
|
||||||
old.addCopyCount();
|
experimentService.fetchExperimentDetail(old);
|
||||||
experimentService.updateById(old);
|
Experiment copied = experimentService.copy(old);
|
||||||
|
|
||||||
Experiment copied = old.copy();
|
|
||||||
copied.setExperimentNo(experimentSequenceService.next());
|
|
||||||
experimentService.save(copied);
|
|
||||||
|
|
||||||
List<ExperimentAnnealProcess> experimentAnnealProcess = experimentAnnealProcessService.getByExperimentId(old.getId());
|
List<ExperimentAnnealProcess> experimentAnnealProcess = experimentAnnealProcessService.getByExperimentId(old.getId());
|
||||||
if (CollUtil.isNotEmpty(experimentAnnealProcess)) {
|
if (CollUtil.isNotEmpty(experimentAnnealProcess)) {
|
||||||
|
|||||||
@@ -193,43 +193,13 @@ public class Experiment implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<ExperimentUser> experimentUserList;
|
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)
|
@TableField(exist = false)
|
||||||
private List<ExperimentSampleInfo> sampleInfoList;
|
private List<ExperimentSampleInfo> sampleInfoList;
|
||||||
|
|
||||||
|
@Excel(name = "测试标准", width = 15)
|
||||||
|
@Schema(description = "测试标准")
|
||||||
|
private String testStandardsId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private TestStandards testStandards;
|
||||||
|
|
||||||
public ExperimentTestProcess copy(String experimentId) {
|
public ExperimentTestProcess copy(String experimentId) {
|
||||||
ExperimentTestProcess experiment = new ExperimentTestProcess();
|
ExperimentTestProcess experiment = new ExperimentTestProcess();
|
||||||
BeanUtil.copyProperties(this, experiment);
|
BeanUtil.copyProperties(this, experiment);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package org.jeecg.modules.database.entity;
|
package org.jeecg.modules.database.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -45,7 +43,7 @@ public class TestStandards implements Serializable {
|
|||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@Schema(description = "创建日期")
|
@Schema(description = "创建日期")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
/**
|
/**
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
@@ -57,7 +55,7 @@ public class TestStandards implements Serializable {
|
|||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@Schema(description = "更新日期")
|
@Schema(description = "更新日期")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**
|
/**
|
||||||
* 所属部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
@@ -87,4 +85,16 @@ public class TestStandards implements Serializable {
|
|||||||
@Excel(name = "附件", width = 15)
|
@Excel(name = "附件", width = 15)
|
||||||
@Schema(description = "附件")
|
@Schema(description = "附件")
|
||||||
private String attachment;
|
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> {
|
public interface IExperimentService extends IService<Experiment> {
|
||||||
|
|
||||||
void fetchExperimentDetail(Experiment experiment);
|
void fetchExperimentDetail(Experiment experiment);
|
||||||
|
|
||||||
|
Experiment copy(Experiment oldExperiment);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package org.jeecg.modules.database.service.impl;
|
package org.jeecg.modules.database.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentStatus;
|
||||||
import org.jeecg.modules.database.entity.*;
|
import org.jeecg.modules.database.entity.*;
|
||||||
import org.jeecg.modules.database.mapper.ExperimentMapper;
|
import org.jeecg.modules.database.mapper.ExperimentMapper;
|
||||||
import org.jeecg.modules.database.service.*;
|
import org.jeecg.modules.database.service.*;
|
||||||
@@ -36,6 +38,9 @@ public class ExperimentServiceImpl extends ServiceImpl<ExperimentMapper, Experim
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
|
private IExperimentIrradiationBoardService experimentIrradiationBoardService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExperimentSequenceService experimentSequenceService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fetchExperimentDetail(Experiment experiment) {
|
public void fetchExperimentDetail(Experiment experiment) {
|
||||||
if (StringUtils.isNotBlank(experiment.getSupervisor())) {
|
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.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
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.ExperimentTestProcess;
|
||||||
|
import org.jeecg.modules.database.entity.TestStandards;
|
||||||
import org.jeecg.modules.database.mapper.ExperimentTestProcessMapper;
|
import org.jeecg.modules.database.mapper.ExperimentTestProcessMapper;
|
||||||
import org.jeecg.modules.database.service.IExperimentTestProcessService;
|
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 org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -18,9 +23,21 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTestProcessMapper, ExperimentTestProcess>
|
public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTestProcessMapper, ExperimentTestProcess>
|
||||||
implements IExperimentTestProcessService {
|
implements IExperimentTestProcessService {
|
||||||
|
@Autowired
|
||||||
|
private ITestStandardsService testStandardsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ExperimentTestProcess> getByExperimentId(String experimentId) {
|
public List<ExperimentTestProcess> getByExperimentId(String experimentId) {
|
||||||
return list(new LambdaQueryWrapper<ExperimentTestProcess>().eq(ExperimentTestProcess::getExperimentId, 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