diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/NumberFormatUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/NumberFormatUtil.java index 94b60649..f66776f4 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/NumberFormatUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/NumberFormatUtil.java @@ -80,6 +80,9 @@ public class NumberFormatUtil { //总数字个数是6位的数 public static String numberSixLen(String number) { + if (StringUtils.isBlank(number)) { + return number; + } String value = ""; if (number.equalsIgnoreCase("nan")) { value = number; diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java index aa5b1a64..9e1d514e 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java @@ -1550,8 +1550,8 @@ public class GammaFileUtil extends AbstractLogOrReport { || newSets.getK_alpha() != oldSets.getK_alpha() || newSets.getK_beta() != oldSets.getK_beta() || newSets.getRiskLevelK() != oldSets.getRiskLevelK() - || newSets.getRefTime_act() != oldSets.getRefTime_act() - || newSets.getRefTime_conc() != oldSets.getRefTime_conc()) + || !newSets.getRefTime_act().equals(oldSets.getRefTime_act()) + || !newSets.getRefTime_conc().equals(oldSets.getRefTime_conc())) { return 1; } diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/AnalysisManService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/AnalysisManService.java index d9969ddf..89462b83 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/AnalysisManService.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/AnalysisManService.java @@ -14,7 +14,8 @@ public interface AnalysisManService { void middleDataTable(Integer idAnalysis, List middleDatas); - void saveAnalysisROI(Integer sampleId, Integer idAnalysis,EnergySpectrumStruct sampleStruct, + void saveAnalysisROI(Integer sampleId, Integer idAnalysis, List roiBBoundaryStart, List roiBBoundaryStop, + List roiGBoundaryStart, List roiGBoundaryStop, List middleDatas, List phdFilePaths); void deleteAnalysisROI(Integer idAnalysis); diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/AnalysisManServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/AnalysisManServiceImpl.java index fb9f8ab1..c33187f3 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/AnalysisManServiceImpl.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/AnalysisManServiceImpl.java @@ -64,9 +64,11 @@ public class AnalysisManServiceImpl implements AnalysisManService { } @Override - public void saveAnalysisROI(Integer sampleId, Integer idAnalysis, EnergySpectrumStruct sampleStruct, List middleDatas, List phdFilePaths) { + public void saveAnalysisROI(Integer sampleId, Integer idAnalysis, List roiBBoundaryStart, + List roiBBoundaryStop, List roiGBoundaryStart, List roiGBoundaryStop, + List middleDatas, List phdFilePaths) { + List analysisRois = new ArrayList<>(); - List roiNumber = sampleStruct.ROI_number; for (int i = 0; i < middleDatas.size(); i++) { GStoreMiddleProcessData middleData = middleDatas.get(i); GardsAnalysisRoi analysisRoi = new GardsAnalysisRoi(); @@ -78,11 +80,11 @@ public class AnalysisManServiceImpl implements AnalysisManService { analysisRoi.setScacPath(middleData.getAnalyses_scac_filePath()); analysisRoi.setLogPath(middleData.getAnalyses_LogPath()); analysisRoi.setReportPath(middleData.getAnalyses_ReportPath()); - analysisRoi.setRoiNum(Integer.valueOf(roiNumber.get(i))); - analysisRoi.setMinX(sampleStruct.POI_B_x1.get(i)); - analysisRoi.setMaxX(sampleStruct.POI_B_x2.get(i)); - analysisRoi.setMinY(sampleStruct.POI_G_y1.get(i)); - analysisRoi.setMaxY(sampleStruct.POI_G_y2.get(i)); + analysisRoi.setRoiNum(i-1); + analysisRoi.setMinX(Double.parseDouble(roiBBoundaryStart.get(i)+"")); + analysisRoi.setMaxX(Double.parseDouble(roiBBoundaryStop.get(i)+"")); + analysisRoi.setMinY(Double.parseDouble(roiGBoundaryStart.get(i)+"")); + analysisRoi.setMaxY(Double.parseDouble(roiGBoundaryStop.get(i)+"")); analysisRois.add(analysisRoi); } analysisRoiManService.saveBatch(analysisRois); diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/SelfStationUtil.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/SelfStationUtil.java index 18c58a2a..d7867321 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/SelfStationUtil.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/SelfStationUtil.java @@ -154,6 +154,9 @@ public class SelfStationUtil extends AbstractLogOrReport { List roiBBoundaryStart = bgBoundary.ROI_B_Boundary_start; List roiBBoundaryStop = bgBoundary.ROI_B_Boundary_stop; + selfStationData.setRoiGBoundaryStart(bgBoundary.ROI_G_Boundary_start); + selfStationData.setRoiGBoundaryStop(bgBoundary.ROI_G_Boundary_stop); + //根据范围1划分 范围1对应的折线图 Map gammaByROI = this.getGammaByROI(systemType, roiBBoundaryStart, roiBBoundaryStop, selfStationData); map.putAll(gammaByROI); @@ -168,8 +171,6 @@ public class SelfStationUtil extends AbstractLogOrReport { List histogramDataDList = new LinkedList<>(); for (int i=0; i 0){ HistogramData his = new HistogramData(); @@ -263,206 +264,6 @@ public class SelfStationUtil extends AbstractLogOrReport { throw new RuntimeException(e); } } - public void loadFile(EnergySpectrumStruct struct, SelfStationData selfStationData, Integer sampleId, String status, String systemType, Map map) { - try { - SelfStationVueData sampleVueData = selfStationData.getSampleVueData(); - SelfStationVueData detVueData = selfStationData.getDetVueData(); - - //封装散点图下的基础数据信息 - SpectrumData spectrumData = new SpectrumData(); - //Station Code - String stationCode = struct.site_code; - //Detector Code - String detectorCode = struct.detector_code; - //Data Type - String dataType = struct.data_type; - //Collection Start - Date CollectionStart = null; - if ( StringUtils.isNotBlank(struct.collection_start_date) && StringUtils.isNotBlank(struct.collection_start_time) ){ - CollectionStart = DateUtils.parseDate(struct.collection_start_date + StringPool.SPACE + struct.collection_start_time); - } - //Collection Stop - Date CollectionStop = null; - if ( StringUtils.isNotBlank(struct.collection_stop_date) && StringUtils.isNotBlank(struct.collection_stop_time) ){ - CollectionStop = DateUtils.parseDate(struct.collection_stop_date + StringPool.SPACE + struct.collection_stop_time); - } - //Collection Time - String CollectionTime = ""; - if ( Objects.nonNull(CollectionStart) && Objects.nonNull(CollectionStop) ){ - CollectionTime = String.format ("%.2f",Double.valueOf((CollectionStop.getTime() - CollectionStart.getTime())/ 1000)); - } - //Acquisition Start - Date AcquisitionStart = null; - if ( StringUtils.isNotBlank(struct.acquisition_start_date) && StringUtils.isNotBlank(struct.acquisition_start_time) ){ - AcquisitionStart = DateUtils.parseDate(struct.acquisition_start_date + StringPool.SPACE + struct.acquisition_start_time); - } - //Acq Real Time - double AcquisitionRealTime = struct.acquisition_real_time; - //Acq live Time - double AcquisitionLiveTime = struct.acquisition_live_time; - //Air Volume[m3] - double airVolume = struct.air_volume; - //Xe Volume[m3] - double xeVolume = struct.sample_volume_of_Xe; - //xeCollectionYield - double xeCollectionYield = struct.Xe_collection_yield; - //gasBkMeasurementId - String gasBkMeasurementId = struct.gas_bk_measurement_id; - //detectorBkMeasurementId - String detectorBkMeasurementId = struct.detector_bk_measurement_id; - //measurementId - String measurementId = struct.measurement_id; - spectrumData.setSampleId(sampleId); - spectrumData.setStatus(status); - spectrumData.setStationCode(stationCode); - spectrumData.setDetectorCode(detectorCode); - spectrumData.setDataType(dataType); - spectrumData.setCollectionStart(CollectionStart); - spectrumData.setCollectionStop(CollectionStop); - spectrumData.setCollectionTime(CollectionTime); - spectrumData.setAcquisitionStart(AcquisitionStart); - 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); - spectrumData.setMeasurementId(measurementId); - map.put("spectrumData", spectrumData); - - //gamma能量部分的计算参数 道值对应能量 - List gEnergy = struct.g_energy; - //gamma能量部分的计算参数 道值 - List gCentroidChannel = struct.g_centroid_channel; - //beta能量部分的计算参数 道值对应的能量 - List bElectronEnergy = struct.b_electron_energy; - //beta能量部分的计算参数 道值 - List bChannel = struct.b_channel; - CalcBgBoundaryParam calcBgBoundaryParam = new CalcBgBoundaryParam(); - calcBgBoundaryParam.g_e_cal = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel); - calcBgBoundaryParam.b_e_cal = EnergySpectrumHandler.GetFileFittingPara(bElectronEnergy, bChannel); - calcBgBoundaryParam.b_energy = struct.b_electron_energy; - calcBgBoundaryParam.b_channel = struct.b_channel; - calcBgBoundaryParam.g_channel = struct.g_centroid_channel; - calcBgBoundaryParam.g_energy = struct.g_energy; - calcBgBoundaryParam.ROI_B_start_x1 = struct.POI_B_x1; - calcBgBoundaryParam.ROI_B_stop_x2 = struct.POI_B_x2; - calcBgBoundaryParam.ROI_G_start_y1 = struct.POI_G_y1; - calcBgBoundaryParam.ROI_G_stop_y2 = struct.POI_G_y2; - BgBoundary bgBoundary = EnergySpectrumHandler.CalcBgBoundary(calcBgBoundaryParam); - // 新beta谱:只取X轴数据从Y轴0的位置开始连成一条线,一直到顶画出矩形框 这个矩形框内的数据就是Gamma谱数据 - List roiBBoundaryStart = bgBoundary.ROI_B_Boundary_start; - List roiBBoundaryStop = bgBoundary.ROI_B_Boundary_stop; - - //根据范围1划分 范围1对应的折线图 - Map gammaByROI = this.getGammaByROI(systemType, roiBBoundaryStart, roiBBoundaryStop, selfStationData); - map.putAll(gammaByROI); - //统计散点图 - //横坐标 beta-gamma - long bChannels = struct.b_channels; - //纵坐标 gamma - long gChannels = struct.g_channels; - //值 - List hCounts = struct.h_counts; - List histogramDataList = new LinkedList<>(); - List histogramDataDList = new LinkedList<>(); - for (int i=0; i 0){ - HistogramData his = new HistogramData(); - his.setG(i); - his.setB(j); - his.setC(count); - histogramDataList.add(his); - histogramDataDList.add(his); - }else { - HistogramData his = new HistogramData(); - his.setG(i); - his.setB(j); - his.setC(count); - histogramDataDList.add(his); - } - } - } - map.put("histogramDataList", histogramDataList); -// map.put("histogramDataDList", histogramDataDList); - //调用算法 传入道值和道值对应的能量 得到计算gamma能量公式的参数 - List gammaParam = EnergySpectrumHandler.GetFileFittingPara(struct.g_centroid_channel, struct.g_energy); - //存储需要计算gamma能量的道值 - List gchannels = new ArrayList<>(); - for (int i=0; i gammaEnergyList = EnergySpectrumHandler.GetFileFittingData(gchannels, gammaParam); - //将gamma能量折线图进行赋值返回 - map.put("gammaEnergyData", gammaEnergyList); - //调用算法 传入道值和道值对应的能量 得到计算beta能量公式的参数 - List betaParam = EnergySpectrumHandler.GetFileFittingPara(struct.b_channel, struct.b_electron_energy); - List bchannels = new ArrayList<>(); - for (int i=0; i betaEnergyList = EnergySpectrumHandler.GetFileFittingData(bchannels, betaParam); - //将beta能量折线图进行赋值返回 - map.put("betaEnergyData", betaEnergyList); - - //g_Energy - if (CollectionUtils.isNotEmpty(struct.g_energy) && CollectionUtils.isNotEmpty(struct.g_centroid_channel) && CollectionUtils.isNotEmpty(struct.g_uncertainty) && Objects.nonNull(struct.g_record_count)) { - if (systemType.equals("sample")) { - GEnergyBlock gEnergyBlock = new GEnergyBlock(); - gEnergyBlock.setG_energy(struct.g_energy); - gEnergyBlock.setCentroid_channel(struct.g_centroid_channel); - gEnergyBlock.setUncertainty(struct.g_uncertainty); - gEnergyBlock.setRecord_count(struct.g_record_count); - sampleVueData.getMapEnerKD().put(CalName.CalPHD.getType(), gEnergyBlock); - //计算得到公式的参数 - List calEnergyParam = CalValuesHandler.calFitPara("Cal_Energy", 2, struct.g_centroid_channel, struct.g_energy, struct.g_uncertainty); - ParameterInfo parameterInfo = new ParameterInfo(); - parameterInfo.setP(calEnergyParam); - sampleVueData.getMapEnerPara().put(CalName.CalPHD.getType(), parameterInfo); - } - } - //g_Resolution - if (CollectionUtils.isNotEmpty(struct.g_r_energy) && CollectionUtils.isNotEmpty(struct.g_r_FWHM) && CollectionUtils.isNotEmpty(struct.g_r_uncertainty) && Objects.nonNull(struct.g_r_record_count)) { - if (systemType.equals("sample")) { - GResolutionBlock gResolutionBlock = new GResolutionBlock(); - gResolutionBlock.setG_energy(struct.g_r_energy); - gResolutionBlock.setFWHM(struct.g_r_FWHM); - gResolutionBlock.setUncertainty(struct.g_r_uncertainty); - gResolutionBlock.setRecord_count(struct.g_r_record_count); - sampleVueData.getMapResoKD().put(CalName.CalPHD.getType(), gResolutionBlock); - //计算得到公式的参数 - List calEnergyParam = CalValuesHandler.calFitPara("Cal_Resolution", 4, struct.g_r_energy, struct.g_r_FWHM, struct.g_r_uncertainty); - ParameterInfo parameterInfo = new ParameterInfo(); - parameterInfo.setP(calEnergyParam); - sampleVueData.getMapResoPara().put(CalName.CalPHD.getType(), parameterInfo); - } - } - //g_Efficiency - if (CollectionUtils.isNotEmpty(struct.g_e_energy) && CollectionUtils.isNotEmpty(struct.g_e_efficiency) && CollectionUtils.isNotEmpty(struct.g_e_uncertainty) && Objects.nonNull(struct.g_e_record_count)) { - if (systemType.equals("sample")) { - GEfficiencyBlock gEfficiencyBlock = new GEfficiencyBlock(); - gEfficiencyBlock.setG_energy(struct.g_e_energy); - gEfficiencyBlock.setEfficiency(struct.g_e_efficiency); - gEfficiencyBlock.setUncertainty(struct.g_e_uncertainty); - gEfficiencyBlock.setRecord_count(struct.g_e_record_count); - sampleVueData.getMapEffiKD().put(CalName.CalPHD.getType(), gEfficiencyBlock); - //计算得到公式的参数 - List calEnergyParam = CalValuesHandler.calFitPara("Cal_Efficiency", 1, struct.g_e_energy, struct.g_e_efficiency, struct.g_e_uncertainty); - ParameterInfo parameterInfo = new ParameterInfo(); - parameterInfo.setP(calEnergyParam); - sampleVueData.getMapEffiPara().put(CalName.CalPHD.getType(), parameterInfo); - } - } - } catch (ParseException e) { - throw new RuntimeException(e); - } - } /** * 根据文件路径,类型获取对应的解析文件内容并返回进行存储 @@ -634,6 +435,10 @@ public class SelfStationUtil extends AbstractLogOrReport { public Map getGammaByROI(String systemType, List roiBBoundaryStart, List roiBBoundaryStop, SelfStationData selfStationData) { + + selfStationData.setRoiBBoundaryStart(roiBBoundaryStart); + selfStationData.setRoiBBoundaryStop(roiBBoundaryStop); + Map map = new HashMap<>(); EnergySpectrumStruct struct = selfStationData.getSampleStruct(); @@ -740,121 +545,6 @@ public class SelfStationUtil extends AbstractLogOrReport { return map; } - public Map getGammaByROI1(String systemType, List roiBBoundaryStart, List roiBBoundaryStop, - SelfStationData selfStationData) { - Map map = new HashMap<>(); - - - - EnergySpectrumStruct struct = selfStationData.getSampleStruct(); - long betaChannels = struct.b_channels, gammaChannels = struct.g_channels; - List h_counts = struct.h_counts; - - SelfStationVueData sampleVueData = selfStationData.getSampleVueData(); - SelfStationVueData detVueData = selfStationData.getDetVueData(); - - for (int r = 0; r < roiBBoundaryStart.size(); r++) { - List seriseDataList = new LinkedList<>(); - // g_counts - List counts = new LinkedList<>(); - //存储同一列不同行加和后的数量 - List sumList = new LinkedList<>(); - String roiStart = "", roiStop= "", roiList = ""; - - //根据范围划分 范围对应的折线图 - int startChannel = roiBBoundaryStart.get(r); - int endChannel = roiBBoundaryStop.get(r); - //遍历所有列 - for (int i=0; i 0 && index < h_counts.size()) { - count = h_counts.get(index); - } - sum+=count; - } - seriseData.setY(sum); - sumList.add(sum); - counts.add((long) sum); - seriseDataList.add(seriseData); - } - switch (r){ - case 0: - roiStart = "ROIOneStart"; - roiStop = "ROIOneStop"; - roiList = "ROIOneList"; - if (systemType.equals("sample")) { - sampleVueData.setROIOneBetaStart(startChannel); - sampleVueData.setROIOneBetaStop(endChannel); - sampleVueData.setROIOneList(seriseDataList); - sampleVueData.setROIOneCounts(counts); - } else if (systemType.equals("det")) { - detVueData.setROIOneBetaStart(startChannel); - detVueData.setROIOneBetaStop(endChannel); - detVueData.setROIOneList(seriseDataList); - } - break; - case 1: - roiStart = "ROITwoStart"; - roiStop = "ROITwoStop"; - roiList = "ROITwoList"; - if (systemType.equals("sample")) { - sampleVueData.setROITwoBetaStart(startChannel); - sampleVueData.setROITwoBetaStop(endChannel); - sampleVueData.setROITwoList(seriseDataList); - sampleVueData.setROITwoCounts(counts); - } else if (systemType.equals("det")) { - detVueData.setROITwoBetaStart(startChannel); - detVueData.setROITwoBetaStop(endChannel); - detVueData.setROITwoList(seriseDataList); - } - break; - case 2: - roiStart = "ROIThreeStart"; - roiStop = "ROIThreeStop"; - roiList = "ROIThreeList"; - if (systemType.equals("sample")) { - sampleVueData.setROIThreeBetaStart(startChannel); - sampleVueData.setROIThreeBetaStop(endChannel); - sampleVueData.setROIThreeList(seriseDataList); - sampleVueData.setROIThreeCounts(counts); - } else if (systemType.equals("det")) { - detVueData.setROIThreeBetaStart(startChannel); - detVueData.setROIThreeBetaStop(endChannel); - detVueData.setROIThreeList(seriseDataList); - } - break; - case 3: - roiStart = "ROIFourStart"; - roiStop = "ROIFourStop"; - roiList = "ROIFourList"; - if (systemType.equals("sample")) { - sampleVueData.setROIFourBetaStart(startChannel); - sampleVueData.setROIFourBetaStop(endChannel); - sampleVueData.setROIFourList(seriseDataList); - sampleVueData.setROIFourCounts(counts); - } else if (systemType.equals("det")) { - detVueData.setROIFourBetaStart(startChannel); - detVueData.setROIFourBetaStop(endChannel); - detVueData.setROIFourList(seriseDataList); - } - break; - } - - map.put(roiStart, startChannel); - map.put(roiStop, endChannel); - } - - return map; - } - public List roiList(Integer startChannel, Integer endChannel, long betaChannels, long gammaChannels, List h_counts) { // g_counts List counts = new LinkedList<>(); diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/SelfStationData.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/SelfStationData.java index b76f471c..9ab8e0f0 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/SelfStationData.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/entity/vo/SelfStationData.java @@ -81,6 +81,24 @@ public class SelfStationData implements Serializable { private List> betaNewEnergyListNow; + /** + * roi limit beta start + */ + List roiBBoundaryStart; + /** + * roi limit beta stop + */ + List roiBBoundaryStop; + + /** + * roi limit gamma start + */ + List roiGBoundaryStart; + /** + * roi limit gamma stop + */ + List roiGBoundaryStop; + //分析用到的信息 private BgCalibratePara bgPara; diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SelfStationServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SelfStationServiceImpl.java index 1854c64a..72615c85 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SelfStationServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SelfStationServiceImpl.java @@ -245,7 +245,8 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf //返回结果map Map map = new HashMap<>(); //获取sample分析后的对象 - EnergySpectrumStruct struct = selfStationUtil.getSourceData(sampleFilePath, "sample", selfStationData); + selfStationUtil.getSourceDataNotHis(sampleFilePath, "sample", selfStationData); + EnergySpectrumStruct struct = selfStationData.getSampleStruct(); if (Objects.nonNull(struct)) { selfStationData.setSampleStruct(struct); selfStationData.setSampleTmpPath(sampleFilePath); @@ -257,15 +258,25 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf LinkedList stop = Lists.newLinkedList(); for (GardsAnalysisRoi f : roiList) { start.add(f.getRoiNum() -1, f.getMinX().intValue()); - stop.add(f.getRoiNum() -1, f.getMinY().intValue()); + stop.add(f.getRoiNum() -1, f.getMaxX().intValue()); } - Map gammaByROI = selfStationUtil.getGammaByROI1("", start, stop, selfStationData); + Map gammaByROI = selfStationUtil.getGammaByROI("", start, stop, selfStationData); map.putAll(gammaByROI); } // 将四个Gamma ROI文件对象放到缓存中 SelfStationVueData sampleVueData = selfStationData.getSampleVueData(); + // 用于下次分析判断是否更新 + sampleVueData.setUsedROIOneBetaStart(sampleVueData.getROIOneBetaStart()); + sampleVueData.setUsedROIOneBetaStop(sampleVueData.getROIOneBetaStop()); + sampleVueData.setUsedROITwoBetaStart(sampleVueData.getROITwoBetaStart()); + sampleVueData.setUsedROITwoBetaStop(sampleVueData.getROITwoBetaStop()); + sampleVueData.setUsedROIThreeBetaStart(sampleVueData.getROIThreeBetaStart()); + sampleVueData.setUsedROIThreeBetaStop(sampleVueData.getROIThreeBetaStop()); + sampleVueData.setUsedROIFourBetaStart(sampleVueData.getROIFourBetaStart()); + sampleVueData.setUsedROIFourBetaStop(sampleVueData.getROIFourBetaStop()); + Map roiPathMap = roiPaths.stream() .collect(Collectors.toMap(RoiDto::getRoiNum, RoiDto::getPhdPath)); @@ -317,7 +328,8 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf //返回结果map Map map = new HashMap<>(); //获取sample分析后的对象 - EnergySpectrumStruct struct = selfStationUtil.getSourceData(detFilePath, "det", selfStationData); + selfStationUtil.getSourceDataNotHis(detFilePath, "det", selfStationData); + EnergySpectrumStruct struct = selfStationData.getDetStruct(); if (Objects.nonNull(struct)) { selfStationData.setDetStruct(struct); selfStationData.setDetTmpPath(detFilePath); @@ -336,7 +348,8 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf //返回结果map Map map = new HashMap<>(); //获取sample分析后的对象 - EnergySpectrumStruct struct = selfStationUtil.getSourceData(qcFilePath, "qc", selfStationData); + selfStationUtil.getSourceDataNotHis(qcFilePath, "qc", selfStationData); + EnergySpectrumStruct struct = selfStationData.getQcStruct(); if (Objects.nonNull(struct)) { selfStationData.setQcStruct(struct); selfStationData.setQcTmpPath(qcFilePath); @@ -388,7 +401,7 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf start.add(f.getRoiNum() -1, f.getMinX().intValue()); stop.add(f.getRoiNum() -1, f.getMinY().intValue()); } - Map gammaByROI = selfStationUtil.getGammaByROI1("", start, stop, selfStationData); + Map gammaByROI = selfStationUtil.getGammaByROI("", start, stop, selfStationData); map.putAll(gammaByROI); } @@ -2628,7 +2641,7 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf private List betaAnalyse(SelfStationData selfStationData, Map nuclideLinesMap) throws Exception { SelfStationVueData sampleData = selfStationData.getSampleVueData(); EnergySpectrumStruct struct = selfStationData.getSampleStruct(); - String phdPath = selfStationData.getSampleFilePathName(); + String phdPath = selfStationData.getSampleTmpPath(); // 获取自建台站参数 SelfParameter selfParameter = (SelfParameter) redisUtil.get(RedisConstant.SELF_PARAMETER); HashMap nuclideMap = selfParameter.getNuclideMap(); @@ -2658,6 +2671,8 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf } xeData.setMdc(Double.valueOf(NumberFormatUtil.numberSixLen(String.valueOf(xeData.getMdc())))); xeData.setConc(Double.valueOf(NumberFormatUtil.numberSixLen(String.valueOf(xeData.getConc())))); + xeData.setConcErr(Double.valueOf(NumberFormatUtil.numberSixLen(String.valueOf(xeData.getConcErr())))); + xeData.setMda(Double.valueOf(NumberFormatUtil.numberSixLen(String.valueOf(xeData.getMda())))); } } } @@ -5606,7 +5621,10 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf analysisManService.deleteAnalySetting(idAnalysis); } // 向 RNMAN.GARDS_ANALYSES_ROI 表插入数据 - analysisManService.saveAnalysisROI(sampleId, idAnalysis, sampleStruct, middleDatas, phdFilePaths); + analysisManService.saveAnalysisROI(sampleId, idAnalysis, selfStationData.getRoiBBoundaryStart(), + selfStationData.getRoiBBoundaryStop(), selfStationData.getRoiGBoundaryStart(), selfStationData.getRoiGBoundaryStop(), + middleDatas, phdFilePaths); + // 获取Map IdAnalysis:RoiId:GStoreMiddleProcessData analysisManService.middleDataTable(idAnalysis, middleDatas); // 向 RNMAN.GARDS_CALIBRATION_PAIRS 表写入 Energy 刻度数据对