web页面查看详情内容接口返回数据判断逻辑修改

This commit is contained in:
qiaoqinzheng 2023-11-22 09:12:09 +08:00
parent b3f9c7d3fb
commit fa943742db

View File

@ -590,7 +590,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleType, "G");
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleId, sampleId);
// GardsSpectrum gardsSpectrum = gardsSpectrumMapper.selectOne(spectrumQueryWrapper);
if (Objects.nonNull(sourceData)){
if (CollectionUtils.isNotEmpty(sourceData.g_counts)){
gSpectrumBlock = new GammaSpectrum();
// Map<String, Object> map = readLineUtil.readLine(gardsSpectrum.getFilename(), SampleFileHeader.GSPECTRUM.getMessage());
// List<Integer> gSpectrumSubBlock = new LinkedList<>();
@ -614,7 +614,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleType, "B");
// spectrumQueryWrapper.eq(GardsSpectrum::getSampleId, sampleId);
// GardsSpectrum gardsSpectrum = gardsSpectrumMapper.selectOne(spectrumQueryWrapper);
if (Objects.nonNull(sourceData)){
if (CollectionUtils.isNotEmpty(sourceData.b_counts)){
bSpectrumBlock = new BetaSpectrum();
// Map<String, Object> map = readLineUtil.readLine(gardsSpectrum.getFilename(), SampleFileHeader.BSPECTRUM.getMessage());
// List<Integer> bSpectrumSubBlock = new LinkedList<>();
@ -637,7 +637,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
// LambdaQueryWrapper<GardsHistogram> histogramQueryWrapper = new LambdaQueryWrapper<>();
// histogramQueryWrapper.eq(GardsHistogram::getSampleId, sampleId);
// GardsHistogram gardsHistogram = gardsHistogramMapper.selectOne(histogramQueryWrapper);
if (Objects.nonNull(sourceData)){
if (CollectionUtils.isNotEmpty(sourceData.h_counts)){
histogramBlock = new Histogram();
List<HistogramData> histogramSubBlock = readValue(sourceData);
// Map<String, Object> map = readLineUtil.readLine(gardsHistogram.getFilename(), SampleFileHeader.HISTOGRAM.getMessage());
@ -668,19 +668,12 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
// sampleCertQueryWrapper.eq(GardsSampleCert::getSampleId, sampleId);
// GardsSampleCert gardsSampleCert = gardsSampleCertMapper.selectOne(sampleCertQueryWrapper);
try {
if (Objects.nonNull(sourceData)) {
if (Objects.nonNull(sourceData.total_source_activity) && StringUtils.isNotBlank(sourceData.assay_date) && StringUtils.isNotBlank(sourceData.assay_time) && StringUtils.isNotBlank(sourceData.units_activity)) {
certificateBlock = new Certificate();
if (Objects.nonNull(sourceData.total_source_activity)){
certificateBlock.setTotalSourceActivity(sourceData.total_source_activity);
}
if (StringUtils.isNotBlank(sourceData.assay_date) && StringUtils.isNotBlank(sourceData.assay_time)){
Date assayDate = DateUtils.parseDate(sourceData.assay_date + " " + sourceData.assay_time);
certificateBlock.setAssayDate(DateUtils.formatDate(assayDate, "yyyy-MM-dd HH:mm:ss"));
}
if (StringUtils.isNotBlank(sourceData.units_activity)){
certificateBlock.setUnitsOfActivity(sourceData.units_activity);
}
certificateBlock.setTotalSourceActivity(sourceData.total_source_activity);
Date assayDate = DateUtils.parseDate(sourceData.assay_date + " " + sourceData.assay_time);
certificateBlock.setAssayDate(DateUtils.formatDate(assayDate, "yyyy-MM-dd HH:mm:ss"));
certificateBlock.setUnitsOfActivity(sourceData.units_activity);
}
// LambdaQueryWrapper<GardsSampleCertLine> sampleCertLineQueryWrapper = new LambdaQueryWrapper<>();
// sampleCertLineQueryWrapper.eq(GardsSampleCertLine::getSampleId, sampleId);