增加值非空判断
This commit is contained in:
parent
81592abac1
commit
dc39e67308
|
@ -195,28 +195,58 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
if (Objects.nonNull(gardsSampleData)){
|
if (Objects.nonNull(gardsSampleData)){
|
||||||
acquisition = new Acquisition();
|
acquisition = new Acquisition();
|
||||||
//封装数据内容
|
//封装数据内容
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleData.getStationName())){
|
||||||
generalInformation.setSiteCode(gardsSampleData.getStationName());
|
generalInformation.setSiteCode(gardsSampleData.getStationName());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleData.getSiteDetCode())){
|
||||||
generalInformation.setDetectorCode(gardsSampleData.getSiteDetCode());
|
generalInformation.setDetectorCode(gardsSampleData.getSiteDetCode());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleData.getSampleType())){
|
||||||
generalInformation.setSystemType(gardsSampleData.getSampleType());
|
generalInformation.setSystemType(gardsSampleData.getSampleType());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleData.getGeometry())){
|
||||||
generalInformation.setSampleGeometry(gardsSampleData.getGeometry());
|
generalInformation.setSampleGeometry(gardsSampleData.getGeometry());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleData.getSpectralQualifie())){
|
||||||
generalInformation.setSpectrumQualifier(gardsSampleData.getSpectralQualifie());
|
generalInformation.setSpectrumQualifier(gardsSampleData.getSpectralQualifie());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSampleData.getTransmitDtg())){
|
||||||
generalInformation.setTransmitDate(DateUtils.formatDate(gardsSampleData.getTransmitDtg(), "yyyy-MM-dd HH:mm:ss"));
|
generalInformation.setTransmitDate(DateUtils.formatDate(gardsSampleData.getTransmitDtg(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSampleData.getAcquisitionStart())){
|
||||||
acquisition.setAcquisitionStartDate(DateUtils.formatDate(gardsSampleData.getAcquisitionStart(), "yyyy-MM-dd HH:mm:ss"));
|
acquisition.setAcquisitionStartDate(DateUtils.formatDate(gardsSampleData.getAcquisitionStart(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSampleData.getAcquisitionRealSec())){
|
||||||
acquisition.setAcquisitionRealTime(gardsSampleData.getAcquisitionRealSec());
|
acquisition.setAcquisitionRealTime(gardsSampleData.getAcquisitionRealSec());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSampleData.getAcquisitionLiveSec())){
|
||||||
acquisition.setAcquisitionLiveTime(gardsSampleData.getAcquisitionLiveSec());
|
acquisition.setAcquisitionLiveTime(gardsSampleData.getAcquisitionLiveSec());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (Objects.nonNull(gardsSampleAux)){
|
if (Objects.nonNull(gardsSampleAux)){
|
||||||
calibration = new Calibration();
|
calibration = new Calibration();
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleAux.getSampleRefId())){
|
||||||
generalInformation.setSampleReferenceIdentification(gardsSampleAux.getSampleRefId());
|
generalInformation.setSampleReferenceIdentification(gardsSampleAux.getSampleRefId());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleAux.getMeasurementId())){
|
||||||
generalInformation.setMeasurementIdentification(gardsSampleAux.getMeasurementId());
|
generalInformation.setMeasurementIdentification(gardsSampleAux.getMeasurementId());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleAux.getBkgdMeasurementId())){
|
||||||
generalInformation.setDetectorBackgroundMeasurementId(gardsSampleAux.getBkgdMeasurementId());
|
generalInformation.setDetectorBackgroundMeasurementId(gardsSampleAux.getBkgdMeasurementId());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleAux.getGasBkgdMeasurementId())){
|
||||||
generalInformation.setGasBackgroundMeasurementId(gardsSampleAux.getGasBkgdMeasurementId());
|
generalInformation.setGasBackgroundMeasurementId(gardsSampleAux.getGasBkgdMeasurementId());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSampleAux.getCalibrationDtg())){
|
||||||
calibration.setDateOfLastCalibration(DateUtils.formatDate(gardsSampleAux.getCalibrationDtg(), "yyyy-MM-dd HH:mm:ss"));
|
calibration.setDateOfLastCalibration(DateUtils.formatDate(gardsSampleAux.getCalibrationDtg(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (Objects.nonNull(gardsSampleDescription)){
|
if (Objects.nonNull(gardsSampleDescription)){
|
||||||
comment = new Comment();
|
comment = new Comment();
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleDescription.getDescription())){
|
||||||
comment.setText(gardsSampleDescription.getDescription());
|
comment.setText(gardsSampleDescription.getDescription());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setHeaderBlock(generalInformation);
|
report.setHeaderBlock(generalInformation);
|
||||||
report.setCommentBlock(comment);
|
report.setCommentBlock(comment);
|
||||||
report.setAcquisitionBlock(acquisition);
|
report.setAcquisitionBlock(acquisition);
|
||||||
|
@ -235,12 +265,14 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
gEnergySubBlock = new LinkedList<>();
|
gEnergySubBlock = new LinkedList<>();
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
GEnergy gEnergy = new GEnergy();
|
GEnergy gEnergy = new GEnergy();
|
||||||
|
if (Objects.nonNull(orig.getYvalue()) && Objects.nonNull(orig.getXvalue()) && Objects.nonNull(orig.getUncyvalue())){
|
||||||
gEnergy.setEnergy(orig.getYvalue());
|
gEnergy.setEnergy(orig.getYvalue());
|
||||||
gEnergy.setCentroid(orig.getXvalue());
|
gEnergy.setCentroid(orig.getXvalue());
|
||||||
gEnergy.setUncertainty(orig.getUncyvalue());
|
gEnergy.setUncertainty(orig.getUncyvalue());
|
||||||
gEnergySubBlock.add(gEnergy);
|
gEnergySubBlock.add(gEnergy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setGEnergyBlock(gEnergySubBlock);
|
report.setGEnergyBlock(gEnergySubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,6 +288,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
bEnergySubBlock = new LinkedList<>();
|
bEnergySubBlock = new LinkedList<>();
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
BEnergy bEnergy = new BEnergy();
|
BEnergy bEnergy = new BEnergy();
|
||||||
|
if (Objects.nonNull(orig.getYvalue()) && Objects.nonNull(orig.getXvalue()) && Objects.nonNull(orig.getUncyvalue()) && Objects.nonNull(orig.getDecayMode())){
|
||||||
bEnergy.setElectronEnergy(orig.getYvalue());
|
bEnergy.setElectronEnergy(orig.getYvalue());
|
||||||
bEnergy.setMaximumChannel(orig.getXvalue());
|
bEnergy.setMaximumChannel(orig.getXvalue());
|
||||||
bEnergy.setUncertainty(orig.getUncyvalue());
|
bEnergy.setUncertainty(orig.getUncyvalue());
|
||||||
|
@ -263,6 +296,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
bEnergySubBlock.add(bEnergy);
|
bEnergySubBlock.add(bEnergy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setBEnergyBlock(bEnergySubBlock);
|
report.setBEnergyBlock(bEnergySubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,12 +312,14 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
gResolutionSubBlock = new LinkedList<>();
|
gResolutionSubBlock = new LinkedList<>();
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
GResolution gResolution = new GResolution();
|
GResolution gResolution = new GResolution();
|
||||||
|
if (Objects.nonNull(orig.getYvalue()) && Objects.nonNull(orig.getXvalue()) && Objects.nonNull(orig.getUncyvalue())){
|
||||||
gResolution.setEnergy(orig.getXvalue());
|
gResolution.setEnergy(orig.getXvalue());
|
||||||
gResolution.setFWHM(orig.getYvalue());
|
gResolution.setFWHM(orig.getYvalue());
|
||||||
gResolution.setUncertainty(orig.getUncyvalue());
|
gResolution.setUncertainty(orig.getUncyvalue());
|
||||||
gResolutionSubBlock.add(gResolution);
|
gResolutionSubBlock.add(gResolution);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setGResolutionBlock(gResolutionSubBlock);
|
report.setGResolutionBlock(gResolutionSubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,12 +335,14 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
bResolutionSubBlock = new LinkedList<>();
|
bResolutionSubBlock = new LinkedList<>();
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
BResolution bResolution = new BResolution();
|
BResolution bResolution = new BResolution();
|
||||||
|
if (Objects.nonNull(orig.getYvalue()) && Objects.nonNull(orig.getXvalue()) && Objects.nonNull(orig.getUncyvalue())){
|
||||||
bResolution.setElectronEnergy(orig.getXvalue());
|
bResolution.setElectronEnergy(orig.getXvalue());
|
||||||
bResolution.setFWHM(orig.getYvalue());
|
bResolution.setFWHM(orig.getYvalue());
|
||||||
bResolution.setUncertainty(orig.getUncyvalue());
|
bResolution.setUncertainty(orig.getUncyvalue());
|
||||||
bResolutionSubBlock.add(bResolution);
|
bResolutionSubBlock.add(bResolution);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setBResolutionBlock(bResolutionSubBlock);
|
report.setBResolutionBlock(bResolutionSubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,12 +358,14 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
gEfficiencySubBlock = new LinkedList<>();
|
gEfficiencySubBlock = new LinkedList<>();
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
GEfficiency gEfficiency = new GEfficiency();
|
GEfficiency gEfficiency = new GEfficiency();
|
||||||
|
if (Objects.nonNull(orig.getYvalue()) && Objects.nonNull(orig.getXvalue()) && Objects.nonNull(orig.getUncyvalue())){
|
||||||
gEfficiency.setEnergy(orig.getXvalue());
|
gEfficiency.setEnergy(orig.getXvalue());
|
||||||
gEfficiency.setEfficiency(orig.getYvalue());
|
gEfficiency.setEfficiency(orig.getYvalue());
|
||||||
gEfficiency.setUncertainty(orig.getUncyvalue());
|
gEfficiency.setUncertainty(orig.getUncyvalue());
|
||||||
gEfficiencySubBlock.add(gEfficiency);
|
gEfficiencySubBlock.add(gEfficiency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setGEfficiencyBlock(gEfficiencySubBlock);
|
report.setGEfficiencyBlock(gEfficiencySubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,6 +378,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
bgEfficiencySubBlock = new LinkedList<>();
|
bgEfficiencySubBlock = new LinkedList<>();
|
||||||
for (GardsBgEfficiencyPairs pairs:gardsBgEfficiencyPairs) {
|
for (GardsBgEfficiencyPairs pairs:gardsBgEfficiencyPairs) {
|
||||||
BEfficiency bEfficiency = new BEfficiency();
|
BEfficiency bEfficiency = new BEfficiency();
|
||||||
|
if (Objects.nonNull(pairs.getRoi()) && Objects.nonNull(pairs.getNuclideName()) && Objects.nonNull(pairs.getBgEfficiency()) && Objects.nonNull(pairs.getBgEfficError())){
|
||||||
bEfficiency.setRoiNumber(pairs.getRoi());
|
bEfficiency.setRoiNumber(pairs.getRoi());
|
||||||
bEfficiency.setNuclideName(pairs.getNuclideName());
|
bEfficiency.setNuclideName(pairs.getNuclideName());
|
||||||
bEfficiency.setCoincidenceEfficiency(pairs.getBgEfficiency());
|
bEfficiency.setCoincidenceEfficiency(pairs.getBgEfficiency());
|
||||||
|
@ -345,6 +386,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
bgEfficiencySubBlock.add(bEfficiency);
|
bgEfficiencySubBlock.add(bEfficiency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setBgEfficiencyBlock(bgEfficiencySubBlock);
|
report.setBgEfficiencyBlock(bgEfficiencySubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,6 +400,8 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
roiLimitsSubBlock = new LinkedList<>();
|
roiLimitsSubBlock = new LinkedList<>();
|
||||||
for (GardsRoiLimits roiLimits:gardsRoiLimitsList) {
|
for (GardsRoiLimits roiLimits:gardsRoiLimitsList) {
|
||||||
Roi roi = new Roi();
|
Roi roi = new Roi();
|
||||||
|
if (Objects.nonNull(roiLimits.getRoi()) && Objects.nonNull(roiLimits.getGEnergyStart()) && Objects.nonNull(roiLimits.getGEnergyStop())
|
||||||
|
&& Objects.nonNull(roiLimits.getBEnergyStart()) && Objects.nonNull(roiLimits.getBEnergyStop()) ){
|
||||||
roi.setRoiNumber(roiLimits.getRoi());
|
roi.setRoiNumber(roiLimits.getRoi());
|
||||||
roi.setRoiGRangeStart(roiLimits.getGEnergyStart());
|
roi.setRoiGRangeStart(roiLimits.getGEnergyStart());
|
||||||
roi.setRoiGRangeStop(roiLimits.getGEnergyStop());
|
roi.setRoiGRangeStop(roiLimits.getGEnergyStop());
|
||||||
|
@ -366,6 +410,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
roiLimitsSubBlock.add(roi);
|
roiLimitsSubBlock.add(roi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setRoiLimitsBlock(roiLimitsSubBlock);
|
report.setRoiLimitsBlock(roiLimitsSubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,6 +424,8 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
ratiosSubBlock = new LinkedList<>();
|
ratiosSubBlock = new LinkedList<>();
|
||||||
for (GardsSampleRatios sampleRatios:sampleRatiosList) {
|
for (GardsSampleRatios sampleRatios:sampleRatiosList) {
|
||||||
Ratios ratios = new Ratios();
|
Ratios ratios = new Ratios();
|
||||||
|
if (Objects.nonNull(sampleRatios.getCountRatio()) && StringUtils.isNotBlank(sampleRatios.getRatioId()) && Objects.nonNull(sampleRatios.getCountRatioErr())
|
||||||
|
&& Objects.nonNull(sampleRatios.getLowerRoiNumber()) && Objects.nonNull(sampleRatios.getUpperRoiNumber()) ){
|
||||||
ratios.setCountRatio(sampleRatios.getCountRatio());
|
ratios.setCountRatio(sampleRatios.getCountRatio());
|
||||||
ratios.setRatioId(sampleRatios.getRatioId());
|
ratios.setRatioId(sampleRatios.getRatioId());
|
||||||
ratios.setCountRatioUncertainty(sampleRatios.getCountRatioErr());
|
ratios.setCountRatioUncertainty(sampleRatios.getCountRatioErr());
|
||||||
|
@ -387,6 +434,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
ratiosSubBlock.add(ratios);
|
ratiosSubBlock.add(ratios);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setRatiosBlock(ratiosSubBlock);
|
report.setRatiosBlock(ratiosSubBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,9 +452,13 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
gSpectrumSubBlock = (List<Integer>)map.get(SampleFileHeader.GSPECTRUM.getMessage());
|
gSpectrumSubBlock = (List<Integer>)map.get(SampleFileHeader.GSPECTRUM.getMessage());
|
||||||
}
|
}
|
||||||
gSpectrumBlock.setGSpectrumSubBlock(gSpectrumSubBlock);
|
gSpectrumBlock.setGSpectrumSubBlock(gSpectrumSubBlock);
|
||||||
|
if (Objects.nonNull(gardsSpectrum.getEnergySpan())){
|
||||||
gSpectrumBlock.setEnergySpan(gardsSpectrum.getEnergySpan());
|
gSpectrumBlock.setEnergySpan(gardsSpectrum.getEnergySpan());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSpectrum.getChannels())){
|
||||||
gSpectrumBlock.setNumberGChannels(gardsSpectrum.getChannels());
|
gSpectrumBlock.setNumberGChannels(gardsSpectrum.getChannels());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setGSpectrumBlock(gSpectrumBlock);
|
report.setGSpectrumBlock(gSpectrumBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,9 +476,13 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
bSpectrumSubBlock = (List<Integer>)map.get(SampleFileHeader.BSPECTRUM.getMessage());
|
bSpectrumSubBlock = (List<Integer>)map.get(SampleFileHeader.BSPECTRUM.getMessage());
|
||||||
}
|
}
|
||||||
bSpectrumBlock.setBSpectrumSubBlock(bSpectrumSubBlock);
|
bSpectrumBlock.setBSpectrumSubBlock(bSpectrumSubBlock);
|
||||||
|
if (Objects.nonNull(gardsSpectrum.getEnergySpan())){
|
||||||
bSpectrumBlock.setEnergySpan(gardsSpectrum.getEnergySpan());
|
bSpectrumBlock.setEnergySpan(gardsSpectrum.getEnergySpan());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSpectrum.getChannels())){
|
||||||
bSpectrumBlock.setNumberBChannels(gardsSpectrum.getChannels());
|
bSpectrumBlock.setNumberBChannels(gardsSpectrum.getChannels());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setBSpectrumBlock(bSpectrumBlock);
|
report.setBSpectrumBlock(bSpectrumBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,11 +499,19 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
histogramSubBlock = (List<HistogramData>)map.get(SampleFileHeader.HISTOGRAM.getMessage());
|
histogramSubBlock = (List<HistogramData>)map.get(SampleFileHeader.HISTOGRAM.getMessage());
|
||||||
}
|
}
|
||||||
histogramBlock.setHistogramSubBlock(histogramSubBlock);
|
histogramBlock.setHistogramSubBlock(histogramSubBlock);
|
||||||
|
if (Objects.nonNull(gardsHistogram.getBChannels())){
|
||||||
histogramBlock.setBChannels(gardsHistogram.getBChannels());
|
histogramBlock.setBChannels(gardsHistogram.getBChannels());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsHistogram.getBEnergySpan())){
|
||||||
histogramBlock.setBEnergySpan(gardsHistogram.getBEnergySpan());
|
histogramBlock.setBEnergySpan(gardsHistogram.getBEnergySpan());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsHistogram.getGChannels())){
|
||||||
histogramBlock.setGChannels(gardsHistogram.getGChannels());
|
histogramBlock.setGChannels(gardsHistogram.getGChannels());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsHistogram.getGEnergySpan())){
|
||||||
histogramBlock.setGEnergySpan(gardsHistogram.getGEnergySpan());
|
histogramBlock.setGEnergySpan(gardsHistogram.getGEnergySpan());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
report.setHistogramBlock(histogramBlock);
|
report.setHistogramBlock(histogramBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,10 +522,17 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
GardsSampleCert gardsSampleCert = gardsSampleCertMapper.selectOne(sampleCertQueryWrapper);
|
GardsSampleCert gardsSampleCert = gardsSampleCertMapper.selectOne(sampleCertQueryWrapper);
|
||||||
if (Objects.nonNull(gardsSampleCert)) {
|
if (Objects.nonNull(gardsSampleCert)) {
|
||||||
certificateBlock = new Certificate();
|
certificateBlock = new Certificate();
|
||||||
|
if (Objects.nonNull(gardsSampleCert.getQuantity())){
|
||||||
certificateBlock.setTotalSourceActivity(gardsSampleCert.getQuantity());
|
certificateBlock.setTotalSourceActivity(gardsSampleCert.getQuantity());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(gardsSampleCert.getAssayDate())){
|
||||||
certificateBlock.setAssayDate(DateUtils.formatDate(gardsSampleCert.getAssayDate(), "yyyy-MM-dd HH:mm:ss"));
|
certificateBlock.setAssayDate(DateUtils.formatDate(gardsSampleCert.getAssayDate(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(gardsSampleCert.getUnit())){
|
||||||
certificateBlock.setUnitsOfActivity(gardsSampleCert.getUnit());
|
certificateBlock.setUnitsOfActivity(gardsSampleCert.getUnit());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
LambdaQueryWrapper<GardsSampleCertLine> sampleCertLineQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<GardsSampleCertLine> sampleCertLineQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
sampleCertLineQueryWrapper.eq(GardsSampleCertLine::getSampleId, sampleId);
|
sampleCertLineQueryWrapper.eq(GardsSampleCertLine::getSampleId, sampleId);
|
||||||
List<GardsSampleCertLine> gardsSampleCertLines = gardsSampleCertLineMapper.selectList(sampleCertLineQueryWrapper);
|
List<GardsSampleCertLine> gardsSampleCertLines = gardsSampleCertLineMapper.selectList(sampleCertLineQueryWrapper);
|
||||||
|
@ -472,15 +543,33 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
List<CertificateLine> certificateSubBlock = new LinkedList<>();
|
List<CertificateLine> certificateSubBlock = new LinkedList<>();
|
||||||
for (GardsSampleCertLine sampleCertLine:gardsSampleCertLines) {
|
for (GardsSampleCertLine sampleCertLine:gardsSampleCertLines) {
|
||||||
CertificateLine certificateLine = new CertificateLine();
|
CertificateLine certificateLine = new CertificateLine();
|
||||||
|
if (StringUtils.isNotBlank(sampleCertLine.getNuclName())){
|
||||||
certificateLine.setNuclideName(sampleCertLine.getNuclName());
|
certificateLine.setNuclideName(sampleCertLine.getNuclName());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(sampleCertLine.getHalflife())){
|
||||||
certificateLine.setHalfLife(sampleCertLine.getHalflife());
|
certificateLine.setHalfLife(sampleCertLine.getHalflife());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(sampleCertLine.getActivity())){
|
||||||
certificateLine.setNuclideActivity(sampleCertLine.getActivity());
|
certificateLine.setNuclideActivity(sampleCertLine.getActivity());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(sampleCertLine.getError())){
|
||||||
certificateLine.setUncertainty(sampleCertLine.getError());
|
certificateLine.setUncertainty(sampleCertLine.getError());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(sampleCertLine.getEnergy())){
|
||||||
certificateLine.setGenergy(sampleCertLine.getEnergy());
|
certificateLine.setGenergy(sampleCertLine.getEnergy());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(sampleCertLine.getAbundance())){
|
||||||
certificateLine.setIntensity(sampleCertLine.getAbundance());
|
certificateLine.setIntensity(sampleCertLine.getAbundance());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(sampleCertLine.getDecayMode())){
|
||||||
certificateLine.setElectronDecayModeDescriptor(sampleCertLine.getDecayMode());
|
certificateLine.setElectronDecayModeDescriptor(sampleCertLine.getDecayMode());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(sampleCertLine.getBEnergy())){
|
||||||
certificateLine.setMaxBParticleEnergy(sampleCertLine.getBEnergy());
|
certificateLine.setMaxBParticleEnergy(sampleCertLine.getBEnergy());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(sampleCertLine.getBAbundance())){
|
||||||
certificateLine.setParticleBIntensity(sampleCertLine.getBAbundance());
|
certificateLine.setParticleBIntensity(sampleCertLine.getBAbundance());
|
||||||
|
}
|
||||||
certificateSubBlock.add(certificateLine);
|
certificateSubBlock.add(certificateLine);
|
||||||
}
|
}
|
||||||
certificateBlock.setCertificateSubBlock(certificateSubBlock);
|
certificateBlock.setCertificateSubBlock(certificateSubBlock);
|
||||||
|
@ -495,7 +584,15 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
||||||
//获取redis中缓存的台站信息
|
//获取redis中缓存的台站信息
|
||||||
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||||
Page<GardsSampleData> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
Page<GardsSampleData> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||||
|
if (Objects.isNull(startTime)){
|
||||||
|
result.error500("开始时间不能为空");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
Date startDate = DateUtils.parseDate(DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
|
Date startDate = DateUtils.parseDate(DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (Objects.isNull(endTime)){
|
||||||
|
result.error500("结束时间不能为空");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
Date endDate = DateUtils.parseDate(DateUtils.formatDate(endTime, "yyyy-MM-dd") + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
|
Date endDate = DateUtils.parseDate(DateUtils.formatDate(endTime, "yyyy-MM-dd") + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
|
||||||
LambdaQueryWrapper<GardsSampleData> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<GardsSampleData> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.in(GardsSampleData::getStationId, stationIds);
|
queryWrapper.in(GardsSampleData::getStationId, stationIds);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user