实验报告

This commit is contained in:
ls
2025-05-05 23:36:05 +08:00
parent e17e3660b9
commit 1c58c55077
3 changed files with 390 additions and 352 deletions

View File

@@ -1,8 +1,6 @@
package org.jeecg.modules.database.controller; package org.jeecg.modules.database.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -428,7 +426,7 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
dto.setType(ex.getType()); dto.setType(ex.getType());
dto.setStartDate(ex.getStartDate()); dto.setStartDate(ex.getStartDate());
dto.setEndDate(ex.getEndDate()); dto.setEndDate(ex.getEndDate());
String equipmentStr = ex.getDeviationEquipmentList().stream().map(v -> v.getEquipmentNo()).filter( String equipmentStr = ex.getDeviationEquipmentList().stream().map(v -> v.getEquipmentName()).filter(
v -> StringUtils.isNotBlank(v)) v -> StringUtils.isNotBlank(v))
.collect(Collectors.joining("\n")); .collect(Collectors.joining("\n"));
dto.setEquipment(equipmentStr); dto.setEquipment(equipmentStr);
@@ -447,179 +445,179 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
String radiationDetailJson = radiationProcess.getRadiationDetail(); String radiationDetailJson = radiationProcess.getRadiationDetail();
if (StringUtils.isNotBlank(radiationDetailJson)) { if (StringUtils.isNotBlank(radiationDetailJson)) {
RadiationMapDTO radiationMap = JSON.parseObject(radiationDetailJson, RadiationMapDTO.class); RadiationMapDTO radiationMap = JSON.parseObject(radiationDetailJson, RadiationMapDTO.class);
addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getXgy(), "小钴源")); addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getXgy(), ex));
addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getDgy(), "大钴源")); addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getDgy(), ex));
addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getX(), "X光机")); addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getX(), ex));
addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getElectronics(), "电子加速器")); addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getElectronics(), ex));
addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getProton(), "质子加速器")); addIfNotEmpty(detailList, extractedXgy(radiationProcess, radiationMap.getProton(), ex));
} }
}); });
} }
//退火过程 //退火过程
List<AnnealProcessExportDTO> annealProcessList = new ArrayList<>(); //List<AnnealProcessExportDTO> annealProcessList = new ArrayList<>();
List<ExperimentAnnealProcess> experimentAnnealProcessList = experimentAnnealProcessService.getByExperimentId(ex.getId()); //List<ExperimentAnnealProcess> experimentAnnealProcessList = experimentAnnealProcessService.getByExperimentId(ex.getId());
if (CollUtil.isNotEmpty(experimentAnnealProcessList)) { //if (CollUtil.isNotEmpty(experimentAnnealProcessList)) {
experimentAnnealProcessList.forEach(v -> { // experimentAnnealProcessList.forEach(v -> {
List<ExperimentSampleInfo> sampleInfoList = v.getSampleInfoList(); // List<ExperimentSampleInfo> sampleInfoList = v.getSampleInfoList();
List<ExperimentDeviationEquipment> deviationEquipmentList = v.getDeviationEquipmentList(); // List<ExperimentDeviationEquipment> deviationEquipmentList = v.getDeviationEquipmentList();
List<ExperimentDeviationCondition> deviationConditionList = v.getDeviationConditionList(); // List<ExperimentDeviationCondition> deviationConditionList = v.getDeviationConditionList();
if (CollUtil.isNotEmpty(sampleInfoList)) { // if (CollUtil.isNotEmpty(sampleInfoList)) {
for (int j = 0; j < sampleInfoList.size(); j++) { // for (int j = 0; j < sampleInfoList.size(); j++) {
ExperimentSampleInfo sampleInfo = sampleInfoList.get(j); // ExperimentSampleInfo sampleInfo = sampleInfoList.get(j);
AnnealProcessExportDTO annealProcessExportDTO = new AnnealProcessExportDTO(); // AnnealProcessExportDTO annealProcessExportDTO = new AnnealProcessExportDTO();
//
if (CollUtil.isNotEmpty(deviationConditionList) && deviationConditionList.size() > j && ObjUtil.isNotNull( // if (CollUtil.isNotEmpty(deviationConditionList) && deviationConditionList.size() > j && ObjUtil.isNotNull(
deviationConditionList.get(j)) // deviationConditionList.get(j))
) { // ) {
BeanUtil.copyProperties(deviationConditionList.get(j), annealProcessExportDTO); // BeanUtil.copyProperties(deviationConditionList.get(j), annealProcessExportDTO);
} // }
if (CollUtil.isNotEmpty(deviationEquipmentList) && deviationEquipmentList.size() > j && ObjUtil.isNotNull( // if (CollUtil.isNotEmpty(deviationEquipmentList) && deviationEquipmentList.size() > j && ObjUtil.isNotNull(
deviationEquipmentList.get(j)) // deviationEquipmentList.get(j))
) { // ) {
BeanUtil.copyProperties(deviationEquipmentList.get(j), annealProcessExportDTO); // BeanUtil.copyProperties(deviationEquipmentList.get(j), annealProcessExportDTO);
} // }
//
annealProcessExportDTO.setSampleName(sampleInfo.getSampleName()); // annealProcessExportDTO.setSampleName(sampleInfo.getSampleName());
annealProcessExportDTO.setSampleModel(sampleInfo.getSampleModel()); // annealProcessExportDTO.setSampleModel(sampleInfo.getSampleModel());
annealProcessExportDTO.setSampleType(sampleInfo.getSampleType()); // annealProcessExportDTO.setSampleType(sampleInfo.getSampleType());
annealProcessExportDTO.setAnnealTemperature(v.getAnnealTemperature()); // annealProcessExportDTO.setAnnealTemperature(v.getAnnealTemperature());
annealProcessExportDTO.setAnnealStartTime(DateUtils.formatDate(v.getAnnealStartTime(), "yyyy-MM-dd HH:mm")); // annealProcessExportDTO.setAnnealStartTime(DateUtils.formatDate(v.getAnnealStartTime(), "yyyy-MM-dd HH:mm"));
annealProcessExportDTO.setAnnealEndTime(DateUtils.formatDate(v.getAnnealEndTime(), "yyyy-MM-dd HH:mm")); // annealProcessExportDTO.setAnnealEndTime(DateUtils.formatDate(v.getAnnealEndTime(), "yyyy-MM-dd HH:mm"));
annealProcessList.add(annealProcessExportDTO); // annealProcessList.add(annealProcessExportDTO);
} // }
} // }
}); // });
} //}
//
dto.setAnnealProcessList(annealProcessList); //dto.setAnnealProcessList(annealProcessList);
//测试过程 //测试过程
List<ExperimentTestProcess> experimentTestProcessList = experimentTestProcessService.getByExperimentId(ex.getId()); //List<ExperimentTestProcess> experimentTestProcessList = experimentTestProcessService.getByExperimentId(ex.getId());
List<TestProcessExportDTO> testProcessList = new ArrayList<>(); //List<TestProcessExportDTO> testProcessList = new ArrayList<>();
if (CollUtil.isNotEmpty(experimentTestProcessList)) { //if (CollUtil.isNotEmpty(experimentTestProcessList)) {
experimentTestProcessList.forEach(v -> { // experimentTestProcessList.forEach(v -> {
TestProcessExportDTO testProcessExportDTO = new TestProcessExportDTO(); // TestProcessExportDTO testProcessExportDTO = new TestProcessExportDTO();
testProcessExportDTO.setEnvironmentalTemperature(v.getEnvironmentalTemperature()); // testProcessExportDTO.setEnvironmentalTemperature(v.getEnvironmentalTemperature());
testProcessExportDTO.setEnvironmentalHumidity(v.getEnvironmentalHumidity()); // testProcessExportDTO.setEnvironmentalHumidity(v.getEnvironmentalHumidity());
testProcessExportDTO.setTestStandards(ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getName() : ""); // testProcessExportDTO.setTestStandards(ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getName() : "");
testProcessExportDTO.setTemperatureRequirements( // testProcessExportDTO.setTemperatureRequirements(
ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getTemperatureRequirements() : ""); // ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getTemperatureRequirements() : "");
testProcessExportDTO.setHumidityRequirements( // testProcessExportDTO.setHumidityRequirements(
ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getHumidityRequirements() : ""); // ObjUtil.isNotNull(v.getTestStandards()) ? v.getTestStandards().getHumidityRequirements() : "");
String testParameters = v.getTestParameters(); // String testParameters = v.getTestParameters();
if (StringUtils.isNotBlank(testParameters)) { // if (StringUtils.isNotBlank(testParameters)) {
List<Map> jsonObject = JSON.parseArray(testParameters, Map.class); // List<Map> jsonObject = JSON.parseArray(testParameters, Map.class);
String collect = jsonObject.stream().map(s -> s.getOrDefault("name", "").toString()).collect( // String collect = jsonObject.stream().map(s -> s.getOrDefault("name", "").toString()).collect(
Collectors.joining(",")); // Collectors.joining(","));
testProcessExportDTO.setTestParameters(collect); // testProcessExportDTO.setTestParameters(collect);
} // }
List<TestEquipmentDTO> testEquipmentDTOList = v.getTestEquipmentList(); // List<TestEquipmentDTO> testEquipmentDTOList = v.getTestEquipmentList();
if (CollUtil.isNotEmpty(testEquipmentDTOList)) { // if (CollUtil.isNotEmpty(testEquipmentDTOList)) {
testProcessExportDTO.setEquipmentModel(testEquipmentDTOList.stream().filter( // testProcessExportDTO.setEquipmentModel(testEquipmentDTOList.stream().filter(
t -> StringUtils.isNotBlank(t.getEquipmentModel())) // t -> StringUtils.isNotBlank(t.getEquipmentModel()))
.map(t -> t.getEquipmentModel()) // .map(t -> t.getEquipmentModel())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setSampleModel(testEquipmentDTOList.stream().filter( // testProcessExportDTO.setSampleModel(testEquipmentDTOList.stream().filter(
t -> StringUtils.isNotBlank(t.getSampleModel())) // t -> StringUtils.isNotBlank(t.getSampleModel()))
.map(t -> t.getSampleModel()) // .map(t -> t.getSampleModel())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setManagementNo(testEquipmentDTOList.stream().filter( // testProcessExportDTO.setManagementNo(testEquipmentDTOList.stream().filter(
t -> StringUtils.isNotBlank(t.getManagementNo())) // t -> StringUtils.isNotBlank(t.getManagementNo()))
.map(t -> t.getManagementNo()) // .map(t -> t.getManagementNo())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setLifespan(testEquipmentDTOList.stream().filter( // testProcessExportDTO.setLifespan(testEquipmentDTOList.stream().filter(
t -> StringUtils.isNotBlank(t.getLifespan())) // t -> StringUtils.isNotBlank(t.getLifespan()))
.map(t -> t.getLifespan()) // .map(t -> t.getLifespan())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setEquipmentName(testEquipmentDTOList.stream().filter( // testProcessExportDTO.setEquipmentName(testEquipmentDTOList.stream().filter(
t -> StringUtils.isNotBlank(t.getEquipmentName())) // t -> StringUtils.isNotBlank(t.getEquipmentName()))
.map(t -> t.getEquipmentName()) // .map(t -> t.getEquipmentName())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setRoomNo(testEquipmentDTOList.stream().filter( // testProcessExportDTO.setRoomNo(testEquipmentDTOList.stream().filter(
t -> StringUtils.isNotBlank(t.getRoomNo())) // t -> StringUtils.isNotBlank(t.getRoomNo()))
.map(t -> t.getRoomNo()) // .map(t -> t.getRoomNo())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
} // }
//
List<TestMeteringPointDTO> testMeteringPointList = v.getTestMeteringPointList(); // List<TestMeteringPointDTO> testMeteringPointList = v.getTestMeteringPointList();
if (CollUtil.isNotEmpty(testMeteringPointList)) { // if (CollUtil.isNotEmpty(testMeteringPointList)) {
testProcessExportDTO.setMeteringPoint(testMeteringPointList.stream().filter( // testProcessExportDTO.setMeteringPoint(testMeteringPointList.stream().filter(
t -> StringUtils.isNotBlank(t.getPoint())) // t -> StringUtils.isNotBlank(t.getPoint()))
.map(t -> t.getPoint()) // .map(t -> t.getPoint())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setMeteringStartTime(testMeteringPointList.stream().filter( // testProcessExportDTO.setMeteringStartTime(testMeteringPointList.stream().filter(
t -> StringUtils.isNotBlank(t.getStartTime())) // t -> StringUtils.isNotBlank(t.getStartTime()))
.map(t -> t.getStartTime()) // .map(t -> t.getStartTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setMeteringEndTime(testMeteringPointList.stream().filter( // testProcessExportDTO.setMeteringEndTime(testMeteringPointList.stream().filter(
t -> StringUtils.isNotBlank(t.getEndTime())) // t -> StringUtils.isNotBlank(t.getEndTime()))
.map(t -> t.getEndTime()) // .map(t -> t.getEndTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setMeteringResult(testMeteringPointList.stream().filter( // testProcessExportDTO.setMeteringResult(testMeteringPointList.stream().filter(
t -> StringUtils.isNotBlank(t.getResult())) // t -> StringUtils.isNotBlank(t.getResult()))
.map(t -> t.getResult()) // .map(t -> t.getResult())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
} // }
//
List<TestFluencePointDTO> testFluencePointList = v.getTestFluencePointList(); // List<TestFluencePointDTO> testFluencePointList = v.getTestFluencePointList();
if (CollUtil.isNotEmpty(testFluencePointList)) { // if (CollUtil.isNotEmpty(testFluencePointList)) {
testProcessExportDTO.setFluencePoint(testFluencePointList.stream().filter( // testProcessExportDTO.setFluencePoint(testFluencePointList.stream().filter(
t -> StringUtils.isNotBlank(t.getPoint())) // t -> StringUtils.isNotBlank(t.getPoint()))
.map(t -> t.getPoint()) // .map(t -> t.getPoint())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setFluenceStartTime(testFluencePointList.stream().filter( // testProcessExportDTO.setFluenceStartTime(testFluencePointList.stream().filter(
t -> StringUtils.isNotBlank(t.getStartTime())) // t -> StringUtils.isNotBlank(t.getStartTime()))
.map(t -> t.getStartTime()) // .map(t -> t.getStartTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setFluenceEndTime(testFluencePointList.stream().filter( // testProcessExportDTO.setFluenceEndTime(testFluencePointList.stream().filter(
t -> StringUtils.isNotBlank(t.getEndTime())) // t -> StringUtils.isNotBlank(t.getEndTime()))
.map(t -> t.getEndTime()) // .map(t -> t.getEndTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setFluenceResult(testFluencePointList.stream().filter( // testProcessExportDTO.setFluenceResult(testFluencePointList.stream().filter(
t -> StringUtils.isNotBlank(t.getResult())) // t -> StringUtils.isNotBlank(t.getResult()))
.map(t -> t.getResult()) // .map(t -> t.getResult())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
} // }
//
List<TestAnnealingDurationDTO> annealingDurationList = v.getAnnealingDurationList(); // List<TestAnnealingDurationDTO> annealingDurationList = v.getAnnealingDurationList();
if (CollUtil.isNotEmpty(annealingDurationList)) { // if (CollUtil.isNotEmpty(annealingDurationList)) {
testProcessExportDTO.setAnnealingPoint(annealingDurationList.stream().filter( // testProcessExportDTO.setAnnealingPoint(annealingDurationList.stream().filter(
t -> StringUtils.isNotBlank(t.getPoint())) // t -> StringUtils.isNotBlank(t.getPoint()))
.map(t -> t.getPoint()) // .map(t -> t.getPoint())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setAnnealingStartTime(annealingDurationList.stream().filter( // testProcessExportDTO.setAnnealingStartTime(annealingDurationList.stream().filter(
t -> StringUtils.isNotBlank(t.getStartTime())) // t -> StringUtils.isNotBlank(t.getStartTime()))
.map(t -> t.getStartTime()) // .map(t -> t.getStartTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setAnnealingEndTime(annealingDurationList.stream().filter( // testProcessExportDTO.setAnnealingEndTime(annealingDurationList.stream().filter(
t -> StringUtils.isNotBlank(t.getEndTime())) // t -> StringUtils.isNotBlank(t.getEndTime()))
.map(t -> t.getEndTime()) // .map(t -> t.getEndTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
testProcessExportDTO.setAnnealingResult(annealingDurationList.stream().filter( // testProcessExportDTO.setAnnealingResult(annealingDurationList.stream().filter(
t -> StringUtils.isNotBlank(t.getResult())) // t -> StringUtils.isNotBlank(t.getResult()))
.map(t -> t.getResult()) // .map(t -> t.getResult())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
} // }
testProcessExportDTO.setTestResult(v.getTestResult()); // testProcessExportDTO.setTestResult(v.getTestResult());
testProcessList.add(testProcessExportDTO); // testProcessList.add(testProcessExportDTO);
}); // });
} //}
dto.setTestProcessList(testProcessList); //dto.setTestProcessList(testProcessList);
dto.setRadiationProcessList(detailList); dto.setRadiationProcessList(detailList);
resultList.add(dto); resultList.add(dto);
@@ -646,82 +644,107 @@ public class ExperimentController extends JeecgController<Experiment, IExperimen
} }
} }
private RadiationProcessExportDTO extractedXgy(ExperimentRadiationProcess radiationProcess, List<RadiationDetailDTO> xgy, String name) { private RadiationProcessExportDTO extractedXgy(ExperimentRadiationProcess radiationProcess, List<RadiationDetailDTO> xgy,
Experiment experiment) {
if (CollUtil.isEmpty(xgy)) { if (CollUtil.isEmpty(xgy)) {
return null; return null;
} }
RadiationProcessExportDTO detail = new RadiationProcessExportDTO(); RadiationProcessExportDTO detail = new RadiationProcessExportDTO();
List<ExperimentSampleInfo> sampleInfoList = radiationProcess.getSampleInfoList(); List<ExperimentSampleInfo> sampleInfoList = radiationProcess.getSampleInfoList();
detail.setRadiateType(name); detail.setRadiateType(radiationProcess.getRadiationSource());
if (CollUtil.isNotEmpty(sampleInfoList)) { if (CollUtil.isNotEmpty(sampleInfoList)) {
detail.setSampleModel(sampleInfoList.stream().map(s -> s.getSampleModel()).collect(Collectors.joining(","))); detail.setSampleModel(sampleInfoList.stream().map(s -> s.getSampleModel()).collect(Collectors.joining(",")));
detail.setSampleType(sampleInfoList.stream().map(s -> s.getSampleType()).collect(Collectors.joining(","))); detail.setSampleType(sampleInfoList.stream().map(s -> s.getSampleType()).collect(Collectors.joining(",")));
detail.setSampleName(sampleInfoList.stream().map(s -> s.getSampleName()).collect(Collectors.joining(",")));
} }
detail.setMeasurementRate(
//detail.setMeasurementRate(radiationProcess.getMeasurementRate());
detail.setPlannedMeasurementRate(
xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedMeasurementRate())).map(v -> v.getPlannedMeasurementRate())
.collect(Collectors.joining(",")));
detail.setActualMeasurementRate(
xgy.stream().filter(v -> StringUtils.isNotBlank(v.getActualMeasurementRate())).map(v -> v.getActualMeasurementRate()) xgy.stream().filter(v -> StringUtils.isNotBlank(v.getActualMeasurementRate())).map(v -> v.getActualMeasurementRate())
.collect(Collectors.joining(","))); .collect(Collectors.joining(",")));
detail.setPlannedMeasurementPoint( OptionalDouble maxRate = xgy.stream().map(obj -> obj.getActualMeasurementRate()) // 获取point字段
xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedMeasurementPoint())).map(v -> v.getPlannedMeasurementPoint()) .filter(point -> StringUtils.isNotBlank(point))
.collect(Collectors.joining(","))); .filter(str -> str.matches("-?\\d+(\\.\\d+)?")) // 只保留数字格式的字符串
detail.setPoint(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPoint())).map(v -> v.getPoint()) .mapToDouble(Double::parseDouble) // 转换为double
.collect(Collectors.joining(","))); .max();
detail.setTotalMeasurementRate(maxRate.isPresent() ? String.valueOf(maxRate.getAsDouble()) : "");
List<ExperimentIrradiationBoard> irradiationBoardList = experiment.getIrradiationBoardList();
if (CollUtil.isNotEmpty(irradiationBoardList)) {
detail.setSourceArea(irradiationBoardList.stream().filter(k -> StringUtils.isNotBlank(k.getSourceArea()))
.map(s -> s.getSourceArea()).collect(Collectors.joining(",")));
}
detail.setSourceDistance(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getSourceDistance())).map(v -> v.getSourceDistance()) //String measurementRate = radiationProcess.getMeasurementRate();
.collect(Collectors.joining(","))); //if (StringUtils.isNotBlank(measurementRate)) {
// List<Map<String, String>> maps = JSON.parseObject(measurementRate, new TypeReference<>() {});
// List<String> rate = new ArrayList<>();
// maps.stream().forEach(v -> rate.add(String.join(",", v.values())));
// detail.setMeasurementRate(String.join(",", rate));
//}
detail.setTubeCurrent(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getTubeCurrent())).map(v -> v.getTubeCurrent()) //detail.setMeasurementRate(radiationProcess.getMeasurementRate());
.collect(Collectors.joining(","))); //detail.setPlannedMeasurementRate(
// xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedMeasurementRate())).map(v -> v.getPlannedMeasurementRate())
detail.setEnergy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getEnergy())).map(v -> v.getEnergy()) // .collect(Collectors.joining(",")));
.collect(Collectors.joining(","))); //detail.setActualMeasurementRate(
// xgy.stream().filter(v -> StringUtils.isNotBlank(v.getActualMeasurementRate())).map(v -> v.getActualMeasurementRate())
detail.setCalibrationDistance(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getCalibrationDistance())) // .collect(Collectors.joining(",")));
.map(v -> v.getCalibrationDistance()) //detail.setPlannedMeasurementPoint(
.collect(Collectors.joining(","))); // xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedMeasurementPoint())).map(v -> v.getPlannedMeasurementPoint())
// .collect(Collectors.joining(",")));
detail.setIrradiationTime(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getIrradiationTime())).map(v -> v.getIrradiationTime()) //detail.setPoint(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPoint())).map(v -> v.getPoint())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
detail.setActualInjectionRate(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getActualInjectionRate())) //detail.setSourceDistance(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getSourceDistance())).map(v -> v.getSourceDistance())
.map(v -> v.getActualInjectionRate()) // .collect(Collectors.joining(",")));
.collect(Collectors.joining(","))); //
detail.setElectronEnergy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getElectronEnergy())).map(v -> v.getElectronEnergy()) //detail.setTubeCurrent(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getTubeCurrent())).map(v -> v.getTubeCurrent())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
//
detail.setBeam(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getBeam())).map(v -> v.getBeam()) //detail.setEnergy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getEnergy())).map(v -> v.getEnergy())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
detail.setPlateSpacing(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlateSpacing())).map(v -> v.getPlateSpacing()) //
.collect(Collectors.joining(","))); //detail.setCalibrationDistance(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getCalibrationDistance()))
// .map(v -> v.getCalibrationDistance())
detail.setProtonEnergy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getProtonEnergy())).map(v -> v.getProtonEnergy()) // .collect(Collectors.joining(",")));
.collect(Collectors.joining(","))); //
//detail.setIrradiationTime(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getIrradiationTime())).map(v -> v
detail.setScanArea(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getScanArea())).map(v -> v.getScanArea()) // .getIrradiationTime())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
detail.setEnvironmentSelect(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getEnvironmentSelect())) //
.map(v -> v.getEnvironmentSelect()) //detail.setActualInjectionRate(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getActualInjectionRate()))
.collect(Collectors.joining(","))); // .map(v -> v.getActualInjectionRate())
detail.setXy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getXy())).map(v -> v.getXy()) // .collect(Collectors.joining(",")));
.collect(Collectors.joining(","))); //detail.setElectronEnergy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getElectronEnergy())).map(v -> v.getElectronEnergy())
// .collect(Collectors.joining(",")));
detail.setTypeSelect(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getTypeSelect())).map(v -> v.getTypeSelect()) //
.collect(Collectors.joining(","))); //detail.setBeam(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getBeam())).map(v -> v.getBeam())
// .collect(Collectors.joining(",")));
detail.setStartTime(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getStartTime())).map(v -> v.getStartTime()) //detail.setPlateSpacing(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlateSpacing())).map(v -> v.getPlateSpacing())
.collect(Collectors.joining(","))); // .collect(Collectors.joining(",")));
detail.setEndTime(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getEndTime())).map(v -> v.getEndTime()) //
.collect(Collectors.joining(","))); //detail.setProtonEnergy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getProtonEnergy())).map(v -> v.getProtonEnergy())
detail.setPlannedInjectionRate(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedInjectionRate())) // .collect(Collectors.joining(",")));
.map(v -> v.getPlannedInjectionRate()) //
.collect(Collectors.joining(","))); //detail.setScanArea(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getScanArea())).map(v -> v.getScanArea())
detail.setPlannedInjectionPoints(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedInjectionPoints())) // .collect(Collectors.joining(",")));
.map(v -> v.getPlannedInjectionPoints()) //detail.setEnvironmentSelect(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getEnvironmentSelect()))
.collect(Collectors.joining(","))); // .map(v -> v.getEnvironmentSelect())
// .collect(Collectors.joining(",")));
//detail.setXy(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getXy())).map(v -> v.getXy())
// .collect(Collectors.joining(",")));
//
//detail.setTypeSelect(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getTypeSelect())).map(v -> v.getTypeSelect())
// .collect(Collectors.joining(",")));
//
//detail.setStartTime(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getStartTime())).map(v -> v.getStartTime())
// .collect(Collectors.joining(",")));
//detail.setEndTime(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getEndTime())).map(v -> v.getEndTime())
// .collect(Collectors.joining(",")));
//detail.setPlannedInjectionRate(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedInjectionRate()))
// .map(v -> v.getPlannedInjectionRate())
// .collect(Collectors.joining(",")));
//detail.setPlannedInjectionPoints(xgy.stream().filter(v -> StringUtils.isNotBlank(v.getPlannedInjectionPoints()))
// .map(v -> v.getPlannedInjectionPoints())
// .collect(Collectors.joining(",")));
return detail; return detail;
} }

View File

@@ -39,8 +39,14 @@ public class ExperimentExportDTO implements Serializable {
private String startDate; private String startDate;
@Excel(name = "实验结束日期", width = 15, needMerge = true) @Excel(name = "实验结束日期", width = 15, needMerge = true)
private String endDate; private String endDate;
@ExcelCollection(name = "试验过程")
private List<RadiationProcessExportDTO> radiationProcessList;
@Excel(name = "使用设备", width = 15, needMerge = true) @Excel(name = "使用设备", width = 15, needMerge = true)
private String equipment; private String equipment;
@Excel(name = "试验负责人", width = 15, needMerge = true) @Excel(name = "试验负责人", width = 15, needMerge = true)
private String supervisorName; private String supervisorName;
@Excel(name = "已出报告份数", width = 15, needMerge = true) @Excel(name = "已出报告份数", width = 15, needMerge = true)
@@ -48,13 +54,13 @@ public class ExperimentExportDTO implements Serializable {
@Excel(name = "试验员及评分", width = 15, needMerge = true) @Excel(name = "试验员及评分", width = 15, needMerge = true)
private String rateUserAndScore; private String rateUserAndScore;
@ExcelCollection(name = "辐照过程") //@ExcelCollection(name = "辐照过程")
private List<RadiationProcessExportDTO> radiationProcessList; //private List<RadiationProcessExportDTO> radiationProcessList;
//
@ExcelCollection(name = "退火过程") //@ExcelCollection(name = "退火过程")
private List<AnnealProcessExportDTO> annealProcessList; //private List<AnnealProcessExportDTO> annealProcessList;
//
@ExcelCollection(name = "测试过程") //@ExcelCollection(name = "测试过程")
private List<TestProcessExportDTO> testProcessList; //private List<TestProcessExportDTO> testProcessList;
} }

View File

@@ -25,120 +25,129 @@ public class RadiationProcessExportDTO implements Serializable {
private String radiateType; private String radiateType;
@Excel(name = "样品型号", width = 15) @Excel(name = "样品型号", width = 15)
private String sampleModel; private String sampleModel;
@Excel(name = "样品名称", width = 15)
private String sampleName;
@Excel(name = "样品类型", width = 15) @Excel(name = "样品类型", width = 15)
private String sampleType; private String sampleType;
//@Excel(name = "剂量率/注量率", width = 15) @Excel(name = "剂量率/注量率", width = 15)
//private String measurementRate; private String measurementRate;
/** @Excel(name = "总剂量/注量krad(Si)", width = 15)
* 计划剂量率 private String totalMeasurementRate;
*/ @Excel(name = "占源面积(cm)", width = 15)
@Excel(name = "计划剂量率", width = 15) private String sourceArea;
private String plannedMeasurementRate;
/**
* 实际剂量率 //
*/ ///**
@Excel(name = "实际剂量率", width = 15) // * 计划剂量率
private String actualMeasurementRate; // */
/** //@Excel(name = "计划剂量率", width = 15)
* 计划剂量点 //private String plannedMeasurementRate;
*/ ///**
@Excel(name = "计划剂量点", width = 15) // * 实际剂量率
private String plannedMeasurementPoint; // */
/** //@Excel(name = "实际剂量率", width = 15)
* 计划注量点 //private String actualMeasurementRate;
*/ ///**
@Excel(name = "计划量点", width = 15) // * 计划量点
private String plannedInjectionPoints; // */
/** //@Excel(name = "计划剂量点", width = 15)
* 计划注量率 //private String plannedMeasurementPoint;
*/ ///**
@Excel(name = "计划注量率", width = 15) // * 计划注量点
private String plannedInjectionRate; // */
/** //@Excel(name = "计划注量点", width = 15)
* 实际注量率 //private String plannedInjectionPoints;
*/ ///**
@Excel(name = "实际注量率", width = 15) // * 计划注量率
private String actualInjectionRate; // */
/** //@Excel(name = "计划注量率", width = 15)
* 实际剂量点 //private String plannedInjectionRate;
*/ ///**
@Excel(name = "实际剂量点", width = 15) // * 实际注量率
private String point; // */
/** //@Excel(name = "实际注量率", width = 15)
* 源口距离 //private String actualInjectionRate;
*/ ///**
@Excel(name = "源口距离", width = 15) // * 实际剂量点
private String sourceDistance; // */
/** //@Excel(name = "实际剂量点", width = 15)
* 管电流 //private String point;
*/ ///**
@Excel(name = "管电流", width = 15) // * 源口距离
private String tubeCurrent; // */
/** //@Excel(name = "源口距离", width = 15)
* 能量 //private String sourceDistance;
*/ ///**
@Excel(name = "X光机能量", width = 15) // * 管电流
private String energy; // */
/** //@Excel(name = "管电流", width = 15)
* 标定距离 //private String tubeCurrent;
*/ ///**
@Excel(name = "标定距离", width = 15) // * 能量
private String calibrationDistance; // */
/** //@Excel(name = "X光机能量", width = 15)
* 辐照时间 //private String energy;
*/ ///**
@Excel(name = "辐照时间", width = 15) // * 标定距离
private String irradiationTime; // */
/** //@Excel(name = "标定距离", width = 15)
* 电子能量 //private String calibrationDistance;
*/ ///**
@Excel(name = "电子能量", width = 15) // * 辐照时间
private String electronEnergy; // */
/** //@Excel(name = "辐照时间", width = 15)
* 束流 //private String irradiationTime;
*/ ///**
@Excel(name = "束流", width = 15) // * 电子能量
private String beam; // */
/** //@Excel(name = "电子能量", width = 15)
* 板距 //private String electronEnergy;
*/ ///**
@Excel(name = "板距", width = 15) // * 束流
private String plateSpacing; // */
/** //@Excel(name = "束流", width = 15)
* 质子能量 //private String beam;
*/ ///**
@Excel(name = "质子能量", width = 15) // * 板距
private String protonEnergy; // */
/** //@Excel(name = "板距", width = 15)
* 扫描面积 //private String plateSpacing;
*/ ///**
@Excel(name = "扫描面积", width = 15) // * 质子能量
private String scanArea; // */
/** //@Excel(name = "质子能量", width = 15)
* 辐射环境 //private String protonEnergy;
*/ ///**
@Excel(name = "辐射环境", width = 15) // * 扫描面积
private String environmentSelect; // */
/** //@Excel(name = "扫描面积", width = 15)
* 均匀性 //private String scanArea;
*/ ///**
@Excel(name = "均匀性", width = 15) // * 辐射环境
private String xy; // */
/** //@Excel(name = "辐射环境", width = 15)
* 试验类型 //private String environmentSelect;
*/ ///**
@Excel(name = "试验类型", width = 15) // * 均匀性
private String typeSelect; // */
/** //@Excel(name = "均匀性", width = 15)
* 辐照开始时间 //private String xy;
*/ ///**
@Excel(name = "辐照开始时间", width = 15) // * 试验类型
private String startTime; // */
/** //@Excel(name = "试验类型", width = 15)
* 辐照结束时间 //private String typeSelect;
*/ ///**
@Excel(name = "辐照结束时间", width = 15) // * 辐照开始时间
private String endTime; // */
//@Excel(name = "辐照开始时间", width = 15)
//private String startTime;
///**
// * 辐照结束时间
// */
//@Excel(name = "辐照结束时间", width = 15)
//private String endTime;
} }