实验报告
This commit is contained in:
@@ -468,10 +468,14 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
ExperimentSampleInfo sampleInfo = sampleInfoList.get(j);
|
||||
AnnealProcessExportDTO annealProcessExportDTO = new AnnealProcessExportDTO();
|
||||
|
||||
if (CollUtil.isNotEmpty(deviationConditionList) && ObjUtil.isNotNull(deviationConditionList.get(j))) {
|
||||
if (CollUtil.isNotEmpty(deviationConditionList) && deviationConditionList.size() > j && ObjUtil.isNotNull(
|
||||
deviationConditionList.get(j))
|
||||
) {
|
||||
BeanUtil.copyProperties(deviationConditionList.get(j), annealProcessExportDTO);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(deviationEquipmentList) && ObjUtil.isNotNull(deviationEquipmentList.get(j))) {
|
||||
if (CollUtil.isNotEmpty(deviationEquipmentList) && deviationEquipmentList.size() > j && ObjUtil.isNotNull(
|
||||
deviationEquipmentList.get(j))
|
||||
) {
|
||||
BeanUtil.copyProperties(deviationEquipmentList.get(j), annealProcessExportDTO);
|
||||
}
|
||||
|
||||
@@ -493,12 +497,124 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
|
||||
List<TestProcessExportDTO> testProcessList = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(experimentTestProcessList)) {
|
||||
experimentTestProcessList.forEach(v -> {
|
||||
List<ExperimentSampleInfo> sampleInfoList = v.getSampleInfoList();
|
||||
TestProcessExportDTO testProcessExportDTO = new TestProcessExportDTO();
|
||||
testProcessExportDTO.setEnvironmentalTemperature(v.getEnvironmentalTemperature());
|
||||
testProcessExportDTO.setEnvironmentalHumidity(v.getEnvironmentalHumidity());
|
||||
testProcessList.add(testProcessExportDTO);
|
||||
testProcessExportDTO.setTestStandards(ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getName() : "");
|
||||
testProcessExportDTO.setTemperatureRequirements(
|
||||
ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getTemperatureRequirements() : "");
|
||||
testProcessExportDTO.setHumidityRequirements(
|
||||
ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getHumidityRequirements() : "");
|
||||
String testParameters = v.getTestParameters();
|
||||
if (StringUtils.isNotBlank(testParameters)) {
|
||||
List<Map> jsonObject = JSON.parseArray(testParameters, Map.class);
|
||||
String collect = jsonObject.stream().map(s -> s.getOrDefault("name", "").toString()).collect(
|
||||
Collectors.joining(","));
|
||||
testProcessExportDTO.setTestParameters(collect);
|
||||
}
|
||||
List<TestEquipmentDTO> testEquipmentDTOList = v.getTestEquipmentList();
|
||||
if (CollUtil.isNotEmpty(testEquipmentDTOList)) {
|
||||
testProcessExportDTO.setEquipmentModel(testEquipmentDTOList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getEquipmentModel()))
|
||||
.map(t -> t.getEquipmentModel())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setSampleModel(testEquipmentDTOList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getSampleModel()))
|
||||
.map(t -> t.getSampleModel())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setManagementNo(testEquipmentDTOList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getManagementNo()))
|
||||
.map(t -> t.getManagementNo())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setLifespan(testEquipmentDTOList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getLifespan()))
|
||||
.map(t -> t.getLifespan())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setEquipmentName(testEquipmentDTOList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getEquipmentName()))
|
||||
.map(t -> t.getEquipmentName())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setRoomNo(testEquipmentDTOList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getRoomNo()))
|
||||
.map(t -> t.getRoomNo())
|
||||
.collect(Collectors.joining(",")));
|
||||
}
|
||||
|
||||
List<TestMeteringPointDTO> testMeteringPointList = v.getTestMeteringPointList();
|
||||
if (CollUtil.isNotEmpty(testMeteringPointList)) {
|
||||
testProcessExportDTO.setMeteringPoint(testMeteringPointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getPoint()))
|
||||
.map(t -> t.getPoint())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setMeteringStartTime(testMeteringPointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getStartTime()))
|
||||
.map(t -> t.getStartTime())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setMeteringEndTime(testMeteringPointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getEndTime()))
|
||||
.map(t -> t.getEndTime())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setMeteringResult(testMeteringPointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getResult()))
|
||||
.map(t -> t.getResult())
|
||||
.collect(Collectors.joining(",")));
|
||||
}
|
||||
|
||||
List<TestFluencePointDTO> testFluencePointList = v.getTestFluencePointList();
|
||||
if (CollUtil.isNotEmpty(testFluencePointList)) {
|
||||
testProcessExportDTO.setFluencePoint(testFluencePointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getPoint()))
|
||||
.map(t -> t.getPoint())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setFluenceStartTime(testFluencePointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getStartTime()))
|
||||
.map(t -> t.getStartTime())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setFluenceEndTime(testFluencePointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getEndTime()))
|
||||
.map(t -> t.getEndTime())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setFluenceResult(testFluencePointList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getResult()))
|
||||
.map(t -> t.getResult())
|
||||
.collect(Collectors.joining(",")));
|
||||
}
|
||||
|
||||
List<TestAnnealingDurationDTO> annealingDurationList = v.getAnnealingDurationList();
|
||||
if (CollUtil.isNotEmpty(annealingDurationList)) {
|
||||
testProcessExportDTO.setAnnealingPoint(annealingDurationList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getPoint()))
|
||||
.map(t -> t.getPoint())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setAnnealingStartTime(annealingDurationList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getStartTime()))
|
||||
.map(t -> t.getStartTime())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setAnnealingEndTime(annealingDurationList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getEndTime()))
|
||||
.map(t -> t.getEndTime())
|
||||
.collect(Collectors.joining(",")));
|
||||
|
||||
testProcessExportDTO.setAnnealingResult(annealingDurationList.stream().filter(
|
||||
t -> StringUtils.isNotBlank(t.getResult()))
|
||||
.map(t -> t.getResult())
|
||||
.collect(Collectors.joining(",")));
|
||||
}
|
||||
testProcessExportDTO.setTestResult(v.getTestResult());
|
||||
testProcessList.add(testProcessExportDTO);
|
||||
});
|
||||
}
|
||||
dto.setTestProcessList(testProcessList);
|
||||
|
||||
@@ -59,21 +59,11 @@ public class AnnealProcessExportDTO implements Serializable {
|
||||
*/
|
||||
@Excel(name = "其它条件", width = 15)
|
||||
private java.lang.String otherCondition;
|
||||
/**
|
||||
* 偏置电源显示界面照片
|
||||
*/
|
||||
@Excel(name = "偏置电源显示界面照片", width = 15)
|
||||
private java.lang.String offsetPowerPhoto;
|
||||
/**
|
||||
* 输入信号
|
||||
*/
|
||||
@Excel(name = "输入信号", width = 15)
|
||||
private java.lang.String inputSignal;
|
||||
/**
|
||||
* 信号显示界面源照片
|
||||
*/
|
||||
@Excel(name = "信号显示界面源照片", width = 15)
|
||||
private java.lang.String signalPhoto;
|
||||
/**
|
||||
* 管脚接入方式
|
||||
*/
|
||||
@@ -107,11 +97,6 @@ public class AnnealProcessExportDTO implements Serializable {
|
||||
*/
|
||||
@Excel(name = "设备类型", width = 15)
|
||||
private java.lang.String equipmentType;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@Excel(name = "图片", width = 15)
|
||||
private java.lang.String sampleImage;
|
||||
/**
|
||||
* 计量有效期
|
||||
*/
|
||||
@@ -122,10 +107,5 @@ public class AnnealProcessExportDTO implements Serializable {
|
||||
*/
|
||||
@Excel(name = "房间号", width = 15)
|
||||
private java.lang.String roomNo;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
private java.lang.String equipmentNo;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.jeecg.modules.database.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 退火时长
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-08-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TestAnnealingDurationDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "退火时长", width = 15)
|
||||
private String point;
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
private String startTime;
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
private String endTime;
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String result;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.jeecg.modules.database.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 试验管理
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-08-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TestEquipmentDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String sampleModel;
|
||||
private String equipmentModel;
|
||||
private String managementNo;
|
||||
private String lifespan;
|
||||
private String equipmentName;
|
||||
private String roomNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.jeecg.modules.database.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 测试注量点
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-08-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TestFluencePointDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "测试注量点", width = 15)
|
||||
private String point;
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
private String startTime;
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
private String endTime;
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String result;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.jeecg.modules.database.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 测试剂量点
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-08-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TestMeteringPointDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "测试剂量点", width = 15)
|
||||
private String point;
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
private String startTime;
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
private String endTime;
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String result;
|
||||
|
||||
}
|
||||
@@ -20,11 +20,70 @@ import java.io.Serializable;
|
||||
public class TestProcessExportDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "测试标准", width = 15)
|
||||
private String testStandards;
|
||||
|
||||
@Excel(name = "温度要求", width = 15)
|
||||
private String temperatureRequirements;
|
||||
/**
|
||||
* 湿度要求
|
||||
*/
|
||||
@Excel(name = "湿度要求", width = 15)
|
||||
private String humidityRequirements;
|
||||
|
||||
@Excel(name = "环境温度", width = 15)
|
||||
@Schema(description = "环境温度")
|
||||
private String environmentalTemperature;
|
||||
|
||||
@Excel(name = "环境湿度", width = 15)
|
||||
private String environmentalHumidity;
|
||||
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String testResult;
|
||||
|
||||
@Excel(name = "测试参数", width = 15)
|
||||
private String testParameters;
|
||||
|
||||
@Excel(name = "样品型号", width = 15)
|
||||
private String sampleModel;
|
||||
@Excel(name = "设备型号", width = 15)
|
||||
private String equipmentModel;
|
||||
@Excel(name = "管理编号", width = 15)
|
||||
private String managementNo;
|
||||
@Excel(name = "计量有效期", width = 15)
|
||||
private String lifespan;
|
||||
@Excel(name = "设备名称", width = 15)
|
||||
private String equipmentName;
|
||||
@Excel(name = "房间号", width = 15)
|
||||
private String roomNo;
|
||||
|
||||
@Excel(name = "测试剂量点", width = 15)
|
||||
private String meteringPoint;
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
private String meteringStartTime;
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
private String meteringEndTime;
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String meteringResult;
|
||||
|
||||
@Excel(name = "测试注量点", width = 15)
|
||||
private String fluencePoint;
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
private String fluenceStartTime;
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
private String fluenceEndTime;
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String fluenceResult;
|
||||
|
||||
@Excel(name = "退火时长", width = 15)
|
||||
private String annealingPoint;
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
private String annealingStartTime;
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
private String annealingEndTime;
|
||||
@Excel(name = "测试结果", width = 15)
|
||||
private String annealingResult;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.modules.database.dto.*;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@@ -144,24 +145,38 @@ public class ExperimentTestProcess implements Serializable {
|
||||
@Excel(name = "测试设备", width = 15)
|
||||
@Schema(description = "测试设备(json 大字段)")
|
||||
private String testEquipment;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<TestEquipmentDTO> testEquipmentList;
|
||||
/**
|
||||
* 测试计量点
|
||||
*/
|
||||
@Excel(name = "测试计量点", width = 15)
|
||||
@Schema(description = "测试计量点")
|
||||
private String testMeteringPoint;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<TestMeteringPointDTO> testMeteringPointList;
|
||||
|
||||
/**
|
||||
* 测试注量点
|
||||
*/
|
||||
@Excel(name = "测试注量点", width = 15)
|
||||
@Schema(description = "测试注量点")
|
||||
private String testFluencePoint;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<TestFluencePointDTO> testFluencePointList;
|
||||
/**
|
||||
* 退火时长
|
||||
*/
|
||||
@Excel(name = "退火时长", width = 15)
|
||||
@Schema(description = "退火时长")
|
||||
private String annealingDuration;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<TestAnnealingDurationDTO> annealingDurationList;
|
||||
|
||||
/**
|
||||
* 测试数据(json 大字段)
|
||||
*/
|
||||
|
||||
@@ -10,5 +10,5 @@ import org.jeecg.modules.database.entity.TestStandards;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITestStandardsService extends IService<TestStandards> {
|
||||
|
||||
TestStandards findByRequirements(String temperatureRequirements, String humidityRequirements);
|
||||
}
|
||||
|
||||
@@ -62,20 +62,18 @@ public class ExperimentAnnealProcessServiceImpl extends ServiceImpl<ExperimentAn
|
||||
experimentAnnealProcess.setSampleInfoList(sampleInfoList);
|
||||
}
|
||||
//DeviationEquipment
|
||||
String deviationEquipmentIds = experimentAnnealProcess.getDeviationEquipment();
|
||||
if (StringUtils.isNotBlank(deviationEquipmentIds)) {
|
||||
List<ExperimentDeviationEquipment> deviationEquipmentList = Arrays.stream(deviationEquipmentIds.split(",")).map(
|
||||
sampleInfoId -> experimentDeviationEquipmentService.getById(sampleInfoId)).filter(Objects::nonNull).collect(
|
||||
Collectors.toList());
|
||||
String deviationEquipmentJson = experimentAnnealProcess.getDeviationEquipment();
|
||||
if (StringUtils.isNotBlank(deviationEquipmentJson)) {
|
||||
List<ExperimentDeviationEquipment> deviationEquipmentList = JSON.parseArray(deviationEquipmentJson,
|
||||
ExperimentDeviationEquipment.class);
|
||||
experimentAnnealProcess.setDeviationEquipmentList(deviationEquipmentList);
|
||||
}
|
||||
//DeviationCondition
|
||||
String deviationConditionIds = experimentAnnealProcess.getDeviationCondition();
|
||||
if (StringUtils.isNotBlank(deviationConditionIds)) {
|
||||
List<ExperimentDeviationCondition> deviationEquipmentList = Arrays.stream(deviationConditionIds.split(",")).map(
|
||||
sampleInfoId -> experimentDeviationConditionService.getById(sampleInfoId)).filter(Objects::nonNull).collect(
|
||||
Collectors.toList());
|
||||
experimentAnnealProcess.setDeviationConditionList(deviationEquipmentList);
|
||||
String deviationConditionJson = experimentAnnealProcess.getDeviationCondition();
|
||||
if (StringUtils.isNotBlank(deviationConditionJson)) {
|
||||
List<ExperimentDeviationCondition> deviationConditionList = JSON.parseArray(deviationConditionJson,
|
||||
ExperimentDeviationCondition.class);
|
||||
experimentAnnealProcess.setDeviationConditionList(deviationConditionList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,12 @@ package org.jeecg.modules.database.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.*;
|
||||
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.constant.ComponentSearchType;
|
||||
import org.jeecg.modules.database.dto.*;
|
||||
import org.jeecg.modules.database.entity.*;
|
||||
import org.jeecg.modules.database.mapper.ExperimentTestProcessMapper;
|
||||
import org.jeecg.modules.database.service.*;
|
||||
@@ -36,7 +35,6 @@ public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTest
|
||||
@Autowired
|
||||
private IComponentSearchService componentSearchService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExperimentTestProcess> getByExperimentId(String experimentId) {
|
||||
List<ExperimentTestProcess> list = list(
|
||||
@@ -57,8 +55,10 @@ public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTest
|
||||
|
||||
@Override
|
||||
public void assembleDetails(ExperimentTestProcess experimentTestProcess) {
|
||||
if (StringUtils.isNotBlank(experimentTestProcess.getTestStandardsId())) {
|
||||
TestStandards testStandards = testStandardsService.getById(experimentTestProcess.getTestStandardsId());
|
||||
String testStandardsId = experimentTestProcess.getTestStandardsId();
|
||||
if (StringUtils.isNotBlank(testStandardsId)) {
|
||||
String[] split = testStandardsId.split(",");
|
||||
TestStandards testStandards = testStandardsService.findByRequirements(split[0],split[1]);
|
||||
experimentTestProcess.setTestStandards(testStandards);
|
||||
}
|
||||
String sampleInfoIds = experimentTestProcess.getSampleInfo();
|
||||
@@ -68,6 +68,35 @@ public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTest
|
||||
.filter(Objects::nonNull).collect(Collectors.toList());
|
||||
experimentTestProcess.setSampleInfoList(sampleInfoList);
|
||||
}
|
||||
String testEquipmentJson = experimentTestProcess.getTestEquipment();
|
||||
experimentTestProcess.setTestEquipmentList(new ArrayList<>());
|
||||
if (StringUtils.isNotBlank(testEquipmentJson)) {
|
||||
List<TestEquipmentDTO> testEquipmentDTOList = JSON.parseArray(testEquipmentJson, TestEquipmentDTO.class);
|
||||
experimentTestProcess.setTestEquipmentList(testEquipmentDTOList);
|
||||
}
|
||||
|
||||
String testMeteringPointJson = experimentTestProcess.getTestMeteringPoint();
|
||||
experimentTestProcess.setTestMeteringPointList(new ArrayList<>());
|
||||
if (StringUtils.isNotBlank(testMeteringPointJson)) {
|
||||
List<TestMeteringPointDTO> testEquipmentDTOList = JSON.parseArray(testMeteringPointJson, TestMeteringPointDTO.class);
|
||||
experimentTestProcess.setTestMeteringPointList(testEquipmentDTOList);
|
||||
}
|
||||
|
||||
String testFluencePointJson = experimentTestProcess.getTestFluencePoint();
|
||||
experimentTestProcess.setTestFluencePointList(new ArrayList<>());
|
||||
if (StringUtils.isNotBlank(testFluencePointJson)) {
|
||||
List<TestFluencePointDTO> testEquipmentDTOList = JSON.parseArray(testFluencePointJson, TestFluencePointDTO.class);
|
||||
experimentTestProcess.setTestFluencePointList(testEquipmentDTOList);
|
||||
}
|
||||
|
||||
String annealingDurationJson = experimentTestProcess.getAnnealingDuration();
|
||||
experimentTestProcess.setAnnealingDurationList(new ArrayList<>());
|
||||
if (StringUtils.isNotBlank(annealingDurationJson)) {
|
||||
List<TestAnnealingDurationDTO> testAnnealingDurationDTOList = JSON.parseArray(annealingDurationJson,
|
||||
TestAnnealingDurationDTO.class);
|
||||
experimentTestProcess.setAnnealingDurationList(testAnnealingDurationDTOList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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.jeecg.modules.database.entity.TestStandards;
|
||||
import org.jeecg.modules.database.mapper.TestStandardsMapper;
|
||||
@@ -15,4 +16,11 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class TestStandardsServiceImpl extends ServiceImpl<TestStandardsMapper, TestStandards> implements ITestStandardsService {
|
||||
|
||||
@Override
|
||||
public TestStandards findByRequirements(String temperatureRequirements, String humidityRequirements) {
|
||||
TestStandards one = getOne(
|
||||
new LambdaQueryWrapper<TestStandards>().eq(TestStandards::getTemperatureRequirements, temperatureRequirements)
|
||||
.eq(TestStandards::getHumidityRequirements, humidityRequirements), false);
|
||||
return one;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user