人工交互模块Beta部分页面回显XeData数据末尾0数据丢失问题修改
新增实体类GardsXeResultsView用于封装页面展示数据 PHDFileUtil增加viewXeData处理页面展示数据
This commit is contained in:
parent
9c01b2664f
commit
f06261a8dc
|
@ -30,13 +30,13 @@ public class SpectrumData implements Serializable {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date acquisitionStart;
|
||||
|
||||
private double acquisitionRealTime;
|
||||
private String acquisitionRealTime;
|
||||
|
||||
private double acquisitionLiveTime;
|
||||
private String acquisitionLiveTime;
|
||||
|
||||
private double airVolume;
|
||||
private String airVolume;
|
||||
|
||||
private double xeVolume;
|
||||
private String xeVolume;
|
||||
|
||||
private double yield;
|
||||
|
||||
|
|
|
@ -16,10 +16,7 @@ import org.jeecg.modules.base.entity.rnman.GardsXeResults;
|
|||
import org.jeecg.modules.base.enums.DataType;
|
||||
import org.jeecg.modules.base.enums.DataTypeAbbr;
|
||||
import org.jeecg.modules.base.enums.XeNuclideName;
|
||||
import org.jeecg.modules.entity.GardsCalibrationSpectrum;
|
||||
import org.jeecg.modules.entity.GardsROIChannelsSpectrum;
|
||||
import org.jeecg.modules.entity.GardsROIResultsSpectrum;
|
||||
import org.jeecg.modules.entity.GardsXeResultsSpectrum;
|
||||
import org.jeecg.modules.entity.*;
|
||||
import org.jeecg.modules.entity.vo.*;
|
||||
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
||||
import org.jeecg.modules.native_jni.struct.BgAnalyseResult;
|
||||
|
@ -100,10 +97,10 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
spectrumData.setCollectionStop(CollectionStop);
|
||||
spectrumData.setCollectionTime(CollectionTime);
|
||||
spectrumData.setAcquisitionStart(AcquisitionStart);
|
||||
spectrumData.setAcquisitionRealTime(AcquisitionRealTime);
|
||||
spectrumData.setAcquisitionLiveTime(AcquisitionLiveTime);
|
||||
spectrumData.setAirVolume(airVolume);
|
||||
spectrumData.setXeVolume(xeVolume);
|
||||
spectrumData.setAcquisitionRealTime(String.format("%.2f", AcquisitionRealTime));
|
||||
spectrumData.setAcquisitionLiveTime(String.format("%.2f", AcquisitionLiveTime));
|
||||
spectrumData.setAirVolume(String.format("%.5f", airVolume));
|
||||
spectrumData.setXeVolume(String.format("%.5f", xeVolume));
|
||||
spectrumData.setYield(xeCollectionYield);
|
||||
spectrumData.setGasBkMeasurementId(gasBkMeasurementId);
|
||||
spectrumData.setDetectorBkMeasurementId(detectorBkMeasurementId);
|
||||
|
@ -354,7 +351,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
List<Double> collectionTimeSections = sections.getCollectionTimeSections();
|
||||
List<Double> acquisitionTimeSections = sections.getAcquisitionTimeSections();
|
||||
List<Double> xeVolumeSections = sections.getXeVolumeSections();
|
||||
double airVolume = sampleSpectrumData.getAirVolume();
|
||||
double airVolume = Double.parseDouble(sampleSpectrumData.getAirVolume());
|
||||
if (Objects.nonNull(airVolume)){
|
||||
// air volume check
|
||||
if (airVolumeSections.get(0) < airVolume && airVolume <= airVolumeSections.get(1)) { // red
|
||||
|
@ -406,7 +403,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
qcMap.put("CollectTimeBtn", "RedLight");
|
||||
}
|
||||
}
|
||||
double acquisitionLiveTime = sampleSpectrumData.getAcquisitionLiveTime();
|
||||
double acquisitionLiveTime = Double.parseDouble(sampleSpectrumData.getAcquisitionLiveTime());
|
||||
if (Objects.nonNull(acquisitionLiveTime)){
|
||||
acquisitionLiveTime = acquisitionLiveTime/3600;
|
||||
// acquisition time check
|
||||
|
@ -1990,4 +1987,21 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
}
|
||||
|
||||
public List<GardsXeResultsView> viewXeData(List<GardsXeResultsSpectrum> xeResultsSpectrumList) {
|
||||
List<GardsXeResultsView> xeResultsViewList = new LinkedList<>();
|
||||
if (CollectionUtils.isNotEmpty(xeResultsSpectrumList)) {
|
||||
for (GardsXeResultsSpectrum xeResultsSpectrum:xeResultsSpectrumList) {
|
||||
GardsXeResultsView xeResultsView = new GardsXeResultsView();
|
||||
xeResultsView.setNuclideName(xeResultsSpectrum.getNuclideName());
|
||||
xeResultsView.setConc(NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getConc())));
|
||||
xeResultsView.setMdc(NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getMdc())));
|
||||
xeResultsView.setConcErr(NumberFormatUtil.numberSixLen(String.valueOf(xeResultsSpectrum.getConcErr())));
|
||||
xeResultsView.setNidFlag(xeResultsSpectrum.getNidFlag());
|
||||
xeResultsView.setColor(xeResultsSpectrum.getColor());
|
||||
xeResultsViewList.add(xeResultsView);
|
||||
}
|
||||
}
|
||||
return xeResultsViewList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class GardsXeResultsView implements Serializable {
|
||||
|
||||
/**
|
||||
* 核素名称
|
||||
*/
|
||||
private String nuclideName;
|
||||
/**
|
||||
* 感兴趣区活度浓度
|
||||
*/
|
||||
private String conc;
|
||||
|
||||
/**
|
||||
* 感兴趣区活度浓度不确定度
|
||||
*/
|
||||
private String concErr;
|
||||
/**
|
||||
* 感兴趣区MDC
|
||||
*/
|
||||
private String mdc;
|
||||
/**
|
||||
* 感兴趣区LC
|
||||
*/
|
||||
private String lc;
|
||||
/**
|
||||
* 感兴趣区识别标示;1:识别到,0,未识别到
|
||||
*/
|
||||
private Integer nidFlag;
|
||||
|
||||
private String color;
|
||||
|
||||
}
|
|
@ -4439,18 +4439,37 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
try {
|
||||
String collect_start = phd.getCollect().getCollection_start_date() + StringPool.SPACE + phd.getCollect().getCollection_start_time();
|
||||
String collect_stop = phd.getCollect().getCollection_stop_date() + StringPool.SPACE + phd.getCollect().getCollection_stop_time();
|
||||
String acq_start = phd.getAcq().getAcquisition_start_date() + StringPool.SPACE + phd.getAcq().getAcquisition_start_time();
|
||||
Date collect_stop_dt = DateUtils.parseDate(collect_stop);
|
||||
Date collect_start_dt = DateUtils.parseDate(collect_start);
|
||||
double Sampling_Time = ((collect_stop_dt.getTime() - collect_start_dt.getTime()) / 1000) / 3600.0;
|
||||
|
||||
Date acq_start_dt = DateUtils.parseDate(acq_start);
|
||||
double Decay_Time = ((acq_start_dt.getTime() - collect_stop_dt.getTime()) / 1000) / 3600.0;
|
||||
long secs = (long) (acq_start_dt.getTime() + (phd.getAcq().getAcquisition_real_time() * 1000));
|
||||
String acq_stop = DateUtils.formatDate(new Date(secs), "yyyy/MM/dd HH:mm:ss.S");
|
||||
|
||||
String collect_start = "";
|
||||
Date collect_start_dt = null;
|
||||
if (StringUtils.isNotBlank(phd.getCollect().getCollection_start_date()) && StringUtils.isNotBlank(phd.getCollect().getCollection_start_time())) {
|
||||
collect_start = phd.getCollect().getCollection_start_date() + StringPool.SPACE + phd.getCollect().getCollection_start_time();
|
||||
collect_start_dt = DateUtils.parseDate(collect_start);
|
||||
}
|
||||
String collect_stop = "";
|
||||
Date collect_stop_dt = null;
|
||||
if (StringUtils.isNotBlank(phd.getCollect().getCollection_stop_date()) && StringUtils.isNotBlank(phd.getCollect().getCollection_stop_time())) {
|
||||
collect_stop = phd.getCollect().getCollection_stop_date() + StringPool.SPACE + phd.getCollect().getCollection_stop_time();
|
||||
collect_stop_dt = DateUtils.parseDate(collect_stop);
|
||||
}
|
||||
String acq_start = "";
|
||||
Date acq_start_dt = null;
|
||||
if (StringUtils.isNotBlank(phd.getAcq().getAcquisition_start_date()) && StringUtils.isNotBlank(phd.getAcq().getAcquisition_start_time())) {
|
||||
acq_start = phd.getAcq().getAcquisition_start_date() + StringPool.SPACE + phd.getAcq().getAcquisition_start_time();
|
||||
acq_start_dt = DateUtils.parseDate(acq_start);
|
||||
}
|
||||
double Sampling_Time = 0.0;
|
||||
if (Objects.nonNull(collect_stop_dt) && Objects.nonNull(collect_start_dt)) {
|
||||
Sampling_Time = ((collect_stop_dt.getTime() - collect_start_dt.getTime()) / 1000) / 3600.0;
|
||||
}
|
||||
double Decay_Time = 0.0;
|
||||
if (Objects.nonNull(acq_start_dt) && Objects.nonNull(collect_stop_dt)) {
|
||||
Decay_Time = ((acq_start_dt.getTime() - collect_stop_dt.getTime()) / 1000) / 3600.0;
|
||||
}
|
||||
String acq_stop = "";
|
||||
if (Objects.nonNull(acq_start_dt)) {
|
||||
long secs = (long) (acq_start_dt.getTime() + (phd.getAcq().getAcquisition_real_time() * 1000));
|
||||
acq_stop = DateUtils.formatDate(new Date(secs), "yyyy/MM/dd HH:mm:ss.S");
|
||||
}
|
||||
map.put("stationId", phd.getHeader().getSite_code());
|
||||
map.put("sampleId", phd.getId_sample());
|
||||
map.put("sampleQuantity", String.format("%.2f", phd.getCollect().getAir_volume()) + " m3");
|
||||
|
|
|
@ -530,7 +530,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
betaDataFile.setBetaCalibrationPairsList(betaCalibrationPairsList);
|
||||
betaDataFile.setXeResultsSpectrumList(xeResultsSpectrumList);
|
||||
betaDataFile.setSaveAnalysisResult(true);
|
||||
resultMap.put("XeData", xeResultsSpectrumList);
|
||||
resultMap.put("XeData", phdFileUtil.viewXeData(xeResultsSpectrumList));
|
||||
resultMap.put("bProcessed", betaDataFile.isBProcessed());
|
||||
resultMap.put("savedAnalysisResult", betaDataFile.isSaveAnalysisResult());
|
||||
cache.put(betaDataFile.getSampleFileName()+"-"+userName, betaDataFile);
|
||||
|
@ -651,7 +651,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
xeData.setConcErr(Double.valueOf(NumberFormatUtil.numberSixLen(String.valueOf(xeData.getConcErr()))));
|
||||
}
|
||||
}
|
||||
resultMap.put("XeData", xeResultsSpectrumList);
|
||||
resultMap.put("XeData", phdFileUtil.viewXeData(xeResultsSpectrumList));
|
||||
resultMap.put("bProcessed", betaDataFile.isBProcessed());
|
||||
resultMap.put("savedAnalysisResult", betaDataFile.isSaveAnalysisResult());
|
||||
cache.put(betaDataFile.getSampleFileName()+"-"+userName, betaDataFile);
|
||||
|
@ -1973,8 +1973,8 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
if (Objects.nonNull(struct)) {
|
||||
//Acquisition
|
||||
String acquisitionStart = struct.acquisition_start_date + StringPool.SPACE + struct.acquisition_start_time;
|
||||
String acquisitionRealTime = String.valueOf(struct.acquisition_real_time);
|
||||
String acquisitionLiveTime = String.valueOf(struct.acquisition_live_time);
|
||||
double acquisitionRealTime = Double.parseDouble(String.format("%.1f", struct.acquisition_real_time));
|
||||
double acquisitionLiveTime = Double.parseDouble(String.format("%.1f", struct.acquisition_live_time));
|
||||
map.put("acquisitionStart", acquisitionStart);
|
||||
map.put("acquisitionRealTime", acquisitionRealTime);
|
||||
map.put("acquisitionLiveTime", acquisitionLiveTime);
|
||||
|
@ -5968,10 +5968,10 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
spectrumData.setCollectionStop(CollectionStop);
|
||||
spectrumData.setCollectionTime(CollectionTime);
|
||||
spectrumData.setAcquisitionStart(AcquisitionStart);
|
||||
spectrumData.setAcquisitionRealTime(AcquisitionRealTime);
|
||||
spectrumData.setAcquisitionLiveTime(AcquisitionLiveTime);
|
||||
spectrumData.setAirVolume(airVolume);
|
||||
spectrumData.setXeVolume(xeVolume);
|
||||
spectrumData.setAcquisitionRealTime(String.format("%.2f", AcquisitionRealTime));
|
||||
spectrumData.setAcquisitionLiveTime(String.format("%.2f", AcquisitionLiveTime));
|
||||
spectrumData.setAirVolume(String.format("%.5f", airVolume));
|
||||
spectrumData.setXeVolume(String.format("%.5f", xeVolume));
|
||||
spectrumData.setYield(xeCollectionYield);
|
||||
spectrumData.setGasBkMeasurementId(gasBkMeasurementId);
|
||||
spectrumData.setDetectorBkMeasurementId(detectorBkMeasurementId);
|
||||
|
|
Loading…
Reference in New Issue
Block a user