SpectrumPathProperties新增用户上传文件路径
修改base.vo下实体类内容 新增GammaDataBase.db文件 新增查看当前用户是否有过当前台站的排班任务方法 新增DBUtil实现读取DB文件内容 新增gammaByFile接口,实现从本地读取文件内容
This commit is contained in:
parent
b50cf9325b
commit
a1c64c5f26
|
@ -31,6 +31,11 @@ public class SpectrumPathProperties implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String logPath;
|
private String logPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户上传文件路径
|
||||||
|
*/
|
||||||
|
private String uploadPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 能谱文件存储路径以能谱系统类型/能谱类型为key,以存储路径为value
|
* 能谱文件存储路径以能谱系统类型/能谱类型为key,以存储路径为value
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -37,6 +37,12 @@ public class AnalyseData implements Serializable {
|
||||||
private List<Integer> sampleIds;
|
private List<Integer> sampleIds;
|
||||||
|
|
||||||
public AnalyseData(){
|
public AnalyseData(){
|
||||||
|
sampleData = false;
|
||||||
|
GasBgData = false;
|
||||||
|
DetBgData = false;
|
||||||
|
QCData = false;
|
||||||
|
bGammaEnergyValid = false;
|
||||||
|
bBetaEnergyValid = false;
|
||||||
g_calibration_param = new CalibrationParam();
|
g_calibration_param = new CalibrationParam();
|
||||||
b_calibration_param = new CalibrationParam();
|
b_calibration_param = new CalibrationParam();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,47 @@
|
||||||
package org.jeecg.modules.base.vo;
|
package org.jeecg.modules.base.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ConfigureData implements Serializable {
|
public class ConfigureData implements Serializable {
|
||||||
|
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
private Double ECutAnalysis_Low;
|
||||||
|
|
||||||
|
private Double ECutAnalysis_High;
|
||||||
|
|
||||||
|
private Double EnergyTolerance;
|
||||||
|
|
||||||
|
private Double PSS_low;
|
||||||
|
|
||||||
|
private Double CalibrationPSS_low;
|
||||||
|
|
||||||
|
private Double CalibrationPSS_high;
|
||||||
|
|
||||||
|
private Double k_back;
|
||||||
|
|
||||||
|
private Double k_alpha;
|
||||||
|
|
||||||
|
private Double k_beta;
|
||||||
|
|
||||||
|
private Double BaseImprovePSS;
|
||||||
|
|
||||||
|
private Double RiskLevelK;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date RefTime_act;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date RefTime_conc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,12 @@ import java.io.Serializable;
|
||||||
@Data
|
@Data
|
||||||
public class EfficiencyData implements Serializable {
|
public class EfficiencyData implements Serializable {
|
||||||
|
|
||||||
private String Energy;
|
private String energy;
|
||||||
|
|
||||||
private String Efficiency;
|
private String efficiency;
|
||||||
|
|
||||||
private String Fit;
|
private String fit;
|
||||||
|
|
||||||
private String Delta;
|
private String delta;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@ public class EnergyData implements Serializable {
|
||||||
|
|
||||||
public String channel;
|
public String channel;
|
||||||
|
|
||||||
public String Energy;
|
public String energy;
|
||||||
|
|
||||||
public String Fit;
|
public String fit;
|
||||||
|
|
||||||
public String Delta;
|
public String delta;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ public class GStoreMiddleProcessData implements Serializable {
|
||||||
public List<String> peaks_Nuclide_name; //文件名称
|
public List<String> peaks_Nuclide_name; //文件名称
|
||||||
public List<String> peaks_comments;
|
public List<String> peaks_comments;
|
||||||
// gards_ nucl_lines_ided数据表
|
// gards_ nucl_lines_ided数据表
|
||||||
private Map<String,GStoreMiddleProcessDataNuclLinesIded> nucl_lines_ided_data;
|
public Map<String,GStoreMiddleProcessDataNuclLinesIded> nucl_lines_ided_data;
|
||||||
//gards_ nucl_ided数据表
|
//gards_ nucl_ided数据表
|
||||||
public List<String> nucl_ided_Nuclidename; // 核素名称
|
public List<String> nucl_ided_Nuclidename; // 核素名称
|
||||||
public List<String> nucl_ided_Type; //核素类型 未知
|
public List<String> nucl_ided_Type; //核素类型 未知
|
||||||
|
|
|
@ -7,12 +7,12 @@ import java.io.Serializable;
|
||||||
@Data
|
@Data
|
||||||
public class ResolutionData implements Serializable {
|
public class ResolutionData implements Serializable {
|
||||||
|
|
||||||
private String Energy;
|
private String energy;
|
||||||
|
|
||||||
private String FWHM;
|
private String fwhm;
|
||||||
|
|
||||||
private String Fit;
|
private String fit;
|
||||||
|
|
||||||
private String Delta;
|
private String delta;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,230 +0,0 @@
|
||||||
package org.jeecg.modules.base.vo;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class StructGStoreMiddleProcessData implements Serializable {
|
|
||||||
|
|
||||||
public boolean dbWriteFlag; //数据库存储标示 例如
|
|
||||||
public String dbWriteStatusFlag; //数据写入状态标示 例如 P U F 等
|
|
||||||
public String ErrorInfo; //错误信息
|
|
||||||
//gards_analyses数据表数据
|
|
||||||
public String IdAnalysis; //分析ID号
|
|
||||||
public String sample_id; //样品ID号
|
|
||||||
public String analyses_analysisBegin; //分析开始时
|
|
||||||
public String analyses_analysisEnd; //分析的结束时间
|
|
||||||
public String analyses_type; //Reviewed:交互 Auto:自动
|
|
||||||
public String analyses_software; //使用的软件
|
|
||||||
public String analyses_swVersion; //软件版本号
|
|
||||||
public String analyses_analyst; //分析员名称
|
|
||||||
public String analyses_baseline_filePath; //基线数据路径
|
|
||||||
public String analyses_lc_filePath; //lc数据基线路径
|
|
||||||
public String analyses_scac_filePath; //scac数据路径
|
|
||||||
public String analyses_save_filePath; //原始文件存储文件名
|
|
||||||
public String analyses_baselineMethod; //基线计数方
|
|
||||||
public String analyses_peaksMethod; //寻峰方法描
|
|
||||||
public String analyses_nuclideMethod; //核素识别方
|
|
||||||
public String analyses_uncCalcMethod; //不确定度计
|
|
||||||
public String analyses_lcMethod; //Lc计算方法
|
|
||||||
public String analyses_LogPath; //日志路径
|
|
||||||
public String analyses_ReportPath; //报告路径
|
|
||||||
|
|
||||||
public String analyses_baseline_absolute_filePath; //基线数据绝对路径
|
|
||||||
public String analyses_lc_absolute_filePath; //lc数据基线绝对路径
|
|
||||||
public String analyses_scac_absolute_filePath; //scac数据绝对路径
|
|
||||||
public String analyses_save_absolute_filePath; //原始文件存储绝对文件名
|
|
||||||
public String analyses_absolute_LogPath; //日志绝对路径
|
|
||||||
public String analyses_absolute_ReportPath; //报告绝对路径
|
|
||||||
|
|
||||||
public double analyses_searchStartChannel; //寻峰起始道
|
|
||||||
public double analyses_searchEndChannel; //寻峰结束道
|
|
||||||
public double analyses_searchThreshold; //寻峰阈值
|
|
||||||
public double analyses_numberOfPeaks; //峰数目
|
|
||||||
public double analyses_totalCounts; //总计数 未知
|
|
||||||
public double analyses_category; //分级结果
|
|
||||||
public String analyses_comments; //注释
|
|
||||||
|
|
||||||
//gards_ calibration_pairs数据表
|
|
||||||
public String calibration_pairs_sample_type; //G:gamma探测器的数据,#g_;B:beta探测器的数据,#b_
|
|
||||||
|
|
||||||
public String calibration_pairs_E_Caltype; //energy:能量刻度
|
|
||||||
public String calibration_pairs_E_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_E_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_E_xValue; //
|
|
||||||
public List<String> calibration_pairs_E_yValue; //
|
|
||||||
public List<String> calibration_pairs_E_uncYValue; //
|
|
||||||
|
|
||||||
public String calibration_pairs_EF_Caltype; //Efficiency:效率刻度;
|
|
||||||
public String calibration_pairs_EF_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_EF_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_EF_xValue; //
|
|
||||||
public List<String> calibration_pairs_EF_yValue; //
|
|
||||||
public List<String> calibration_pairs_EF_uncYValue; //
|
|
||||||
|
|
||||||
public String calibration_pairs_R_Caltype; //Resolution:分辨率刻度;
|
|
||||||
public String calibration_pairs_R_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_R_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_R_xValue; //
|
|
||||||
public List<String> calibration_pairs_R_yValue; //
|
|
||||||
public List<String> calibration_pairs_R_uncYValue; //
|
|
||||||
|
|
||||||
public String calibration_pairs_T_Caltype; //TotalEfficiency:总效率刻度;
|
|
||||||
public String calibration_pairs_T_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_T_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_T_xValue; //
|
|
||||||
public List<String> calibration_pairs_T_yValue; //
|
|
||||||
public List<String> calibration_pairs_T_uncYValue; //
|
|
||||||
|
|
||||||
//原始谱 数据
|
|
||||||
public String calibration_pairs_S_E_Caltype; //energy:能量刻度
|
|
||||||
public String calibration_pairs_S_E_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_S_E_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_S_E_xValue; //
|
|
||||||
public List<String> calibration_pairs_S_E_yValue; //
|
|
||||||
public List<String> calibration_pairs_S_E_uncYValue; //
|
|
||||||
|
|
||||||
public String calibration_pairs_S_EF_Caltype; //Efficiency:效率刻度;
|
|
||||||
public String calibration_pairs_S_EF_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_S_EF_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_S_EF_xValue; //
|
|
||||||
public List<String> calibration_pairs_S_EF_yValue; //
|
|
||||||
public List<String> calibration_pairs_S_EF_uncYValue; //
|
|
||||||
|
|
||||||
public String calibration_pairs_S_R_Caltype; //Resolution:分辨率刻度;
|
|
||||||
public String calibration_pairs_S_R_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_S_R_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_S_R_xValue; //
|
|
||||||
public List<String> calibration_pairs_S_R_yValue; //
|
|
||||||
public List<String> calibration_pairs_S_R_uncYValue; //
|
|
||||||
|
|
||||||
public String calibration_pairs_S_T_Caltype; //TotalEfficiency:总效率刻度;
|
|
||||||
public String calibration_pairs_S_T_Input; //PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等
|
|
||||||
public List<String> calibration_pairs_S_T_idCalPoint; //刻度点ID号
|
|
||||||
public List<String> calibration_pairs_S_T_xValue; //
|
|
||||||
public List<String> calibration_pairs_S_T_yValue; //
|
|
||||||
public List<String> calibration_pairs_S_T_uncYValue; //
|
|
||||||
|
|
||||||
//gards_ calibration 数据表
|
|
||||||
public String calibration_sample_type; //G:gamma探测器的数据,#g_;B:beta探测器的数据,#b_
|
|
||||||
public String calibration_E_Caltype; //energy:能量刻度
|
|
||||||
public double calibration_E_function; //拟合方程ID号(统一定义)
|
|
||||||
public String calibration_E_functionTypeDef; //函数类型描述
|
|
||||||
public String calibration_E_functionDef; //拟合方程描述
|
|
||||||
public double calibration_E_startOfRange; //拟合的起始值
|
|
||||||
public double calibration_E_endOfRange; //拟合的结束值
|
|
||||||
public String calibration_E_coeff_string; //拟合系数
|
|
||||||
public String calibration_E_uncoeff_string; //拟合系数1不确定度
|
|
||||||
|
|
||||||
public String calibration_EF_Caltype; //Efficiency:效率刻度;
|
|
||||||
public double calibration_EF_function; //拟合方程ID号(统一定义)
|
|
||||||
public String calibration_EF_functionTypeDef; //函数类型描述
|
|
||||||
public String calibration_EF_functionDef; //拟合方程描述
|
|
||||||
public double calibration_EF_startOfRange; //拟合的起始值
|
|
||||||
public double calibration_EF_endOfRange; //拟合的结束值
|
|
||||||
public String calibration_EF_coeff_string; //拟合系数
|
|
||||||
public String calibration_EF_uncoeff_string; //拟合系数1不确定度
|
|
||||||
|
|
||||||
public String calibration_R_Caltype; //Resolution:分辨率刻度;
|
|
||||||
public double calibration_R_function; //拟合方程ID号(统一定义)
|
|
||||||
public String calibration_R_functionTypeDef; //函数类型描述
|
|
||||||
public String calibration_R_functionDef; //拟合方程描述
|
|
||||||
public double calibration_R_startOfRange; //拟合的起始值
|
|
||||||
public double calibration_R_endOfRange; //拟合的结束值
|
|
||||||
public String calibration_R_coeff_string; //拟合系数
|
|
||||||
public String calibration_R_uncoeff_string; //拟合系数1不确定度
|
|
||||||
|
|
||||||
public String calibration_T_Caltype; //TotalEfficiency:总效率刻度;
|
|
||||||
public double calibration_T_function; //拟合方程ID号(统一定义)
|
|
||||||
public String calibration_T_functionTypeDef; //函数类型描述
|
|
||||||
public String calibration_T_functionDef; //拟合方程描述
|
|
||||||
public double calibration_T_startOfRange; //拟合的起始值
|
|
||||||
public double calibration_T_endOfRange; //拟合的结束值
|
|
||||||
public String calibration_T_coeff_string; //拟合系数
|
|
||||||
public String calibration_T_uncoeff_string; //拟合系数1不确定度
|
|
||||||
|
|
||||||
//gards_ peaks数据表
|
|
||||||
public List<String> peaks_idPeak; //峰序号
|
|
||||||
public List<String> peaks_peakCentroid; //峰中心道(道址)
|
|
||||||
public List<String> peaks_uncpeakCentroid; //峰中心道不确定度(道址)
|
|
||||||
public List<String> peaks_Energy; //峰中心道能量(keV)
|
|
||||||
public List<String> peaks_uncEnergy; //峰中心道能量不确定度(keV)
|
|
||||||
public List<String> peaks_Area; //峰面积(计数)。已扣除基线面积,但未扣除空白样品计数和探测器本底计数
|
|
||||||
public List<String> peaks_areaErr; //峰面积不确定度(以计数为单位)
|
|
||||||
public List<String> peaks_netCountRate; //峰的净计数率(1/s)=峰面积/活时间 未知
|
|
||||||
public List<String> peaks_uncNetCountRate; //峰的净计数率的不确定度(1/s) 未知
|
|
||||||
public List<String> peaks_Efficiency; //测量系统在峰能量处的绝对效率
|
|
||||||
public List<String> peaks_Uncefficiency; //测量系统在峰能量处的绝对效率的不确定度
|
|
||||||
public List<String> peaks_Fwhm; //峰的半高宽(keV)
|
|
||||||
public List<String> peaks_Fwhmc; //峰的半高宽(Channel)
|
|
||||||
public List<String> peaks_Significance; //峰的灵敏度
|
|
||||||
public List<String> peaks_Sensitivity; //重峰序号
|
|
||||||
public List<String> peaks_multiIndex; //峰的感兴趣区的起始道left
|
|
||||||
public List<String> peaks_ROIstart; //峰的感兴趣区的结束道right
|
|
||||||
public List<String> peaks_ROIend; //峰序号
|
|
||||||
public List<String> peaks_tail; //
|
|
||||||
public List<String> peaks_tailAlpha; //
|
|
||||||
public List<String> peaks_upperTail; //
|
|
||||||
public List<String> peaks_upperTailAlpha; //
|
|
||||||
public List<String> peaks_BWWidthChan; //
|
|
||||||
public List<String> peaks_recoilBetaChan;
|
|
||||||
public List<String> peaks_recoilDeltaChan; //
|
|
||||||
public List<String> peaks_stepRatio; //
|
|
||||||
public List<String> peaks_backgroundArea; //在峰区域下的基线面积(计数)
|
|
||||||
public List<String> peaks_meanBackCount; //基线面积/道数(计数)
|
|
||||||
public List<String> peaks_Lc; //峰的可探测线Lc
|
|
||||||
public List<String> peaks_Ld; //峰的可探测线Ld
|
|
||||||
public List<String> peaks_Nuclide_name; //文件名称
|
|
||||||
public List<String> peaks_comments;
|
|
||||||
// gards_ nucl_lines_ided数据表
|
|
||||||
public Map<String,StructGStoreMiddleProcessDataNuclLinesIded> nucl_lines_ided_data;
|
|
||||||
//gards_ nucl_ided数据表
|
|
||||||
public List<String> nucl_ided_Nuclidename; // 核素名称
|
|
||||||
public List<String> nucl_ided_Type; //核素类型 未知
|
|
||||||
public List<String> nucl_ided_Halflife; //核素半衰期
|
|
||||||
public List<String> nucl_ided_ave_activ; //平均活度值NULL
|
|
||||||
public List<String> nucl_ided_ave_activ_err; //平均活度值不确定度NULL
|
|
||||||
public List<String> nucl_ided_activ_key; //主射线活度值 未知
|
|
||||||
public List<String> nucl_ided_activ_key_err; //主射线活度值不确定度
|
|
||||||
public List<String> nucl_ided_mda; //核素的最小可探测活度
|
|
||||||
public List<String> nucl_ided_mda_err; //核素的最小可探测活度不确定度
|
|
||||||
public List<String> nucl_ided_nid_flag; //核素识别标志未知
|
|
||||||
public List<String> nucl_ided_csc_ratio; //符合相加校正因子(无设为1)
|
|
||||||
public List<String> nucl_ided_csc_ratio_err; //符合相加校正因子不确定度(无设为0)
|
|
||||||
public List<String> nucl_ided_csc_mod_flag; //活度是否经过符合相加校正0
|
|
||||||
public List<String> nucl_ided_MDC;
|
|
||||||
public List<String> nucl_ided_Concentration;
|
|
||||||
public List<String> nucl_ided_Key_Energy; //
|
|
||||||
public List<String> nucl_ided_Key_Yield; //
|
|
||||||
|
|
||||||
//GARDS_QC_CHECK
|
|
||||||
public List<String> QC_CHECK_QC_NAME;
|
|
||||||
public List<String> QC_CHECK_QC_VALUE;
|
|
||||||
public List<String> QC_CHECK_QC_STANDARD;
|
|
||||||
public List<String> QC_CHECK_QC_RESULT;
|
|
||||||
|
|
||||||
//sample information
|
|
||||||
public String sample_collection_start;
|
|
||||||
public String sample_collection_stop;
|
|
||||||
public String sample_time;
|
|
||||||
public String sample_quantity;
|
|
||||||
public String sample_decay_time;
|
|
||||||
public String sample_acquisiton_start;
|
|
||||||
public String sample_acquistion_stop;
|
|
||||||
|
|
||||||
public String sample_acquistion_time;
|
|
||||||
public String sample_Geometry;
|
|
||||||
public String sample_Avg_Flow_Rate;
|
|
||||||
public String sample_stationID; //
|
|
||||||
public String sample_detectID; //
|
|
||||||
public String sample_Type; //
|
|
||||||
|
|
||||||
public String Collection_Station_Comments;
|
|
||||||
public String NDC_Analysis_General_Comments;
|
|
||||||
|
|
||||||
//SpecSetup
|
|
||||||
public SpecSetup setting_specSetup;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package org.jeecg.modules.base.vo;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class StructGStoreMiddleProcessDataNuclLinesIded implements Serializable {
|
|
||||||
|
|
||||||
// gards_ nucl_lines_ided数据表
|
|
||||||
public List<String> nuclideFullname; //FullName
|
|
||||||
public List<String> idPeak; //峰序号
|
|
||||||
public List<String> Energy; //核素库中核素对应的能量(keV)
|
|
||||||
public List<String> uncEnergy; //核素库中核素对应峰的能量不确定度(keV)
|
|
||||||
public List<String> Abundance; //核素库中核素对应峰的发射几率
|
|
||||||
public List<String> uncAbundance; //核素库中核素对应峰的发射几率不确定度
|
|
||||||
public List<String> Activity; //利用该峰计算得到的活度
|
|
||||||
public List<String> uncActivity; //利用该峰计算得到的活度不确定度
|
|
||||||
public List<String> Effic; //该峰处的探测效率
|
|
||||||
public List<String> uncEffic; //该峰处的探测效率不确定度
|
|
||||||
public List<String> Mda; //利用该峰计算得到的最小可探测活度
|
|
||||||
public List<String> key_flag; //主射线标识:0-否;1-是
|
|
||||||
public List<String> csc_ratio; //符合相加校正因子(无设为1)
|
|
||||||
public List<String> csc_ratio_err; //符合相加校正因子不确定度(无设为0)
|
|
||||||
public List<String> csc_mod_flag; //活度是否经过符合相加校正0 未知
|
|
||||||
|
|
||||||
public List<String> MDC;
|
|
||||||
public List<String> Concentration;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,62 +1,60 @@
|
||||||
package org.jeecg.modules.base.vo;
|
package org.jeecg.modules.base.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class StructInsertInput implements Serializable {
|
public class StructInsertInput implements Serializable {
|
||||||
|
|
||||||
//-----------------input:------------------
|
//-----------------input:------------------
|
||||||
List<Double> peakCentroid;
|
public List<Double> peakCentroid;
|
||||||
|
|
||||||
List<Double> fwhmc;
|
public List<Double> fwhmc;
|
||||||
|
|
||||||
List<Double> tail;
|
public List<Double> tail;
|
||||||
|
|
||||||
List<Double> tailAlpha;
|
public List<Double> tailAlpha;
|
||||||
|
|
||||||
List<Double> upperTail;
|
public List<Double> upperTail;
|
||||||
|
|
||||||
List<Double> upperTailAlpha;
|
public List<Double> upperTailAlpha;
|
||||||
|
|
||||||
List<Double> area;
|
public List<Double> area;
|
||||||
|
|
||||||
List<Double> stepRatio;
|
public List<Double> stepRatio;
|
||||||
|
|
||||||
List<Double> usedEnerPara;
|
public List<Double> usedEnerPara;
|
||||||
|
|
||||||
List<Double> usedResoPara;
|
public List<Double> usedResoPara;
|
||||||
|
|
||||||
List<Double> usedEffiPara;
|
public List<Double> usedEffiPara;
|
||||||
|
|
||||||
long num_g_channel;
|
public long num_g_channel;
|
||||||
|
|
||||||
long begin_channel;
|
public long begin_channel;
|
||||||
|
|
||||||
List<Double> XCtrl;
|
public List<Double> XCtrl;
|
||||||
|
|
||||||
List<Double> YCtrl;
|
public List<Double> YCtrl;
|
||||||
|
|
||||||
List<Double> YSlope;
|
public List<Double> YSlope;
|
||||||
|
|
||||||
int rg_low;
|
public int rg_low;
|
||||||
|
|
||||||
int rg_high;
|
public int rg_high;
|
||||||
|
|
||||||
List<Double> para_tail;
|
public List<Double> para_tail;
|
||||||
|
|
||||||
List<Double> para_tailAlpha;
|
public List<Double> para_tailAlpha;
|
||||||
|
|
||||||
List<Double> para_tailRight;
|
public List<Double> para_tailRight;
|
||||||
|
|
||||||
List<Double> para_tailRightAlpha;
|
public List<Double> para_tailRightAlpha;
|
||||||
|
|
||||||
List<Double> para_stepRatio;
|
public List<Double> para_stepRatio;
|
||||||
|
|
||||||
int curChan;
|
public int curChan;
|
||||||
|
|
||||||
List<Double> vCount;
|
public List<Double> vCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,48 @@
|
||||||
package org.jeecg.modules.base.vo;
|
package org.jeecg.modules.base.vo;
|
||||||
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class StructInsertOutput implements Serializable {
|
public class StructInsertOutput implements Serializable {
|
||||||
|
|
||||||
//-----------------output:------------------
|
//-----------------output:------------------
|
||||||
List<Double> energy;
|
public List<Double> peakCentroid;
|
||||||
|
|
||||||
List<Double> sensitivity;
|
public List<Double> energy;
|
||||||
|
|
||||||
List<Double> fwhm;
|
public List<Double> area;
|
||||||
|
|
||||||
List<Double> efficiency;
|
public List<Double> sensitivity;
|
||||||
|
|
||||||
List<Double> BWWidthChan;
|
public List<Double> fwhm;
|
||||||
|
|
||||||
List<Double> recoilBetaChan;
|
public List<Double> fwhmc;
|
||||||
|
|
||||||
List<Double> recoilDeltaChan;
|
public List<Double> stepRatio;
|
||||||
|
|
||||||
List<Double> vIdx;
|
public List<Double> tail;
|
||||||
|
|
||||||
List<Double> vLeft;
|
public List<Double> tailAlpha;
|
||||||
|
|
||||||
List<Double> vRight;
|
public List<Double> upperTail;
|
||||||
|
|
||||||
List<Double> vCentroid;
|
public List<Double> upperTailAlpha;
|
||||||
|
|
||||||
|
public List<Double> efficiency;
|
||||||
|
|
||||||
|
public List<Double> BWWidthChan;
|
||||||
|
|
||||||
|
public List<Double> recoilBetaChan;
|
||||||
|
|
||||||
|
public List<Double> recoilDeltaChan;
|
||||||
|
|
||||||
|
public List<Double> vIdx;
|
||||||
|
|
||||||
|
public List<Double> vLeft;
|
||||||
|
|
||||||
|
public List<Double> vRight;
|
||||||
|
|
||||||
|
public List<Double> vCentroid;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,13 @@
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>23.0</version>
|
<version>23.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xerial</groupId>
|
||||||
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
|
<version>3.34.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
Binary file not shown.
|
@ -0,0 +1,51 @@
|
||||||
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class DBUtil implements Serializable {
|
||||||
|
|
||||||
|
public Connection openDB(){
|
||||||
|
Connection conn = null;
|
||||||
|
try {
|
||||||
|
//名字固定
|
||||||
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
//sqlite3文件的绝对路径
|
||||||
|
String db = "D:\\workspace\\AnalysisSystemForRadionuclide\\AnalysisSystemForRadionuclide\\AnalysisSystemForRadionuclide\\jeecg-module-spectrum-analysis\\src\\main\\java\\org\\jeecg\\common\\db\\GammaDatabase.db";
|
||||||
|
try {
|
||||||
|
conn = DriverManager.getConnection("jdbc:sqlite:" + db);
|
||||||
|
} catch (SQLException throwables) {
|
||||||
|
throwables.printStackTrace();
|
||||||
|
}
|
||||||
|
//返回state,后面便可以调用,使用state进行操作数据库
|
||||||
|
return conn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用完一定要关闭连接 ***** 务必 切记 *****
|
||||||
|
* @param stat
|
||||||
|
* @param con
|
||||||
|
*/
|
||||||
|
public void close(Statement stat, Connection con){
|
||||||
|
try {
|
||||||
|
if(stat!=null)
|
||||||
|
stat.close();
|
||||||
|
|
||||||
|
if(con!=null)
|
||||||
|
con.close();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -12,8 +12,10 @@ import org.jeecg.common.properties.SpectrumPathProperties;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
||||||
import org.jeecg.modules.base.entity.rnman.GardsAnalySetting;
|
import org.jeecg.modules.base.entity.rnman.GardsAnalySetting;
|
||||||
|
import org.jeecg.modules.base.enums.CalName;
|
||||||
import org.jeecg.modules.base.vo.*;
|
import org.jeecg.modules.base.vo.*;
|
||||||
import org.jeecg.modules.entity.*;
|
import org.jeecg.modules.entity.*;
|
||||||
|
import org.jeecg.modules.entity.vo.TablePeaks;
|
||||||
import org.jeecg.modules.mapper.SpectrumAnalysisMapper;
|
import org.jeecg.modules.mapper.SpectrumAnalysisMapper;
|
||||||
import org.jeecg.modules.native_jni.CalValuesHandler;
|
import org.jeecg.modules.native_jni.CalValuesHandler;
|
||||||
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
||||||
|
@ -37,8 +39,6 @@ import java.text.ParseException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static sun.misc.DoubleConsts.NaN;
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class GammaFileUtil {
|
public class GammaFileUtil {
|
||||||
|
|
||||||
|
@ -53,18 +53,14 @@ public class GammaFileUtil {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
|
|
||||||
public void loadFile(Integer sampleId, PHDFile phd, Result result){
|
public boolean loadFile(String pathName, String fileName, PHDFile phd, Result result){
|
||||||
//根据sampleId获取sample文件路径
|
phd.setFilepath(pathName);
|
||||||
String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId);
|
phd.setFilename(fileName);
|
||||||
if (StringUtils.isBlank(sampleFilePath)){
|
|
||||||
result.error500("样品文件不存在!");
|
|
||||||
}
|
|
||||||
String pathName = sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
|
||||||
String fileName = sampleFilePath.substring(sampleFilePath.lastIndexOf(StringPool.SLASH)+1);
|
|
||||||
//连接ftp
|
//连接ftp
|
||||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
if (Objects.isNull(ftpClient)){
|
if (Objects.isNull(ftpClient)){
|
||||||
result.error500("ftp连接失败");
|
result.error500("ftp连接失败");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
//加载dll工具库
|
//加载dll工具库
|
||||||
System.loadLibrary("ReadPHDFile");
|
System.loadLibrary("ReadPHDFile");
|
||||||
|
@ -81,6 +77,7 @@ public class GammaFileUtil {
|
||||||
ftpFiles = ftpFiles.stream().filter(item-> item.getName().equals(fileName)).collect(Collectors.toList());
|
ftpFiles = ftpFiles.stream().filter(item-> item.getName().equals(fileName)).collect(Collectors.toList());
|
||||||
if (ftpFiles.size() == 0){
|
if (ftpFiles.size() == 0){
|
||||||
result.error500("ftp获取文件数据失败");
|
result.error500("ftp获取文件数据失败");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
FTPFile ftpFile = ftpFiles.get(0);
|
FTPFile ftpFile = ftpFiles.get(0);
|
||||||
if (Objects.nonNull(ftpFile)){
|
if (Objects.nonNull(ftpFile)){
|
||||||
|
@ -208,7 +205,7 @@ public class GammaFileUtil {
|
||||||
gEnergyBlock.setCentroid_channel(struct.g_centroid_channel);
|
gEnergyBlock.setCentroid_channel(struct.g_centroid_channel);
|
||||||
gEnergyBlock.setUncertainty(struct.g_uncertainty);
|
gEnergyBlock.setUncertainty(struct.g_uncertainty);
|
||||||
gEnergyBlock.setRecord_count(struct.g_record_count);
|
gEnergyBlock.setRecord_count(struct.g_record_count);
|
||||||
phd.getMapEnerKD().put("PHD", gEnergyBlock);
|
phd.getMapEnerKD().put(CalName.CalPHD.getType(), gEnergyBlock);
|
||||||
}
|
}
|
||||||
//g_Resolution
|
//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 (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)){
|
||||||
|
@ -217,7 +214,7 @@ public class GammaFileUtil {
|
||||||
gResolutionBlock.setFWHM(struct.g_r_FWHM);
|
gResolutionBlock.setFWHM(struct.g_r_FWHM);
|
||||||
gResolutionBlock.setUncertainty(struct.g_r_uncertainty);
|
gResolutionBlock.setUncertainty(struct.g_r_uncertainty);
|
||||||
gResolutionBlock.setRecord_count(struct.g_r_record_count);
|
gResolutionBlock.setRecord_count(struct.g_r_record_count);
|
||||||
phd.getMapResoKD().put("PHD", gResolutionBlock);
|
phd.getMapResoKD().put(CalName.CalPHD.getType(), gResolutionBlock);
|
||||||
}
|
}
|
||||||
//g_Efficiency
|
//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 (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)){
|
||||||
|
@ -226,7 +223,7 @@ public class GammaFileUtil {
|
||||||
gEfficiencyBlock.setEfficiency(struct.g_e_efficiency);
|
gEfficiencyBlock.setEfficiency(struct.g_e_efficiency);
|
||||||
gEfficiencyBlock.setUncertainty(struct.g_e_uncertainty);
|
gEfficiencyBlock.setUncertainty(struct.g_e_uncertainty);
|
||||||
gEfficiencyBlock.setRecord_count(struct.g_e_record_count);
|
gEfficiencyBlock.setRecord_count(struct.g_e_record_count);
|
||||||
phd.getMapEffiKD().put("PHD", gEfficiencyBlock);
|
phd.getMapEffiKD().put(CalName.CalPHD.getType(), gEfficiencyBlock);
|
||||||
}
|
}
|
||||||
//TotalEff
|
//TotalEff
|
||||||
if (CollectionUtils.isNotEmpty(struct.t_g_energy) || CollectionUtils.isNotEmpty(struct.total_efficiency) || CollectionUtils.isNotEmpty(struct.t_uncertainty) || Objects.nonNull(struct.t_record_count)){
|
if (CollectionUtils.isNotEmpty(struct.t_g_energy) || CollectionUtils.isNotEmpty(struct.total_efficiency) || CollectionUtils.isNotEmpty(struct.t_uncertainty) || Objects.nonNull(struct.t_record_count)){
|
||||||
|
@ -235,7 +232,7 @@ public class GammaFileUtil {
|
||||||
totaleffBlock.setTotal_efficiency(struct.total_efficiency);
|
totaleffBlock.setTotal_efficiency(struct.total_efficiency);
|
||||||
totaleffBlock.setUncertainty(struct.t_uncertainty);
|
totaleffBlock.setUncertainty(struct.t_uncertainty);
|
||||||
totaleffBlock.setRecord_count(struct.t_record_count);
|
totaleffBlock.setRecord_count(struct.t_record_count);
|
||||||
phd.getMapTotEKD().put("PHD", totaleffBlock);
|
phd.getMapTotEKD().put(CalName.CalPHD.getType(), totaleffBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化默认分析设置
|
// 初始化默认分析设置
|
||||||
|
@ -263,23 +260,22 @@ public class GammaFileUtil {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBaseInfo(PHDFile phd, Integer sampleId){
|
public void SetBaseInfo(PHDFile phd){
|
||||||
//根据sampleId获取sample文件路径
|
String pathName = phd.getFilepath();
|
||||||
String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId);
|
String fileName = phd.getFilename();
|
||||||
String pathName = sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
|
||||||
String fileName = sampleFilePath.substring(sampleFilePath.lastIndexOf(StringPool.SLASH)+1);
|
|
||||||
//文件名称需要加上自动处理的前缀以及修改不同的文件后缀名
|
//文件名称需要加上自动处理的前缀以及修改不同的文件后缀名
|
||||||
String subFileName = fileName.substring(0, fileName.lastIndexOf(StringPool.DOT));
|
String subFileName = fileName.substring(0, fileName.lastIndexOf(StringPool.DOT));
|
||||||
try {
|
pathName = StringPool.SLASH + spectrumPathProperties.getRootPath() + StringPool.SLASH + pathName;
|
||||||
pathName = StringPool.SLASH + spectrumPathProperties.getRootPath() + StringPool.SLASH + pathName;
|
if(StringUtils.isNotBlank(subFileName)){
|
||||||
if(StringUtils.isNotBlank(subFileName)){
|
//连接ftp
|
||||||
//连接ftp
|
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
if (Objects.isNull(ftpClient)){
|
||||||
if (Objects.isNull(ftpClient)){
|
String warning = "ftp连接失败";
|
||||||
String warning = "ftp连接失败";
|
}
|
||||||
}
|
try {
|
||||||
//切换被动模式
|
//切换被动模式
|
||||||
ftpClient.enterLocalPassiveMode();
|
ftpClient.enterLocalPassiveMode();
|
||||||
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
||||||
|
@ -303,18 +299,23 @@ public class GammaFileUtil {
|
||||||
phd.setVLc(vData);
|
phd.setVLc(vData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
try {
|
try {
|
||||||
ftpClient.disconnect();
|
ftpClient.disconnect();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(subFileName)){
|
}
|
||||||
//连接ftp
|
if(StringUtils.isNotBlank(subFileName)){
|
||||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
//连接ftp
|
||||||
if (Objects.isNull(ftpClient)){
|
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
String warning = "ftp连接失败";
|
if (Objects.isNull(ftpClient)){
|
||||||
}
|
String warning = "ftp连接失败";
|
||||||
|
}
|
||||||
|
try {
|
||||||
//切换被动模式
|
//切换被动模式
|
||||||
ftpClient.enterLocalPassiveMode();
|
ftpClient.enterLocalPassiveMode();
|
||||||
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
||||||
|
@ -338,18 +339,23 @@ public class GammaFileUtil {
|
||||||
phd.setVScac(vData);
|
phd.setVScac(vData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
try {
|
try {
|
||||||
ftpClient.disconnect();
|
ftpClient.disconnect();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(subFileName)){
|
}
|
||||||
//连接ftp
|
if(StringUtils.isNotBlank(subFileName)){
|
||||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
//连接ftp
|
||||||
if (Objects.isNull(ftpClient)){
|
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
String warning = "ftp连接失败";
|
if (Objects.isNull(ftpClient)){
|
||||||
}
|
String warning = "ftp连接失败";
|
||||||
|
}
|
||||||
|
try {
|
||||||
//切换被动模式
|
//切换被动模式
|
||||||
ftpClient.enterLocalPassiveMode();
|
ftpClient.enterLocalPassiveMode();
|
||||||
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
||||||
|
@ -373,14 +379,15 @@ public class GammaFileUtil {
|
||||||
phd.setVBase(phd.getBaseCtrls().getBaseline());
|
phd.setVBase(phd.getBaseCtrls().getBaseline());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
try {
|
try {
|
||||||
ftpClient.disconnect();
|
ftpClient.disconnect();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,6 +527,7 @@ public class GammaFileUtil {
|
||||||
phd.getUsedSetting().setEnergyTolerance(analysis.getSearchThreshold());
|
phd.getUsedSetting().setEnergyTolerance(analysis.getSearchThreshold());
|
||||||
}else {
|
}else {
|
||||||
result.error500("There are 0 records when sample_id is "+sampleId+"!");
|
result.error500("There are 0 records when sample_id is "+sampleId+"!");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (peakNum>0){
|
if (peakNum>0){
|
||||||
|
@ -557,9 +565,6 @@ public class GammaFileUtil {
|
||||||
phd.getVPeak().add(peakInfo);
|
phd.getVPeak().add(peakInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (phd.getVPeak().size()!=peakNum){
|
|
||||||
result.error500("The peaks' number in "+T_peaks+" and "+T_analy+" isn't equal.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 获取刻度点数据
|
// 获取刻度点数据
|
||||||
List<GardsCalibrationPairsSpectrum> calibrationPairs = spectrumAnalysisMapper.getCalibrationPairs(T_calib, analysis.getIdAnalysis());
|
List<GardsCalibrationPairsSpectrum> calibrationPairs = spectrumAnalysisMapper.getCalibrationPairs(T_calib, analysis.getIdAnalysis());
|
||||||
|
@ -574,35 +579,35 @@ public class GammaFileUtil {
|
||||||
phd.setUsedEner(pairsSpectrum.getInput());
|
phd.setUsedEner(pairsSpectrum.getInput());
|
||||||
gEnergyBlock.getCentroid_channel().add(pairsSpectrum.getXValue());
|
gEnergyBlock.getCentroid_channel().add(pairsSpectrum.getXValue());
|
||||||
gEnergyBlock.getG_energy().add(pairsSpectrum.getYValue());
|
gEnergyBlock.getG_energy().add(pairsSpectrum.getYValue());
|
||||||
gEnergyBlock.getUncertainty().add(pairsSpectrum.getUncYValue().isEmpty()? 0:Double.valueOf(pairsSpectrum.getUncYValue()));
|
gEnergyBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0:Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||||
} else if(calType.equals("Resolution")) {
|
} else if(calType.equals("Resolution")) {
|
||||||
phd.setUsedReso(pairsSpectrum.getInput());
|
phd.setUsedReso(pairsSpectrum.getInput());
|
||||||
gResolutionBlock.getG_energy().add(pairsSpectrum.getXValue());
|
gResolutionBlock.getG_energy().add(pairsSpectrum.getXValue());
|
||||||
gResolutionBlock.getFWHM().add(pairsSpectrum.getYValue());
|
gResolutionBlock.getFWHM().add(pairsSpectrum.getYValue());
|
||||||
gResolutionBlock.getUncertainty().add(pairsSpectrum.getUncYValue().isEmpty()? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
gResolutionBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||||
} else if(calType.equals("efficiency")) {
|
} else if(calType.equals("efficiency")) {
|
||||||
phd.setUsedEffi(pairsSpectrum.getInput());
|
phd.setUsedEffi(pairsSpectrum.getInput());
|
||||||
gEfficiencyBlock.getG_energy().add(pairsSpectrum.getXValue());
|
gEfficiencyBlock.getG_energy().add(pairsSpectrum.getXValue());
|
||||||
gEfficiencyBlock.getEfficiency().add(pairsSpectrum.getYValue());
|
gEfficiencyBlock.getEfficiency().add(pairsSpectrum.getYValue());
|
||||||
gEfficiencyBlock.getUncertainty().add(pairsSpectrum.getUncYValue().isEmpty()? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
gEfficiencyBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||||
} else if(calType.equals("TotalEfficiency")) {
|
} else if(calType.equals("TotalEfficiency")) {
|
||||||
phd.setUsedTotE(pairsSpectrum.getInput());
|
phd.setUsedTotE(pairsSpectrum.getInput());
|
||||||
totaleffBlock.getG_energy().add(pairsSpectrum.getXValue());
|
totaleffBlock.getG_energy().add(pairsSpectrum.getXValue());
|
||||||
totaleffBlock.getTotal_efficiency().add(pairsSpectrum.getYValue());
|
totaleffBlock.getTotal_efficiency().add(pairsSpectrum.getYValue());
|
||||||
totaleffBlock.getUncertainty().add(pairsSpectrum.getUncYValue().isEmpty()? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
totaleffBlock.getUncertainty().add(StringUtils.isBlank(pairsSpectrum.getUncYValue())? 0: Double.valueOf(pairsSpectrum.getUncYValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (phd.getUsedEner().isEmpty()){
|
if (phd.getUsedEner().isEmpty()){
|
||||||
phd.setUsedEner("PHD");
|
phd.setUsedEner(CalName.CalPHD.getType());
|
||||||
}
|
}
|
||||||
if (phd.getUsedReso().isEmpty()){
|
if (phd.getUsedReso().isEmpty()){
|
||||||
phd.setUsedReso("PHD");
|
phd.setUsedReso(CalName.CalPHD.getType());
|
||||||
}
|
}
|
||||||
if (phd.getUsedEffi().isEmpty()){
|
if (phd.getUsedEffi().isEmpty()){
|
||||||
phd.setUsedEffi("PHD");
|
phd.setUsedEffi(CalName.CalPHD.getType());
|
||||||
}
|
}
|
||||||
if (phd.getUsedTotE().isEmpty()){
|
if (phd.getUsedTotE().isEmpty()){
|
||||||
phd.setUsedTotE("PHD");
|
phd.setUsedTotE(CalName.CalPHD.getType());
|
||||||
}
|
}
|
||||||
gEnergyBlock.setRecord_count(gEnergyBlock.getG_energy().size());
|
gEnergyBlock.setRecord_count(gEnergyBlock.getG_energy().size());
|
||||||
gResolutionBlock.setRecord_count(gResolutionBlock.getG_energy().size());
|
gResolutionBlock.setRecord_count(gResolutionBlock.getG_energy().size());
|
||||||
|
@ -611,29 +616,21 @@ public class GammaFileUtil {
|
||||||
if(gEnergyBlock.getRecord_count() > 0) {
|
if(gEnergyBlock.getRecord_count() > 0) {
|
||||||
phd.setUsedEnerKD(gEnergyBlock);
|
phd.setUsedEnerKD(gEnergyBlock);
|
||||||
phd.getMapEnerKD().put(phd.getUsedEner(), gEnergyBlock);
|
phd.getMapEnerKD().put(phd.getUsedEner(), gEnergyBlock);
|
||||||
} else {
|
|
||||||
result.error500("There are 0 records of Energy Calibration!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gResolutionBlock.getRecord_count() > 0) {
|
if(gResolutionBlock.getRecord_count() > 0) {
|
||||||
phd.setUsedResoKD(gResolutionBlock);
|
phd.setUsedResoKD(gResolutionBlock);
|
||||||
phd.getMapResoKD().put(phd.getUsedReso(), gResolutionBlock);
|
phd.getMapResoKD().put(phd.getUsedReso(), gResolutionBlock);
|
||||||
} else {
|
|
||||||
result.error500("There are 0 records of Resolution Calibration!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gEfficiencyBlock.getRecord_count() > 0) {
|
if(gEfficiencyBlock.getRecord_count() > 0) {
|
||||||
phd.setUsedEffiKD(gEfficiencyBlock);
|
phd.setUsedEffiKD(gEfficiencyBlock);
|
||||||
phd.getMapEffiKD().put(phd.getUsedEffi(), gEfficiencyBlock);
|
phd.getMapEffiKD().put(phd.getUsedEffi(), gEfficiencyBlock);
|
||||||
} else {
|
|
||||||
result.error500("There are 0 records of Efficiency Calibration!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(totaleffBlock.getRecord_count() > 0) {
|
if(totaleffBlock.getRecord_count() > 0) {
|
||||||
phd.setUsedTotEKD(totaleffBlock);
|
phd.setUsedTotEKD(totaleffBlock);
|
||||||
phd.getMapTotEKD().put(phd.getUsedTotE(), totaleffBlock);
|
phd.getMapTotEKD().put(phd.getUsedTotE(), totaleffBlock);
|
||||||
} else {
|
|
||||||
result.error500("There are 0 records of Total_efficiency Calibration!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取刻度拟合系数
|
// 获取刻度拟合系数
|
||||||
|
@ -646,7 +643,7 @@ public class GammaFileUtil {
|
||||||
String[] list_coeff = calibrationSpectrum.getCoeffString().split(StringPool.COMMA);
|
String[] list_coeff = calibrationSpectrum.getCoeffString().split(StringPool.COMMA);
|
||||||
for (String str:list_coeff) {
|
for (String str:list_coeff) {
|
||||||
para.getP().add(Double.valueOf(str));
|
para.getP().add(Double.valueOf(str));
|
||||||
para.getPerr().add(NaN);
|
para.getPerr().add(0.0);
|
||||||
}
|
}
|
||||||
if(calType.equals("energy")) {
|
if(calType.equals("energy")) {
|
||||||
phd.setUsedEnerPara(para);
|
phd.setUsedEnerPara(para);
|
||||||
|
@ -845,7 +842,6 @@ public class GammaFileUtil {
|
||||||
if(phd.getHeader().getSystem_type().equals("P")) {
|
if(phd.getHeader().getSystem_type().equals("P")) {
|
||||||
List<Double> energy = new LinkedList<>();
|
List<Double> energy = new LinkedList<>();
|
||||||
energy.add(ener_Be7);
|
energy.add(ener_Be7);
|
||||||
System.loadLibrary("GammaAnaly");
|
|
||||||
CalValuesOut calValuesOut = CalValuesHandler.calFcnEval(energy, phd.getUsedResoPara().getP());
|
CalValuesOut calValuesOut = CalValuesHandler.calFcnEval(energy, phd.getUsedResoPara().getP());
|
||||||
List<Double> fwhm = calValuesOut.counts;
|
List<Double> fwhm = calValuesOut.counts;
|
||||||
QcCheckItem be7 = qcItems.get("Be7-FWHM");
|
QcCheckItem be7 = qcItems.get("Be7-FWHM");
|
||||||
|
@ -1123,7 +1119,7 @@ public class GammaFileUtil {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> DetailedInfo(PHDFile phd) {
|
public List<String> DetailedInfo(Integer sampleId, PHDFile phd) {
|
||||||
try {
|
try {
|
||||||
// Sample_Id, Station_Code, Detector_Code, System_Type, Data_Type, Spectral_Qualifier,
|
// Sample_Id, Station_Code, Detector_Code, System_Type, Data_Type, Spectral_Qualifier,
|
||||||
// SRID, Sample_Status, Collect_Start, Sampling_Time, Quantity, Flow_Rate,
|
// SRID, Sample_Status, Collect_Start, Sampling_Time, Quantity, Flow_Rate,
|
||||||
|
@ -1132,7 +1128,7 @@ public class GammaFileUtil {
|
||||||
for (int i=0; i<18; i++){
|
for (int i=0; i<18; i++){
|
||||||
detailInfo.add("");
|
detailInfo.add("");
|
||||||
}
|
}
|
||||||
detailInfo.set(0, phd.getId_sample()); // Sample_Id
|
detailInfo.set(0, Objects.nonNull(sampleId)?sampleId.toString():""); // Sample_Id
|
||||||
detailInfo.set(1, phd.getHeader().getSite_code()); // Station_Code
|
detailInfo.set(1, phd.getHeader().getSite_code()); // Station_Code
|
||||||
detailInfo.set(2, phd.getHeader().getDetector_code()); // Detector_Code
|
detailInfo.set(2, phd.getHeader().getDetector_code()); // Detector_Code
|
||||||
detailInfo.set(3, phd.getHeader().getSystem_type()); // System_Type
|
detailInfo.set(3, phd.getHeader().getSystem_type()); // System_Type
|
||||||
|
@ -1144,7 +1140,7 @@ public class GammaFileUtil {
|
||||||
Date collect_stop_dt = DateUtils.parseDate(collect_stop,"yyyy/MM/dd HH:mm:ss");
|
Date collect_stop_dt = DateUtils.parseDate(collect_stop,"yyyy/MM/dd HH:mm:ss");
|
||||||
detailInfo.set(8, phd.getCollect().getCollection_start_date() + " " + phd.getCollect().getCollection_start_time());
|
detailInfo.set(8, phd.getCollect().getCollection_start_date() + " " + phd.getCollect().getCollection_start_time());
|
||||||
Date date = DateUtils.parseDate(phd.getCollect().getCollection_start_date() + " " + phd.getCollect().getCollection_start_time().substring(0,phd.getCollect().getCollection_start_time().indexOf(StringPool.DOT)),"yyyy/MM/dd HH:mm:ss");
|
Date date = DateUtils.parseDate(phd.getCollect().getCollection_start_date() + " " + phd.getCollect().getCollection_start_time().substring(0,phd.getCollect().getCollection_start_time().indexOf(StringPool.DOT)),"yyyy/MM/dd HH:mm:ss");
|
||||||
double timeSpan = (date.getTime()/1000 - collect_stop_dt.getTime()/1000) / 3600.0;
|
double timeSpan = (collect_stop_dt.getTime()/1000 - date.getTime()/1000) / 3600.0;
|
||||||
detailInfo.set(9, String.format("%.2f", timeSpan));// Sampling_Time
|
detailInfo.set(9, String.format("%.2f", timeSpan));// Sampling_Time
|
||||||
detailInfo.set(10, String.format("%.2f", phd.getCollect().getAir_volume()));
|
detailInfo.set(10, String.format("%.2f", phd.getCollect().getAir_volume()));
|
||||||
if(timeSpan != 0){
|
if(timeSpan != 0){
|
||||||
|
@ -1155,7 +1151,7 @@ public class GammaFileUtil {
|
||||||
Date start_date = DateUtils.parseDate(start_time, "yyyy/MM/dd HH:mm:ss");
|
Date start_date = DateUtils.parseDate(start_time, "yyyy/MM/dd HH:mm:ss");
|
||||||
detailInfo.set(13, String.format("%.2f", phd.getAcq().getAcquisition_real_time()));
|
detailInfo.set(13, String.format("%.2f", phd.getAcq().getAcquisition_real_time()));
|
||||||
detailInfo.set(14, String.format("%.2f", phd.getAcq().getAcquisition_live_time()));
|
detailInfo.set(14, String.format("%.2f", phd.getAcq().getAcquisition_live_time()));
|
||||||
double timespan = (collect_stop_dt.getTime()/1000 - start_date.getTime()/1000);
|
double timespan = (start_date.getTime()/1000 - collect_stop_dt.getTime()/1000);
|
||||||
detailInfo.set(15, String.format("%.2f", timespan / 3600.0));
|
detailInfo.set(15, String.format("%.2f", timespan / 3600.0));
|
||||||
detailInfo.set(17, phd.getCategory());
|
detailInfo.set(17, phd.getCategory());
|
||||||
return detailInfo;
|
return detailInfo;
|
||||||
|
@ -1463,41 +1459,53 @@ public class GammaFileUtil {
|
||||||
return datalist;
|
return datalist;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean AnalyseData(PHDFile phd, boolean bSingle, String userName){
|
public boolean AnalyseData(PHDFile phd, ConfigureData configureData, List<String> nuclides, boolean bSingle){
|
||||||
|
//调用方法判断是否修改了参数
|
||||||
|
if (Objects.nonNull(configureData)){
|
||||||
|
SpecSetup phdSetting = phd.getSetting();
|
||||||
|
phdSetting.setECutAnalysis_Low(configureData.getECutAnalysis_Low());
|
||||||
|
phdSetting.setECutAnalysis_High(configureData.getECutAnalysis_High());
|
||||||
|
phdSetting.setEnergyTolerance(configureData.getEnergyTolerance());
|
||||||
|
phdSetting.setPSS_low(configureData.getPSS_low());
|
||||||
|
phdSetting.setBaseImprovePSS(configureData.getBaseImprovePSS());
|
||||||
|
phdSetting.setK_back(configureData.getK_back());
|
||||||
|
phdSetting.setK_alpha(configureData.getK_alpha());
|
||||||
|
phdSetting.setK_beta(configureData.getK_beta());
|
||||||
|
phdSetting.setRiskLevelK(configureData.getRiskLevelK());
|
||||||
|
phdSetting.setRefTime_act(configureData.getRefTime_act());
|
||||||
|
phdSetting.setRefTime_conc(configureData.getRefTime_conc());
|
||||||
|
}
|
||||||
|
|
||||||
int change = SettingChanged(phd);
|
int change = SettingChanged(phd);
|
||||||
if(change == 0 && phd.getVPeak().size() > 0){
|
if(change == 0 && phd.getVPeak().size() > 0) return false;
|
||||||
return false;
|
else if(change == -1) {
|
||||||
} else if(change == -1) {
|
|
||||||
phd.setUsedEffi(phd.getNewEffi());
|
phd.setUsedEffi(phd.getNewEffi());
|
||||||
phd.setUsedEffiKD(phd.getMapEffiKD().get(phd.getNewEffi()));
|
phd.setUsedEffiKD(phd.getMapEffiKD().get(phd.getNewEffi()));
|
||||||
phd.setUsedEffiPara(phd.getMapEffiPara().get(phd.getNewEffi()));
|
phd.setUsedEffiPara(phd.getMapEffiPara().get(phd.getNewEffi()));
|
||||||
UpdateEfficiency(phd);
|
UpdateEfficiency(phd);
|
||||||
Map<String, NuclideLines> map = new HashMap<>();
|
Map<String, NuclideLines> nuclideLinesMap = GetNuclideLines(nuclides);
|
||||||
if (phd.getHeader().getSystem_type().equals("P")){
|
NuclidesIdent(phd, nuclideLinesMap);
|
||||||
map = (Map<String, NuclideLines>)redisUtil.get("Gamma:GammaPInit" + userName);
|
|
||||||
} else if (phd.getHeader().getSystem_type().equals("G")) {
|
|
||||||
map = (Map<String, NuclideLines>)redisUtil.get("Gamma:GammaGInit"+userName);
|
|
||||||
}
|
|
||||||
NuclidesIdent(phd, map);
|
|
||||||
RunQC(phd);
|
RunQC(phd);
|
||||||
String Warning = "Finish three tasks:\n"+
|
String Warning = "Finish three tasks:\n"+
|
||||||
"\t1.Update efficiencies of all peaks;\n"+
|
"\t1.Update efficiencies of all peaks;\n"+
|
||||||
"\t2.Identify nuclides again;\n"+
|
"\t2.Identify nuclides again;\n"+
|
||||||
"\t3.Test QC again.";
|
"\t3.Test QC again.";
|
||||||
} else {
|
} else {
|
||||||
// if(bSingle)
|
if(bSingle) {
|
||||||
// {
|
|
||||||
// AnalyseFlowChart flow_dlg(this);
|
// AnalyseFlowChart flow_dlg(this);
|
||||||
// flow_dlg.exec();
|
// flow_dlg.exec();
|
||||||
// } else {
|
} else {
|
||||||
// Map<String, NuclideLines> t_map = (phd->header.system_type == "P" ? m_mapNucLineP : m_mapNucLineG);
|
Map<String, NuclideLines> nuclideLinesMap = GetNuclideLines(nuclides);
|
||||||
// GammaAnalyALG alg;
|
// AnalyseSpectrum(phd, nuclideLinesMap);
|
||||||
// alg.AnalyseSpectrum(phd, t_map);
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean AnalyseSpectrum(PHDFile phd, Map<String, NuclideLines> map){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public int SettingChanged(PHDFile phd) {
|
public int SettingChanged(PHDFile phd) {
|
||||||
SpecSetup newSets = phd.getSetting();
|
SpecSetup newSets = phd.getSetting();
|
||||||
SpecSetup oldSets = phd.getUsedSetting();
|
SpecSetup oldSets = phd.getUsedSetting();
|
||||||
|
@ -1505,7 +1513,7 @@ public class GammaFileUtil {
|
||||||
if(newSets.getECutAnalysis_Low() != oldSets.getECutAnalysis_Low()
|
if(newSets.getECutAnalysis_Low() != oldSets.getECutAnalysis_Low()
|
||||||
|| newSets.getECutAnalysis_High() != oldSets.getECutAnalysis_High()
|
|| newSets.getECutAnalysis_High() != oldSets.getECutAnalysis_High()
|
||||||
|| newSets.getEnergyTolerance() != oldSets.getEnergyTolerance()
|
|| newSets.getEnergyTolerance() != oldSets.getEnergyTolerance()
|
||||||
|| newSets.getPSS_low() != oldSets.getPSS_low()
|
|| newSets.getPSS_low() != oldSets.getCalibrationPSS_low()
|
||||||
|| newSets.getBaseImprovePSS() != oldSets.getBaseImprovePSS()
|
|| newSets.getBaseImprovePSS() != oldSets.getBaseImprovePSS()
|
||||||
|| newSets.getK_back() != oldSets.getK_back()
|
|| newSets.getK_back() != oldSets.getK_back()
|
||||||
|| newSets.getK_alpha() != oldSets.getK_alpha()
|
|| newSets.getK_alpha() != oldSets.getK_alpha()
|
||||||
|
@ -1519,9 +1527,7 @@ public class GammaFileUtil {
|
||||||
|
|
||||||
List<Double> old_ener = phd.getUsedEnerPara().getP();
|
List<Double> old_ener = phd.getUsedEnerPara().getP();
|
||||||
List<Double> new_ener = phd.getMapEnerPara().get(phd.getNewEner()).getP();
|
List<Double> new_ener = phd.getMapEnerPara().get(phd.getNewEner()).getP();
|
||||||
if(old_ener.size() != new_ener.size()){
|
if(old_ener.size() != new_ener.size()) return 1;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
for(int i=0; i<old_ener.size(); ++i) {
|
for(int i=0; i<old_ener.size(); ++i) {
|
||||||
if(Math.abs(old_ener.get(i) - new_ener.get(i)) > 1E-6){
|
if(Math.abs(old_ener.get(i) - new_ener.get(i)) > 1E-6){
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1530,9 +1536,7 @@ public class GammaFileUtil {
|
||||||
|
|
||||||
List<Double> old_reso = phd.getUsedResoPara().getP();
|
List<Double> old_reso = phd.getUsedResoPara().getP();
|
||||||
List<Double> new_reso = phd.getMapResoPara().get(phd.getNewReso()).getP();
|
List<Double> new_reso = phd.getMapResoPara().get(phd.getNewReso()).getP();
|
||||||
if(old_reso.size() != new_reso.size()){
|
if(old_reso.size() != new_reso.size()) return 1;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
for(int i=0; i<old_reso.size(); ++i) {
|
for(int i=0; i<old_reso.size(); ++i) {
|
||||||
if(Math.abs(old_reso.get(i) - new_reso.get(i)) > 1E-6){
|
if(Math.abs(old_reso.get(i) - new_reso.get(i)) > 1E-6){
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1541,15 +1545,12 @@ public class GammaFileUtil {
|
||||||
|
|
||||||
List<Double> old_effi = phd.getUsedEffiPara().getP();
|
List<Double> old_effi = phd.getUsedEffiPara().getP();
|
||||||
List<Double> new_effi = phd.getMapEffiPara().get(phd.getNewEffi()).getP();
|
List<Double> new_effi = phd.getMapEffiPara().get(phd.getNewEffi()).getP();
|
||||||
if(old_effi.size() != new_effi.size()){
|
if(old_effi.size() != new_effi.size()) return -1;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
for(int i=0; i<old_effi.size(); ++i) {
|
for(int i=0; i<old_effi.size(); ++i) {
|
||||||
if(Math.abs(old_effi.get(i) - new_effi.get(i)) > 1E-6){
|
if(Math.abs(old_effi.get(i) - new_effi.get(i)) > 1E-6){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2326,11 +2327,12 @@ public class GammaFileUtil {
|
||||||
GardsNuclLib parentAndDaughter = spectrumAnalysisMapper.getParentAndDaughter(name);
|
GardsNuclLib parentAndDaughter = spectrumAnalysisMapper.getParentAndDaughter(name);
|
||||||
List<String> parentList = new LinkedList<>();
|
List<String> parentList = new LinkedList<>();
|
||||||
if(Objects.nonNull(parentAndDaughter)) {
|
if(Objects.nonNull(parentAndDaughter)) {
|
||||||
parentList.add(parentAndDaughter.getDaughters1());
|
parentList.add(parentAndDaughter.getParents1());
|
||||||
parentList.add(parentAndDaughter.getDaughters2());
|
parentList.add(parentAndDaughter.getParents2());
|
||||||
parentList.add(parentAndDaughter.getDaughters3());
|
parentList.add(parentAndDaughter.getParents3());
|
||||||
parentList.add(parentAndDaughter.getDaughters4());
|
parentList.add(parentAndDaughter.getParents4());
|
||||||
parentList.add(parentAndDaughter.getDaughters5());
|
parentList.add(parentAndDaughter.getParents5());
|
||||||
|
parentList.add(parentAndDaughter.getParents6());
|
||||||
map.put("list_parent", parentList);
|
map.put("list_parent", parentList);
|
||||||
List<TableDaughter> daughterList = new LinkedList<>();
|
List<TableDaughter> daughterList = new LinkedList<>();
|
||||||
TableDaughter tableDaughter1 = new TableDaughter();
|
TableDaughter tableDaughter1 = new TableDaughter();
|
||||||
|
@ -2793,11 +2795,11 @@ public class GammaFileUtil {
|
||||||
middleData.calibration_pairs_E_yValue = DoubleLimit(fileAnlyse.getUsedEnerKD().getG_energy());
|
middleData.calibration_pairs_E_yValue = DoubleLimit(fileAnlyse.getUsedEnerKD().getG_energy());
|
||||||
middleData.calibration_pairs_E_uncYValue =DoubleLimit(fileAnlyse.getUsedEnerKD().getUncertainty());
|
middleData.calibration_pairs_E_uncYValue =DoubleLimit(fileAnlyse.getUsedEnerKD().getUncertainty());
|
||||||
|
|
||||||
if(Objects.nonNull(fileAnlyse.getMapEnerKD().get("PHD"))) {
|
if(Objects.nonNull(fileAnlyse.getMapEnerKD().get(CalName.CalPHD.getType()))) {
|
||||||
middleData.calibration_pairs_S_E_idCalPoint =DoubleLimit(temp);
|
middleData.calibration_pairs_S_E_idCalPoint =DoubleLimit(temp);
|
||||||
middleData.calibration_pairs_S_E_xValue =DoubleLimit(fileAnlyse.getMapEnerKD().get("PHD").getCentroid_channel());
|
middleData.calibration_pairs_S_E_xValue =DoubleLimit(fileAnlyse.getMapEnerKD().get(CalName.CalPHD.getType()).getCentroid_channel());
|
||||||
middleData.calibration_pairs_S_E_yValue =DoubleLimit(fileAnlyse.getMapEnerKD().get("PHD").getG_energy());
|
middleData.calibration_pairs_S_E_yValue =DoubleLimit(fileAnlyse.getMapEnerKD().get(CalName.CalPHD.getType()).getG_energy());
|
||||||
middleData.calibration_pairs_S_E_uncYValue =DoubleLimit(fileAnlyse.getMapEnerKD().get("PHD").getUncertainty());
|
middleData.calibration_pairs_S_E_uncYValue =DoubleLimit(fileAnlyse.getMapEnerKD().get(CalName.CalPHD.getType()).getUncertainty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2818,11 +2820,11 @@ public class GammaFileUtil {
|
||||||
middleData.calibration_pairs_EF_yValue =DoubleLimit(fileAnlyse.getUsedEffiKD().getEfficiency());
|
middleData.calibration_pairs_EF_yValue =DoubleLimit(fileAnlyse.getUsedEffiKD().getEfficiency());
|
||||||
middleData.calibration_pairs_EF_uncYValue=DoubleLimit(fileAnlyse.getUsedEffiKD().getUncertainty());
|
middleData.calibration_pairs_EF_uncYValue=DoubleLimit(fileAnlyse.getUsedEffiKD().getUncertainty());
|
||||||
|
|
||||||
if(Objects.nonNull(fileAnlyse.getMapEffiKD().get("PHD"))) {
|
if(Objects.nonNull(fileAnlyse.getMapEffiKD().get(CalName.CalPHD.getType()))) {
|
||||||
middleData.calibration_pairs_S_EF_idCalPoint =DoubleLimit(temp);
|
middleData.calibration_pairs_S_EF_idCalPoint =DoubleLimit(temp);
|
||||||
middleData.calibration_pairs_S_EF_xValue =DoubleLimit(fileAnlyse.getMapEffiKD().get("PHD").getG_energy());
|
middleData.calibration_pairs_S_EF_xValue =DoubleLimit(fileAnlyse.getMapEffiKD().get(CalName.CalPHD.getType()).getG_energy());
|
||||||
middleData.calibration_pairs_S_EF_yValue =DoubleLimit(fileAnlyse.getMapEffiKD().get("PHD").getEfficiency());
|
middleData.calibration_pairs_S_EF_yValue =DoubleLimit(fileAnlyse.getMapEffiKD().get(CalName.CalPHD.getType()).getEfficiency());
|
||||||
middleData.calibration_pairs_S_EF_uncYValue=DoubleLimit(fileAnlyse.getMapEffiKD().get("PHD").getUncertainty());
|
middleData.calibration_pairs_S_EF_uncYValue=DoubleLimit(fileAnlyse.getMapEffiKD().get(CalName.CalPHD.getType()).getUncertainty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2842,11 +2844,11 @@ public class GammaFileUtil {
|
||||||
middleData.calibration_pairs_R_yValue =DoubleLimit(fileAnlyse.getUsedResoKD().getFWHM());
|
middleData.calibration_pairs_R_yValue =DoubleLimit(fileAnlyse.getUsedResoKD().getFWHM());
|
||||||
middleData.calibration_pairs_R_uncYValue =DoubleLimit(fileAnlyse.getUsedResoKD().getUncertainty());
|
middleData.calibration_pairs_R_uncYValue =DoubleLimit(fileAnlyse.getUsedResoKD().getUncertainty());
|
||||||
|
|
||||||
if(Objects.nonNull(fileAnlyse.getMapResoKD().get("PHD"))) {
|
if(Objects.nonNull(fileAnlyse.getMapResoKD().get(CalName.CalPHD.getType()))) {
|
||||||
middleData.calibration_pairs_S_R_idCalPoint =DoubleLimit(temp);
|
middleData.calibration_pairs_S_R_idCalPoint =DoubleLimit(temp);
|
||||||
middleData.calibration_pairs_S_R_xValue =DoubleLimit(fileAnlyse.getMapResoKD().get("PHD").getG_energy());
|
middleData.calibration_pairs_S_R_xValue =DoubleLimit(fileAnlyse.getMapResoKD().get(CalName.CalPHD.getType()).getG_energy());
|
||||||
middleData.calibration_pairs_S_R_yValue =DoubleLimit(fileAnlyse.getMapResoKD().get("PHD").getFWHM());
|
middleData.calibration_pairs_S_R_yValue =DoubleLimit(fileAnlyse.getMapResoKD().get(CalName.CalPHD.getType()).getFWHM());
|
||||||
middleData.calibration_pairs_S_R_uncYValue =DoubleLimit(fileAnlyse.getMapResoKD().get("PHD").getUncertainty());
|
middleData.calibration_pairs_S_R_uncYValue =DoubleLimit(fileAnlyse.getMapResoKD().get(CalName.CalPHD.getType()).getUncertainty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2865,11 +2867,11 @@ public class GammaFileUtil {
|
||||||
middleData.calibration_pairs_T_xValue =DoubleLimit(fileAnlyse.getUsedTotEKD().getG_energy());
|
middleData.calibration_pairs_T_xValue =DoubleLimit(fileAnlyse.getUsedTotEKD().getG_energy());
|
||||||
middleData.calibration_pairs_T_yValue =DoubleLimit(fileAnlyse.getUsedTotEKD().getTotal_efficiency());
|
middleData.calibration_pairs_T_yValue =DoubleLimit(fileAnlyse.getUsedTotEKD().getTotal_efficiency());
|
||||||
middleData.calibration_pairs_T_uncYValue =DoubleLimit(fileAnlyse.getUsedTotEKD().getUncertainty());
|
middleData.calibration_pairs_T_uncYValue =DoubleLimit(fileAnlyse.getUsedTotEKD().getUncertainty());
|
||||||
if(Objects.nonNull(fileAnlyse.getMapTotEKD().get("PHD"))) {
|
if(Objects.nonNull(fileAnlyse.getMapTotEKD().get(CalName.CalPHD.getType()))) {
|
||||||
middleData.calibration_pairs_S_T_idCalPoint =DoubleLimit(temp);
|
middleData.calibration_pairs_S_T_idCalPoint =DoubleLimit(temp);
|
||||||
middleData.calibration_pairs_S_T_xValue =DoubleLimit(fileAnlyse.getMapTotEKD().get("PHD").getG_energy());
|
middleData.calibration_pairs_S_T_xValue =DoubleLimit(fileAnlyse.getMapTotEKD().get(CalName.CalPHD.getType()).getG_energy());
|
||||||
middleData.calibration_pairs_S_T_yValue =DoubleLimit(fileAnlyse.getMapTotEKD().get("PHD").getTotal_efficiency());
|
middleData.calibration_pairs_S_T_yValue =DoubleLimit(fileAnlyse.getMapTotEKD().get(CalName.CalPHD.getType()).getTotal_efficiency());
|
||||||
middleData.calibration_pairs_S_T_uncYValue =DoubleLimit(fileAnlyse.getMapTotEKD().get("PHD").getUncertainty());
|
middleData.calibration_pairs_S_T_uncYValue =DoubleLimit(fileAnlyse.getMapTotEKD().get(CalName.CalPHD.getType()).getUncertainty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3537,4 +3539,283 @@ public class GammaFileUtil {
|
||||||
return spectrum.toString();
|
return spectrum.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double GetEnergyByFloatChan(PHDFile phd, int channel){
|
||||||
|
// 算法描述:取指定点附近的两点,根据 y=ax+b 方程求指定点处的能量
|
||||||
|
double y = 0.0;
|
||||||
|
long m_nCount = phd.getSpec().getNum_g_channel();
|
||||||
|
int index = channel > 0 ? channel-1 : channel; // 确保索引大于等于0
|
||||||
|
if(phd.getVEnergy().size() == m_nCount && index < m_nCount) // 确保索引有效
|
||||||
|
{
|
||||||
|
int index2 = (index < m_nCount-1 ? index + 1 : index - 1);
|
||||||
|
double y1 = phd.getVEnergy().get(index);
|
||||||
|
double y2 = phd.getVEnergy().get(index2);
|
||||||
|
y = y1 + (y2 - y1) / (index2 - index) * (channel - index);
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> InitList(double energy, double tolerance, List<String> nuclides){
|
||||||
|
if(nuclides.size() < 1){
|
||||||
|
return new LinkedList<>();
|
||||||
|
}
|
||||||
|
double min = energy - tolerance;
|
||||||
|
double max = energy + tolerance;
|
||||||
|
List<String> nuclideList = spectrumAnalysisMapper.findNuclideList(min, max, nuclides);
|
||||||
|
return nuclideList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitTable(String name, Map<String, Object> map, PHDFile phd){
|
||||||
|
InitNuclideInfo(name, map);
|
||||||
|
long span = phd.getSpec().getG_energy_span();
|
||||||
|
List<GardsNuclLinesLib> nuclideTableList = spectrumAnalysisMapper.getNuclideTable(name, span);
|
||||||
|
if (CollectionUtils.isNotEmpty(nuclideTableList)){
|
||||||
|
map.put("table", nuclideTableList);
|
||||||
|
InitChart(nuclideTableList, phd, map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitNuclideInfo(String name, Map<String, Object> map){
|
||||||
|
map.put("name", name);
|
||||||
|
|
||||||
|
GardsNuclLib nuclideInfo = spectrumAnalysisMapper.getNuclideInfo(name);
|
||||||
|
if(Objects.nonNull(nuclideInfo)) {
|
||||||
|
map.put("lines", nuclideInfo.getNumLines());
|
||||||
|
if(Objects.isNull(nuclideInfo.getHalflife())) {
|
||||||
|
map.put("halfLife", "");
|
||||||
|
} else {
|
||||||
|
String units = "D";
|
||||||
|
double halflife = nuclideInfo.getHalflife().doubleValue();
|
||||||
|
if(halflife >= 1000) {
|
||||||
|
halflife = halflife / 365.25;
|
||||||
|
units = "A";
|
||||||
|
} else if(halflife < 0.1 && halflife >= 1.0 / 1440) {
|
||||||
|
halflife = halflife * 1440;
|
||||||
|
units = "M";
|
||||||
|
} else if(halflife <= 1.0 / 1440 && halflife > 0) {
|
||||||
|
halflife = halflife * 86400;
|
||||||
|
units = "S";
|
||||||
|
}
|
||||||
|
halflife = halflife + 0.0001;
|
||||||
|
map.put("halfLife", String.format("%.3f", halflife) + units);
|
||||||
|
}
|
||||||
|
if(Objects.isNull(nuclideInfo.getHalflifeErr())) {
|
||||||
|
map.put("halfLifeErr", "");
|
||||||
|
} else {
|
||||||
|
map.put("halfLifeErr", String.format("%.3f", nuclideInfo.getHalflifeErr().doubleValue())+"%");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitChart(List<GardsNuclLinesLib> nuclideTableList, PHDFile phd, Map<String, Object> map){
|
||||||
|
List<Map<String, Object>> chartList = new LinkedList<>();
|
||||||
|
for (int i=0; i < nuclideTableList.size(); i++){
|
||||||
|
Map<String, Object> chartMap = new HashMap<>();
|
||||||
|
GardsNuclLinesLib item = nuclideTableList.get(i);
|
||||||
|
double energy = item.getEnergy();
|
||||||
|
List<ChartData> chartData = Energy_Count_Base(energy, 30, phd);
|
||||||
|
String title = "Line" + (i+1);
|
||||||
|
String bottom = "Abundance:" + item.getYield();
|
||||||
|
String selPos = energy+"";
|
||||||
|
String cursorText = energy + " keV";
|
||||||
|
chartMap.put("chartData", chartData);
|
||||||
|
chartMap.put("title", title);
|
||||||
|
chartMap.put("bottom", bottom);
|
||||||
|
chartMap.put("selPos", selPos);
|
||||||
|
chartMap.put("cursorText", cursorText);
|
||||||
|
chartList.add(chartMap);
|
||||||
|
}
|
||||||
|
map.put("chart", chartList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ChartData> Energy_Count_Base(double energy, int chanNum, PHDFile phd) {
|
||||||
|
List<ChartData> datalist = new LinkedList<>();
|
||||||
|
int channel = GetChannelByEnergy(energy, 0, phd);
|
||||||
|
int start = channel-chanNum/2, end = channel+chanNum/2;
|
||||||
|
if(start < 1) {
|
||||||
|
start = 1;
|
||||||
|
end = start + chanNum;
|
||||||
|
} else if(end > phd.getSpec().getNum_g_channel()) {
|
||||||
|
end = (int) phd.getSpec().getNum_g_channel();
|
||||||
|
start = end - chanNum;
|
||||||
|
}
|
||||||
|
datalist.add(Energy_CountCahrt(start, end, phd));
|
||||||
|
datalist.add(Energy_BaseLine(start, end, phd));
|
||||||
|
return datalist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChartData Energy_CountCahrt(int start, int end, PHDFile phd) {
|
||||||
|
ChartData data1 = new ChartData();
|
||||||
|
if(phd.getSpec().getNum_g_channel() > 1 && phd.getVEnergy().size() == phd.getSpec().getNum_g_channel()) {
|
||||||
|
if(start < 1){
|
||||||
|
start = 1;
|
||||||
|
}
|
||||||
|
if(end < 1 || end > phd.getSpec().getNum_g_channel()){
|
||||||
|
end = (int) phd.getSpec().getNum_g_channel();
|
||||||
|
}
|
||||||
|
for(int i=start-1; i<end; ++i) {
|
||||||
|
SeriseData seriseData = new SeriseData();
|
||||||
|
seriseData.setX(phd.getVEnergy().get(i));
|
||||||
|
seriseData.setY(phd.getSpec().getCounts().get(i));
|
||||||
|
//if(m_phd->Spectrum.counts[i] == 0) continue;
|
||||||
|
data1.getPointlist().add(seriseData);
|
||||||
|
}
|
||||||
|
data1.setName("Energy");
|
||||||
|
data1.setGroup("energy");
|
||||||
|
data1.setColor("255,255,0"); // 颜色:原谱:0;峰:1;Lc:2;BaseLine:3;Scac:4;比较谱:5;
|
||||||
|
}
|
||||||
|
return data1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChartData Energy_BaseLine(int start, int end, PHDFile phd) {
|
||||||
|
ChartData cData = new ChartData();
|
||||||
|
if(phd.getSpec().getNum_g_channel() > 1 && phd.getVEnergy().size() == phd.getSpec().getNum_g_channel() && phd.getVBase().size() == phd.getSpec().getNum_g_channel()) {
|
||||||
|
if(start < 1){
|
||||||
|
start = 1;
|
||||||
|
}
|
||||||
|
if(end > phd.getSpec().getNum_g_channel() || end < 1){
|
||||||
|
end = (int) phd.getSpec().getNum_g_channel();
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i=start-1; i<end; ++i) {
|
||||||
|
SeriseData seriseData = new SeriseData();
|
||||||
|
seriseData.setX(phd.getVEnergy().get(i));
|
||||||
|
seriseData.setY(phd.getVBase().get(i));
|
||||||
|
cData.getPointlist().add(seriseData);
|
||||||
|
}
|
||||||
|
cData.setGroup("energy");
|
||||||
|
cData.setName("BaseLine");
|
||||||
|
cData.setColor("0,246,255");
|
||||||
|
cData.setType("Line");
|
||||||
|
}
|
||||||
|
return cData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetChannelByEnergy(double energy, int startIndex, PHDFile phd) {
|
||||||
|
// 注:索引从0开始,道从1开始,道 = 索引 + 1
|
||||||
|
if(startIndex < 0) startIndex = 0;
|
||||||
|
int channel = startIndex + 1; // 将 channel 设为 startIndex 处的道数
|
||||||
|
for(int i=channel; i<phd.getVEnergy().size(); ++i) // 从 startIndex 的下一个索引开始
|
||||||
|
{
|
||||||
|
if(phd.getVEnergy().get(i) >= energy) {
|
||||||
|
if(phd.getVEnergy().get(i) - energy > energy - phd.getVEnergy().get(i-1)){
|
||||||
|
channel = i; // 道在索引(i-1)处
|
||||||
|
} else{
|
||||||
|
channel = i+1; // 道在索引(i)处
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitPara(PHDFile phd){
|
||||||
|
List<Double> Acal_tail_para = new LinkedList<>();
|
||||||
|
Acal_tail_para.add(99.0);
|
||||||
|
Acal_tail_para.add(0.0);
|
||||||
|
Acal_tail_para.add(0.0);
|
||||||
|
Acal_tail_para.add(0.0);
|
||||||
|
phd.getPara_tail().setP(Acal_tail_para);
|
||||||
|
List<Double> Acal_tail_alpha_para = new LinkedList<>();
|
||||||
|
Acal_tail_alpha_para.add(98.0);
|
||||||
|
Acal_tail_alpha_para.add(1.0);
|
||||||
|
phd.getPara_tailAlpha().setP(Acal_tail_alpha_para);
|
||||||
|
List<Double> Acal_tail_right_para = new LinkedList<>();
|
||||||
|
Acal_tail_right_para.add(98.0);
|
||||||
|
Acal_tail_right_para.add(0.35);
|
||||||
|
phd.getPara_tailRight().setP(Acal_tail_right_para);
|
||||||
|
List<Double> Acal_tail_right_alpha_para = new LinkedList<>();
|
||||||
|
Acal_tail_right_alpha_para.add(98.0);
|
||||||
|
Acal_tail_right_alpha_para.add(1.0);
|
||||||
|
phd.getPara_tailRightAlpha().setP(Acal_tail_right_alpha_para);
|
||||||
|
List<Double> Acal_step_ratio_para = new LinkedList<>();
|
||||||
|
Acal_step_ratio_para.add(98.0);
|
||||||
|
Acal_step_ratio_para.add(0.0);
|
||||||
|
phd.getPara_stepRatio().setP(Acal_step_ratio_para);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PeaksChanged(PHDFile phd) {
|
||||||
|
List<Double> vCentroid = new LinkedList<>();
|
||||||
|
List<Double> vFwhmCh = new LinkedList<>();
|
||||||
|
List<Double> vTail = new LinkedList<>();
|
||||||
|
List<Double> vUpperTail = new LinkedList<>();
|
||||||
|
for (PeakInfo peak: phd.getVPeak()) {
|
||||||
|
vCentroid.add(peak.peakCentroid);
|
||||||
|
vFwhmCh.add(peak.fwhmc);
|
||||||
|
vTail.add(peak.tail);
|
||||||
|
vUpperTail.add(peak.upperTail);
|
||||||
|
}
|
||||||
|
//m_data->m_phd->vPeak
|
||||||
|
CalValuesHandler.ComputePeakRange(phd.getVPeak().size(), (int) phd.getSpec().getNum_g_channel(), vCentroid, vFwhmCh, vTail, vUpperTail);
|
||||||
|
//
|
||||||
|
// if(m_data->m_phd->header.system_type.toUpper() == "P")
|
||||||
|
// {
|
||||||
|
// AlgFunc::NuclidesIdent(m_data->m_phd, m_data->m_mapNucLineP);
|
||||||
|
// }
|
||||||
|
// else AlgFunc::NuclidesIdent(m_data->m_phd, m_data->m_mapNucLineG);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int FindNearPeak(List<PeakInfo> vPeak, int channel, boolean bFind) {
|
||||||
|
boolean t_bFind = false;
|
||||||
|
int i=0, peakNum = vPeak.size();
|
||||||
|
for(; i<peakNum; ++i) {
|
||||||
|
PeakInfo peak = vPeak.get(i);
|
||||||
|
if(channel >= peak.left && channel <= peak.right) {
|
||||||
|
// 如果 channel 在峰的左右边界内
|
||||||
|
if(peak.multiIndex > 0 && channel > peak.peakCentroid) {
|
||||||
|
// 如果是重峰,且 channel 在重峰的第一个峰的中心道右侧
|
||||||
|
int j = i;
|
||||||
|
double temp = channel - peak.peakCentroid;
|
||||||
|
while(++j < peakNum && vPeak.get(j).multiIndex == peak.multiIndex) {
|
||||||
|
if(Math.abs(vPeak.get(j).peakCentroid - channel) < temp) // 找出重峰中峰中心道离 channel 最近的峰
|
||||||
|
{
|
||||||
|
temp = Math.abs(vPeak.get(j).peakCentroid - channel);
|
||||||
|
i = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// channel 在索引(i)对应的峰内
|
||||||
|
t_bFind = true;
|
||||||
|
break;
|
||||||
|
} else if(peak.left > channel) {
|
||||||
|
// channel 不在任何峰内,找离它最近的峰
|
||||||
|
if(i>0 && channel-vPeak.get(i-1).peakCentroid < peak.peakCentroid-channel) i -= 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(i >= peakNum) i -= 1;
|
||||||
|
if(bFind) bFind = t_bFind;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TablePeaks> FitPeakBaseLine(PHDFile phd, List<Integer> vIdx){
|
||||||
|
List<TablePeaks> tablePeaksList = new LinkedList<>();
|
||||||
|
int peakNum = vIdx.size();
|
||||||
|
for (int i=0; i<peakNum; ++i) {
|
||||||
|
int peakIdx = vIdx.get(i);
|
||||||
|
int row = i+1;
|
||||||
|
PeakInfo peak = phd.getVPeak().get(peakIdx);
|
||||||
|
TablePeaks tablePeaks = new TablePeaks();
|
||||||
|
tablePeaks.setLab(String.valueOf(peakIdx + 1));
|
||||||
|
String nuclide = "";
|
||||||
|
for (String peakNuclide:peak.nuclides) {
|
||||||
|
nuclide+=peakNuclide+";";
|
||||||
|
}
|
||||||
|
tablePeaks.setNuclide(StringUtils.isBlank(nuclide)?nuclide:nuclide.substring(0,nuclide.length()-1));
|
||||||
|
tablePeaks.setEnergy(String.valueOf(peak.energy));
|
||||||
|
tablePeaks.setNetArea(String.valueOf(peak.area));
|
||||||
|
tablePeaks.setFwhm(String.valueOf(peak.fwhm));
|
||||||
|
tablePeaks.setStep(String.valueOf(peak.area * peak.stepRatio));
|
||||||
|
tablePeaks.setBwGamma("0");
|
||||||
|
// QLineEdit *edit_bwGamma = new QLineEdit(QString::number(peak.BWWidthChan * AlgFunc::calDerivaOut(peak.peakCentroid, m_enerPara)));
|
||||||
|
tablePeaks.setNetAreaB(false);
|
||||||
|
tablePeaks.setCentroid(true);
|
||||||
|
tablePeaks.setFwhmB(true);
|
||||||
|
tablePeaksList.add(tablePeaks);
|
||||||
|
}
|
||||||
|
return tablePeaksList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.apache.commons.net.ftp.FTP;
|
||||||
import org.apache.commons.net.ftp.FTPClient;
|
import org.apache.commons.net.ftp.FTPClient;
|
||||||
import org.apache.commons.net.ftp.FTPFile;
|
import org.apache.commons.net.ftp.FTPFile;
|
||||||
|
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||||
import org.jeecg.modules.base.vo.*;
|
import org.jeecg.modules.base.vo.*;
|
||||||
import org.jeecg.modules.entity.GardsXeResultsSpectrum;
|
import org.jeecg.modules.entity.GardsXeResultsSpectrum;
|
||||||
|
import org.jeecg.modules.entity.vo.*;
|
||||||
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
||||||
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
||||||
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
|
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
|
||||||
|
@ -20,14 +23,17 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class PHDFileUtil {
|
public class PHDFileUtil {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FTPUtil ftpUtil;
|
private FTPUtil ftpUtil;
|
||||||
|
@Autowired
|
||||||
|
private SpectrumPathProperties spectrumPathProperties;
|
||||||
|
|
||||||
public Map<String, Object> getSourceData(String filePath, String fileName, List<GardsXeResultsSpectrum> xeDataList, Integer sampleId, String status){
|
public Map<String, Object> getSourceData(String filePath, List<GardsXeResultsSpectrum> xeDataList, Integer sampleId, String status){
|
||||||
//加载dll工具库
|
//加载dll工具库
|
||||||
System.loadLibrary("ReadPHDFile");
|
System.loadLibrary("ReadPHDFile");
|
||||||
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(filePath);
|
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(filePath);
|
||||||
|
@ -59,7 +65,7 @@ public class PHDFileUtil {
|
||||||
//Acquisition Start
|
//Acquisition Start
|
||||||
Date AcquisitionStart = null;
|
Date AcquisitionStart = null;
|
||||||
if ( StringUtils.isNotBlank(struct.collection_start_date) && StringUtils.isNotBlank(struct.collection_start_time) ){
|
if ( StringUtils.isNotBlank(struct.collection_start_date) && StringUtils.isNotBlank(struct.collection_start_time) ){
|
||||||
AcquisitionStart = DateUtils.parseDate(struct.acquisition_start_date.replace(StringPool.SLASH,StringPool.DASH) + StringPool.SPACE + struct.acquisition_start_time.substring(0, struct.acquisition_start_time.indexOf(StringPool.DOT)), "yyyy-MM-dd HH:mm:ss");
|
AcquisitionStart = DateUtils.parseDate(struct.acquisition_start_date.replace(StringPool.SLASH,StringPool.DASH) + StringPool.SPACE + struct.acquisition_start_time);
|
||||||
}
|
}
|
||||||
//Acq Real Time
|
//Acq Real Time
|
||||||
double AcquisitionRealTime = struct.acquisition_real_time;
|
double AcquisitionRealTime = struct.acquisition_real_time;
|
||||||
|
@ -212,18 +218,20 @@ public class PHDFileUtil {
|
||||||
}
|
}
|
||||||
map.put("betaEnergyData", betaEnergyList);
|
map.put("betaEnergyData", betaEnergyList);
|
||||||
//Xe
|
//Xe
|
||||||
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
if (CollectionUtils.isNotEmpty(xeDataList)){
|
||||||
Double conc = xeData.getConc();
|
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
||||||
Double mdc = xeData.getMdc();
|
Double conc = xeData.getConc();
|
||||||
if (conc < 0){
|
Double mdc = xeData.getMdc();
|
||||||
xeData.setColor("red");
|
if (conc < 0){
|
||||||
} else if (0<conc && conc < mdc) {
|
xeData.setColor("red");
|
||||||
xeData.setColor("#ffcc30");
|
} else if (0<conc && conc < mdc) {
|
||||||
} else if (conc > mdc) {
|
xeData.setColor("#ffcc30");
|
||||||
xeData.setColor("green");
|
} else if (conc > mdc) {
|
||||||
|
xeData.setColor("green");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
map.put("XeData", xeDataList);
|
||||||
}
|
}
|
||||||
map.put("XeData", xeDataList);
|
|
||||||
//计算边界值
|
//计算边界值
|
||||||
CalcBgBoundaryParam calcBgBoundaryParam = new CalcBgBoundaryParam();
|
CalcBgBoundaryParam calcBgBoundaryParam = new CalcBgBoundaryParam();
|
||||||
calcBgBoundaryParam.g_e_cal = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
|
calcBgBoundaryParam.g_e_cal = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
|
||||||
|
@ -450,4 +458,162 @@ public class PHDFileUtil {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getFileData(String filePath){
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
//加载dll工具库
|
||||||
|
System.loadLibrary("ReadPHDFile");
|
||||||
|
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(filePath);
|
||||||
|
|
||||||
|
String dataType = struct.data_type;
|
||||||
|
String systemType = struct.system_type;
|
||||||
|
String spectrumQuantity = struct.spectrum_quantity;
|
||||||
|
double acquisitionLiveTime = struct.acquisition_live_time;
|
||||||
|
String measurementId = struct.measurement_id;
|
||||||
|
String gasBkMeasurementId = struct.gas_bk_measurement_id;
|
||||||
|
String detectorBkMeasurementId = struct.detector_bk_measurement_id;
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String NameStandardBy(String filePath, String fileName){
|
||||||
|
//连接ftp
|
||||||
|
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
|
InputStream inputStream = null;
|
||||||
|
File file = null;
|
||||||
|
try {
|
||||||
|
//被动模式
|
||||||
|
ftpClient.enterLocalPassiveMode();
|
||||||
|
//设置文件类型--二进制文件
|
||||||
|
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
|
||||||
|
//
|
||||||
|
ftpClient.setControlEncoding("UTF-8");
|
||||||
|
ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE);
|
||||||
|
//切换文件路径
|
||||||
|
ftpClient.changeWorkingDirectory(filePath);
|
||||||
|
//获取路径下所有文件信息
|
||||||
|
List<FTPFile> ftpFiles = Arrays.asList(ftpClient.listFiles());
|
||||||
|
if (CollectionUtils.isNotEmpty(ftpFiles)){
|
||||||
|
//根据文件名称 分别获取 sample gas det文件
|
||||||
|
List<FTPFile> files = ftpFiles.stream().filter(item -> item.getName().equals(fileName)).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(files)){
|
||||||
|
FTPFile ftpFile = files.get(0);
|
||||||
|
inputStream = ftpClient.retrieveFileStream(ftpFile.getName());
|
||||||
|
file = File.createTempFile("tmp", null);
|
||||||
|
//将ftp文件的输入流复制给临时文件
|
||||||
|
FileUtils.copyInputStreamToFile(inputStream, file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (Objects.nonNull(ftpClient)){
|
||||||
|
ftpClient.disconnect();
|
||||||
|
}
|
||||||
|
if (inputStream != null){
|
||||||
|
inputStream.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//加载动态库
|
||||||
|
System.loadLibrary("ReadPHDFile");
|
||||||
|
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(file.getAbsolutePath());
|
||||||
|
String systemType = sourceData.system_type;
|
||||||
|
String dataType = sourceData.data_type;
|
||||||
|
StringBuffer path = new StringBuffer();
|
||||||
|
if(systemType.contains("B")) {
|
||||||
|
path.append(StringPool.SLASH+"Spectrum");
|
||||||
|
path.append(StringPool.SLASH+"Xenon");
|
||||||
|
path.append(StringPool.SLASH+"Sauna");
|
||||||
|
} else if(systemType.contains("G")) {
|
||||||
|
path.append(StringPool.SLASH+"Spectrum");
|
||||||
|
path.append(StringPool.SLASH+"Xenon");
|
||||||
|
path.append(StringPool.SLASH+"Spalax");
|
||||||
|
}
|
||||||
|
if(dataType.contains("SAMPLEPHD")) {
|
||||||
|
path.append(StringPool.SLASH+"Samplephd");
|
||||||
|
} else if(dataType.contains("DETBKPHD")) {
|
||||||
|
path.append(StringPool.SLASH+"Detbkphd");
|
||||||
|
} else if(dataType.contains("GASBKPHD")) {
|
||||||
|
path.append(StringPool.SLASH+"Gasbkphd");
|
||||||
|
} else if(dataType.contains("QCPHD")) {
|
||||||
|
path.append(StringPool.SLASH+"Qcphd");
|
||||||
|
}
|
||||||
|
int pos = fileName.indexOf('-');
|
||||||
|
if(-1 == pos) {
|
||||||
|
|
||||||
|
} else if(fileName.length() >= pos+7) {
|
||||||
|
path.append(StringPool.SLASH+fileName.substring(pos+1,pos+5));
|
||||||
|
path.append(StringPool.SLASH+fileName.substring(pos+5,pos+7));
|
||||||
|
}
|
||||||
|
path.append(StringPool.SLASH+fileName);
|
||||||
|
return path.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BgBoundary CalBoundary(String filePath, String fileName){
|
||||||
|
//连接ftp
|
||||||
|
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
|
InputStream inputStream = null;
|
||||||
|
File file = null;
|
||||||
|
try {
|
||||||
|
//被动模式
|
||||||
|
ftpClient.enterLocalPassiveMode();
|
||||||
|
//设置文件类型--二进制文件
|
||||||
|
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
|
||||||
|
//
|
||||||
|
ftpClient.setControlEncoding("UTF-8");
|
||||||
|
ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE);
|
||||||
|
//切换文件路径
|
||||||
|
ftpClient.changeWorkingDirectory(filePath);
|
||||||
|
//获取路径下所有文件信息
|
||||||
|
List<FTPFile> ftpFiles = Arrays.asList(ftpClient.listFiles());
|
||||||
|
if (CollectionUtils.isNotEmpty(ftpFiles)){
|
||||||
|
//根据文件名称 分别获取 sample gas det文件
|
||||||
|
List<FTPFile> files = ftpFiles.stream().filter(item -> item.getName().equals(fileName)).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(files)){
|
||||||
|
FTPFile ftpFile = files.get(0);
|
||||||
|
inputStream = ftpClient.retrieveFileStream(ftpFile.getName());
|
||||||
|
file = File.createTempFile("tmp", null);
|
||||||
|
//将ftp文件的输入流复制给临时文件
|
||||||
|
FileUtils.copyInputStreamToFile(inputStream, file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (Objects.nonNull(ftpClient)){
|
||||||
|
ftpClient.disconnect();
|
||||||
|
}
|
||||||
|
if (inputStream != null){
|
||||||
|
inputStream.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//加载dll工具库
|
||||||
|
System.loadLibrary("ReadPHDFile");
|
||||||
|
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(file.getAbsolutePath());
|
||||||
|
//计算边界值
|
||||||
|
List<Double> gCentroidChannel = struct.g_centroid_channel;
|
||||||
|
List<Double> gEnergy = struct.g_energy;
|
||||||
|
List<Double> bChannel = struct.b_channel;
|
||||||
|
List<Double> bElectronEnergy = struct.b_electron_energy;
|
||||||
|
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);
|
||||||
|
return bgBoundary;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,4 +57,28 @@ public class UserTaskUtil {
|
||||||
return stationIds;
|
return stationIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看当前用户是否有过当前台站的排班任务
|
||||||
|
* @param userName
|
||||||
|
* @param stationId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean CheckUserWriteAuthorityForStation(String userName, Integer stationId){
|
||||||
|
boolean flag = false;
|
||||||
|
//根据用户名称查询用户id
|
||||||
|
SysUser user = userTaskService.findUserByName(userName);
|
||||||
|
String userId = user.getId();
|
||||||
|
List<String> userStations = userTaskService.findUserStations(userId);
|
||||||
|
if (Objects.nonNull(stationId) && CollectionUtils.isNotEmpty(userStations)){
|
||||||
|
if (userStations.contains(stationId)){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> findRoleCodeByUserName(String userName){
|
||||||
|
return userTaskService.findRoleCodeByUserName(userName);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package org.jeecg.modules.controller;
|
package org.jeecg.modules.controller;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.base.vo.CoeffData;
|
import org.jeecg.modules.base.vo.*;
|
||||||
import org.jeecg.modules.base.vo.InputData;
|
import org.jeecg.modules.entity.vo.ChangeData;
|
||||||
import org.jeecg.modules.service.IDataService;
|
|
||||||
import org.jeecg.modules.service.IGammaService;
|
import org.jeecg.modules.service.IGammaService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -18,37 +17,70 @@ public class GammaController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IGammaService gammaService;
|
private IGammaService gammaService;
|
||||||
@Autowired
|
|
||||||
private IDataService dataService;
|
|
||||||
|
|
||||||
@GetMapping("initValue")
|
|
||||||
public Result initValue(HttpServletRequest request){
|
|
||||||
return dataService.initValue(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("gammaByDB")
|
@GetMapping("gammaByDB")
|
||||||
public Result gammaByDB(@RequestParam Integer sampleId, @RequestParam String dbName){
|
public Result gammaByDB(@RequestParam Integer sampleId, @RequestParam String dbName){
|
||||||
return gammaService.gammaByDB(dbName, sampleId);
|
return gammaService.gammaByDB(dbName, sampleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("gammaByFile")
|
||||||
|
public Result gammaByFile(String fileName, HttpServletRequest request){
|
||||||
|
return gammaService.gammaByFile(fileName, request);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("configure")
|
@GetMapping("configure")
|
||||||
public Result configure(@RequestParam Integer sampleId){
|
public Result configure(@RequestParam Integer sampleId, @RequestParam String fileName){
|
||||||
return gammaService.configure(sampleId);
|
return gammaService.configure(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("Reprocessing")
|
@PostMapping("Reprocessing")
|
||||||
public Result Reprocessing(@RequestParam Integer sampleId){
|
public Result Reprocessing(@RequestBody ConfigureData configureData, HttpServletRequest request){
|
||||||
return gammaService.Reprocessing(sampleId);
|
return gammaService.Reprocessing(configureData, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("InteractiveTool")
|
@GetMapping("InteractiveTool")
|
||||||
public Result InteractiveTool(@RequestParam Integer sampleId){
|
public Result InteractiveTool(@RequestParam Integer sampleId, @RequestParam String fileName){
|
||||||
return gammaService.InteractiveTool(sampleId);
|
return gammaService.InteractiveTool(sampleId, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("insertPeak")
|
||||||
|
public Result insertPeak(Integer sampleId, String fileName, Integer curChan){
|
||||||
|
return gammaService.insertPeak(sampleId, fileName, curChan);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("getSelPosNuclide")
|
||||||
|
public Result getSelPosNuclide(Integer sampleId, String fileName, int channel, String nuclides, HttpServletRequest request){
|
||||||
|
return gammaService.getSelPosNuclide(sampleId, fileName, channel, nuclides, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("addNuclide")
|
||||||
|
public Result addNuclide(Integer curRow, String nuclideName, Integer sampleId){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("nuclideReview")
|
||||||
|
public Result nuclideReview(Integer sampleId, String fileName, Integer channel, HttpServletRequest request){
|
||||||
|
return gammaService.nuclideReview(sampleId, fileName, channel, request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("changeNuclide")
|
||||||
|
public Result changeNuclide(Integer sampleId, String fileName, String nuclideName){
|
||||||
|
return gammaService.changeNuclide(sampleId, fileName, nuclideName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("searchNuclide")
|
||||||
|
public Result searchNuclide(Integer sampleId, String fileName, Double energy, Double tolerance, HttpServletRequest request){
|
||||||
|
return gammaService.searchNuclide(sampleId, fileName, energy, tolerance, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("ZeroTime")
|
@GetMapping("ZeroTime")
|
||||||
public Result ZeroTime(@RequestParam Integer sampleId){
|
public Result ZeroTime(){
|
||||||
return gammaService.ZeroTime(sampleId);
|
return gammaService.ZeroTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("ZeroTimeAnalyse")
|
||||||
|
public Result ZeroTimeAnalyse(String nuclide1, String nuclide2, Double product1, Double product2, String target, String energyTFH, String date, String time){
|
||||||
|
return gammaService.ZeroTimeAnalyse(nuclide1, nuclide2, product1, product2, target, energyTFH, date, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("Korsum")
|
@GetMapping("Korsum")
|
||||||
|
@ -66,83 +98,118 @@ public class GammaController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("energyCalibration")
|
@GetMapping("energyCalibration")
|
||||||
public Result energyCalibration(@RequestParam Integer sampleId){
|
public Result energyCalibration(@RequestParam Integer sampleId, String fileName){
|
||||||
return gammaService.energyCalibration(sampleId);
|
return gammaService.energyCalibration(sampleId, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("changeDataEnergy")
|
||||||
|
public Result changeDataEnergy(@RequestBody ChangeData changeData){
|
||||||
|
return gammaService.changeDataEnergy(changeData.getM_vCurCentroid(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getSampleId(), changeData.getFileName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("applyDataEnergy")
|
||||||
|
public Result applyDataEnergy(@RequestBody ChangeData changeData){
|
||||||
|
return gammaService.applyDataEnergy(changeData.getM_vCurCentroid(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getCurCalName(), changeData.getSampleId(), changeData.getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("resolutionCalibration")
|
@GetMapping("resolutionCalibration")
|
||||||
public Result resolutionCalibration(@RequestParam Integer sampleId){
|
public Result resolutionCalibration(@RequestParam Integer sampleId, String fileName){
|
||||||
return gammaService.resolutionCalibration(sampleId);
|
return gammaService.resolutionCalibration(sampleId, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("changeDataResolution")
|
||||||
|
public Result changeDataResolution(@RequestBody ChangeData changeData){
|
||||||
|
return gammaService.changeDataResolution(changeData.getM_vCurReso(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getSampleId(), changeData.getFileName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("applyDataResolution")
|
||||||
|
public Result applyDataResolution(@RequestBody ChangeData changeData){
|
||||||
|
return gammaService.applyDataResolution(changeData.getM_vCurReso(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getCurCalName(), changeData.getSampleId(), changeData.getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("EfficiencyCalibration")
|
@GetMapping("EfficiencyCalibration")
|
||||||
public Result EfficiencyCalibration(@RequestParam Integer sampleId){
|
public Result EfficiencyCalibration(@RequestParam Integer sampleId, String fileName){
|
||||||
return gammaService.EfficiencyCalibration(sampleId);
|
return gammaService.EfficiencyCalibration(sampleId, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("changeDataEfficiency")
|
||||||
|
public Result changeDataEfficiency(@RequestBody ChangeData changeData){
|
||||||
|
return gammaService.changeDataEfficiency(changeData.getM_vCurEffi(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getFuncId(), changeData.getSampleId(), changeData.getFileName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("applyDataEfficiency")
|
||||||
|
public Result applyDataEfficiency(@RequestBody ChangeData changeData){
|
||||||
|
return gammaService.applyDataEfficiency(changeData.getM_vCurCentroid(), changeData.getM_vCurEnergy(), changeData.getM_vCurUncert(), changeData.getM_curParam(), changeData.getCurCalName(), changeData.getSampleId(), changeData.getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("NuclideLibrary")
|
@GetMapping("NuclideLibrary")
|
||||||
public Result NuclideLibrary(String editEnergy, double err, String libraryName, String nuclideName, HttpServletRequest request){
|
public Result NuclideLibrary(Integer sampleId, String fileName, String editEnergy, double err, String libraryName, String nuclideName, HttpServletRequest request){
|
||||||
return gammaService.NuclideLibrary(editEnergy, err, libraryName, nuclideName, request);
|
return gammaService.NuclideLibrary(sampleId, fileName, editEnergy, err, libraryName, nuclideName, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("configUserLibrary")
|
@GetMapping("configUserLibrary")
|
||||||
public Result configUserLibrary(HttpServletRequest request){
|
public Result configUserLibrary(Integer sampleId, String fileName, HttpServletRequest request){
|
||||||
return gammaService.configUserLibrary(request);
|
return gammaService.configUserLibrary(sampleId, fileName, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewComment")
|
@GetMapping("viewComment")
|
||||||
public Result viewComment(@RequestParam Integer sampleId){
|
public Result viewComment(@RequestParam Integer sampleId, String fileName){
|
||||||
return gammaService.viewComment(sampleId);
|
return gammaService.viewComment(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("peakInformation")
|
@GetMapping("peakInformation")
|
||||||
public Result peakInformation(@RequestParam Integer sampleId){
|
public Result peakInformation(@RequestParam Integer sampleId, String fileName){
|
||||||
return gammaService.peakInformation(sampleId);
|
return gammaService.peakInformation(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewARR")
|
@GetMapping("viewARR")
|
||||||
public Result viewARR(Integer sampleId, HttpServletResponse response){
|
public void viewARR(Integer sampleId, HttpServletResponse response){
|
||||||
return gammaService.viewARR(sampleId, response);
|
gammaService.viewARR(sampleId, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewRRR")
|
@GetMapping("viewRRR")
|
||||||
public Result viewRRR(Integer sampleId){
|
public Result viewRRR(Integer sampleId, String fileName){
|
||||||
return gammaService.viewRRR(sampleId);
|
return gammaService.viewRRR(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("radionuclideActivity")
|
@GetMapping("radionuclideActivity")
|
||||||
public Result radionuclideActivity(Integer sampleId){
|
public Result radionuclideActivity(Integer sampleId, String fileName){
|
||||||
return gammaService.radionuclideActivity(sampleId);
|
return gammaService.radionuclideActivity(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("Spectrum")
|
@GetMapping("Spectrum")
|
||||||
public Result Spectrum(Integer sampleId){
|
public Result Spectrum(Integer sampleId, String fileName){
|
||||||
return gammaService.Spectrum(sampleId);
|
return gammaService.Spectrum(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("sampleInformation")
|
@GetMapping("sampleInformation")
|
||||||
public Result sampleInformation(Integer sampleId){
|
public Result sampleInformation(Integer sampleId, String fileName){
|
||||||
return gammaService.sampleInformation(sampleId);
|
return gammaService.sampleInformation(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewQCResult")
|
@GetMapping("viewQCResult")
|
||||||
public Result viewQCResult(Integer sampleId){
|
public Result viewQCResult(Integer sampleId, String fileName){
|
||||||
return gammaService.viewQCResult(sampleId);
|
return gammaService.viewQCResult(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewRLR")
|
@GetMapping("viewRLR")
|
||||||
public Result viewRLR(Integer sampleId){
|
public Result viewRLR(Integer sampleId, String fileName){
|
||||||
return gammaService.viewRLR(sampleId);
|
return gammaService.viewRLR(sampleId, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewAutomaticAnalysisLog")
|
@GetMapping("viewAutomaticAnalysisLog")
|
||||||
public Result viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response){
|
public void viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response){
|
||||||
return gammaService.viewAutomaticAnalysisLog(sampleId, response);
|
gammaService.viewAutomaticAnalysisLog(sampleId, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("viewGammaviewerLog")
|
@GetMapping("viewGammaviewerLog")
|
||||||
public Result viewGammaviewerLog(Integer sampleId){
|
public Result viewGammaviewerLog(Integer sampleId, String fileName){
|
||||||
return gammaService.viewGammaviewerLog(sampleId);
|
return gammaService.viewGammaviewerLog(sampleId, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("saveToDB")
|
||||||
|
public Result saveToDB(){
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,12 +38,28 @@ public class SpectrumAnalysesController {
|
||||||
return spectrumAnalysisService.getDBSpectrumList(queryRequest, gardsSampleData, dbName, menuTypes, AllUsers, CollectStopB, AcqStartB, startDate, endDate, request);
|
return spectrumAnalysisService.getDBSpectrumList(queryRequest, gardsSampleData, dbName, menuTypes, AllUsers, CollectStopB, AcqStartB, startDate, endDate, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("getSpectrumFiles")
|
||||||
|
public Result getSpectrumFiles(HttpServletRequest request){
|
||||||
|
return spectrumAnalysisService.getSpectrumFiles(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("getFilesBySampleFile")
|
||||||
|
@ApiOperation(value = "根据sampleFile查询出关联的文件信息", notes = "根据sampleFile查询出关联的文件信息")
|
||||||
|
public Result getFilesBySampleFile(String sampleFileName, HttpServletRequest request){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("getDBSpectrumChart")
|
@GetMapping("getDBSpectrumChart")
|
||||||
@ApiOperation(value = "查询折线图相关信息接口", notes = "查询折线图相关信息接口")
|
@ApiOperation(value = "查询折线图相关信息接口", notes = "查询折线图相关信息接口")
|
||||||
public Result getDBSpectrumChart(String dbName, Integer sampleId){
|
public Result getDBSpectrumChart(String dbName, Integer sampleId){
|
||||||
return spectrumAnalysisService.getDBSpectrumChart(dbName, sampleId);
|
return spectrumAnalysisService.getDBSpectrumChart(dbName, sampleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("getFileSpectrumChart")
|
||||||
|
public Result getFileSpectrumChart(String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request){
|
||||||
|
return spectrumAnalysisService.getFileSpectrumChart(sampleFileName, gasFileName, detFileName, qcFileName, request);
|
||||||
|
}
|
||||||
|
|
||||||
@DeleteMapping("deleteDBSpectrumChartData")
|
@DeleteMapping("deleteDBSpectrumChartData")
|
||||||
@ApiOperation(value = "删除折线图缓存数据",notes = "删除折线图缓存数据")
|
@ApiOperation(value = "删除折线图缓存数据",notes = "删除折线图缓存数据")
|
||||||
public Result deleteDBSpectrumChartData(Integer[] sampleIds){
|
public Result deleteDBSpectrumChartData(Integer[] sampleIds){
|
||||||
|
@ -147,13 +163,13 @@ public class SpectrumAnalysesController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("ReAnalyse")
|
@PostMapping("ReAnalyse")
|
||||||
public Result ReAnalyse(@RequestBody AnalyseData analyseData){
|
public Result ReAnalyse(@RequestBody AnalyseData analyseData, HttpServletRequest request){
|
||||||
return spectrumAnalysisService.ReAnalyse(analyseData);
|
return spectrumAnalysisService.ReAnalyse(analyseData, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("analyseCurrentSpectrum")
|
@GetMapping("analyseCurrentSpectrum")
|
||||||
public Result analyseCurrentSpectrum(String dbName, Integer sampleId){
|
public Result analyseCurrentSpectrum(String dbName, Integer sampleId, String sampleFileName, String gasFileName, String detFileName, HttpServletRequest request){
|
||||||
return null;
|
return spectrumAnalysisService.analyseCurrentSpectrum(dbName, sampleId, sampleFileName, gasFileName, detFileName, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("analyseAllSpectrum")
|
@PostMapping("analyseAllSpectrum")
|
||||||
|
@ -161,4 +177,9 @@ public class SpectrumAnalysesController {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("saveToDB")
|
||||||
|
public Result saveToDB(BgDataAnlyseResultIn anlyseResultIn){
|
||||||
|
return spectrumAnalysisService.saveToDB(anlyseResultIn);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,11 @@ public class GardsAnalysesSpectrum implements Serializable {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date analysisBegin;
|
private Date analysisBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间-字符串
|
||||||
|
*/
|
||||||
|
private String analysisBeginStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分析结束时间
|
* 分析结束时间
|
||||||
*/
|
*/
|
||||||
|
@ -34,6 +39,11 @@ public class GardsAnalysesSpectrum implements Serializable {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date analysisEnd;
|
private Date analysisEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间-字符串
|
||||||
|
*/
|
||||||
|
private String analysisEndStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reviewed:交互,auto:自动
|
* Reviewed:交互,auto:自动
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -67,89 +67,66 @@ public class GardsPeaksSpectrum implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 峰的净计数率的不确定度(1/s)
|
* 峰的净计数率的不确定度(1/s)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "UNCNETCOUNTRATE")
|
|
||||||
private Double uncNetCountRate;
|
private Double uncNetCountRate;
|
||||||
/**
|
/**
|
||||||
* 测量系统在峰能量处的绝对效率
|
* 测量系统在峰能量处的绝对效率
|
||||||
*/
|
*/
|
||||||
@TableField(value = "EFFICIENCY")
|
|
||||||
private Double efficiency;
|
private Double efficiency;
|
||||||
/**
|
/**
|
||||||
* 测量系统在峰能量处的绝对效率的不确定度
|
* 测量系统在峰能量处的绝对效率的不确定度
|
||||||
*/
|
*/
|
||||||
@TableField(value = "UNCEFFICIENCY")
|
|
||||||
private Double uncefficiency;
|
private Double uncefficiency;
|
||||||
/**
|
/**
|
||||||
* 峰的半高宽(道)
|
* 峰的半高宽(道)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "FWHM")
|
|
||||||
private Double fwhm;
|
private Double fwhm;
|
||||||
/**
|
/**
|
||||||
* 峰的十分之一高宽(道)
|
* 峰的十分之一高宽(道)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "FWTM")
|
|
||||||
private Double fwtm;
|
private Double fwtm;
|
||||||
/**
|
/**
|
||||||
* 峰的重要性因子
|
* 峰的重要性因子
|
||||||
*/
|
*/
|
||||||
@TableField(value = "SIGNIFICANCE")
|
|
||||||
private Double significance;
|
private Double significance;
|
||||||
/**
|
/**
|
||||||
* 峰的可探测线Lc
|
* 峰的可探测线Lc
|
||||||
*/
|
*/
|
||||||
@TableField(value = "LC")
|
|
||||||
private Double lc;
|
private Double lc;
|
||||||
/**
|
/**
|
||||||
* 峰的感兴趣区的起始道
|
* 峰的感兴趣区的起始道
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ROISTART")
|
|
||||||
private Double roiStart;
|
private Double roiStart;
|
||||||
/**
|
/**
|
||||||
* 峰的感兴趣区的结束道
|
* 峰的感兴趣区的结束道
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ROIEND")
|
|
||||||
private Double roiEnd;
|
private Double roiEnd;
|
||||||
|
|
||||||
@TableField(value = "MULTIINDEX")
|
|
||||||
private Double mulitiIndex;
|
private Double mulitiIndex;
|
||||||
|
|
||||||
@TableField(value = "TAIL")
|
|
||||||
private Double tail;
|
private Double tail;
|
||||||
|
|
||||||
@TableField(value = "TAILALPHA")
|
|
||||||
private Double tailAlpha;
|
private Double tailAlpha;
|
||||||
|
|
||||||
@TableField(value = "UPPERTAIL")
|
|
||||||
private Double upperTail;
|
private Double upperTail;
|
||||||
|
|
||||||
@TableField(value = "UPPERTAILALPHA")
|
|
||||||
private Double upperTailAlpha;
|
private Double upperTailAlpha;
|
||||||
|
|
||||||
@TableField(value = "BWWIDTHCHAN")
|
|
||||||
private Double bwwidthchan;
|
private Double bwwidthchan;
|
||||||
|
|
||||||
@TableField(value = "RECOILDELTACHAN")
|
|
||||||
private Double recoildeltachan;
|
private Double recoildeltachan;
|
||||||
|
|
||||||
@TableField(value = "STEPRAIO")
|
|
||||||
private Double stepraio;
|
private Double stepraio;
|
||||||
|
|
||||||
@TableField(value = "LD")
|
|
||||||
private Double ld;
|
private Double ld;
|
||||||
|
|
||||||
@TableField(value = "SENSITIVITY")
|
|
||||||
private Double sensitivity;
|
private Double sensitivity;
|
||||||
|
|
||||||
@TableField(value = "BACKGROUNDAREA")
|
|
||||||
private Double backgroundarea;
|
private Double backgroundarea;
|
||||||
|
|
||||||
@TableField(value = "MEANBACKCOUNT")
|
|
||||||
private Double meanbackcount;
|
private Double meanbackcount;
|
||||||
|
|
||||||
@TableField(value = "RECOILBETACHAN")
|
|
||||||
private Double recoilbetachan;
|
private Double recoilbetachan;
|
||||||
|
|
||||||
@TableField(value = "PEAKCOMMENTS")
|
|
||||||
private String peakcomments;
|
private String peakcomments;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,204 @@
|
||||||
|
package org.jeecg.modules.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BgDataAnlyseResultIn implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前端新增/修改的备注信息存入数据库
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分析员名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 台站名称
|
||||||
|
*/
|
||||||
|
private String stationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sample文件路径
|
||||||
|
*/
|
||||||
|
private String sampleFilePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sample文件名称
|
||||||
|
*/
|
||||||
|
private String sampleFileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gas文件路径
|
||||||
|
*/
|
||||||
|
private String gasFilePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gas文件名称
|
||||||
|
*/
|
||||||
|
private String gasFileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* det文件路径
|
||||||
|
*/
|
||||||
|
private String detFilePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* det文件名称
|
||||||
|
*/
|
||||||
|
private String detFileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qc文件名称
|
||||||
|
*/
|
||||||
|
private String qcFilePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qc文件名称
|
||||||
|
*/
|
||||||
|
private String qcFileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否点击过Energy Calibration页面下Gamma Detector Calibration的fitting按钮
|
||||||
|
*/
|
||||||
|
private boolean bGammaEnergyValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否点击过Energy Calibration页面下Beta Detector Calibration的fitting按钮
|
||||||
|
*/
|
||||||
|
private boolean bBetaEnergyValid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否选中sampleData
|
||||||
|
*/
|
||||||
|
private boolean checkSample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否选中GasData
|
||||||
|
*/
|
||||||
|
private boolean checkGas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否选中DetData
|
||||||
|
*/
|
||||||
|
private boolean checkDet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g-channel
|
||||||
|
*/
|
||||||
|
private List<Double> g_channel_sample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g-energy
|
||||||
|
*/
|
||||||
|
private List<Double> g_energy_sample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* b-channel
|
||||||
|
*/
|
||||||
|
private List<Double> b_channel_sample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* b-energy
|
||||||
|
*/
|
||||||
|
private List<Double> b_energy_sample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g-channel
|
||||||
|
*/
|
||||||
|
private List<Double> g_channel_gas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g-energy
|
||||||
|
*/
|
||||||
|
private List<Double> g_energy_gas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* b-channel
|
||||||
|
*/
|
||||||
|
private List<Double> b_channel_gas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* b-energy
|
||||||
|
*/
|
||||||
|
private List<Double> b_energy_gas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g-channel
|
||||||
|
*/
|
||||||
|
private List<Double> g_channel_det;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g-energy
|
||||||
|
*/
|
||||||
|
private List<Double> g_energy_det;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* b-channel
|
||||||
|
*/
|
||||||
|
private List<Double> b_channel_det;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* b-energy
|
||||||
|
*/
|
||||||
|
private List<Double> b_energy_det;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gamma Detector Calibration公式参数
|
||||||
|
*/
|
||||||
|
private String param_a_c2e_g_sample;
|
||||||
|
private String param_b_c2e_g_sample;
|
||||||
|
private String param_c_c2e_g_sample;
|
||||||
|
private String param_a_c2e_g_gas;
|
||||||
|
private String param_b_c2e_g_gas;
|
||||||
|
private String param_c_c2e_g_gas;
|
||||||
|
private String param_a_c2e_g_det;
|
||||||
|
private String param_b_c2e_g_det;
|
||||||
|
private String param_c_c2e_g_det;
|
||||||
|
/**
|
||||||
|
* Beta Detector Calibration公式参数
|
||||||
|
*/
|
||||||
|
private String param_a_c2e_b_sample;
|
||||||
|
private String param_b_c2e_b_sample;
|
||||||
|
private String param_c_c2e_b_sample;
|
||||||
|
private String param_a_c2e_b_gas;
|
||||||
|
private String param_b_c2e_b_gas;
|
||||||
|
private String param_c_c2e_b_gas;
|
||||||
|
private String param_a_c2e_b_det;
|
||||||
|
private String param_b_c2e_b_det;
|
||||||
|
private String param_c_c2e_b_det;
|
||||||
|
|
||||||
|
private double MDC_Xe135; //MDC XE135
|
||||||
|
private double MDC_Xe131m; //MDC XE131m
|
||||||
|
private double MDC_Xe133m; //MDC XE133m
|
||||||
|
private double MDC_Xe133; //MDC XE133
|
||||||
|
|
||||||
|
private double Xe135_con; //135不浓度
|
||||||
|
private double Xe135_uncer; //135不确定度
|
||||||
|
private double Xe131m_con;
|
||||||
|
private double Xe131m_uncer;
|
||||||
|
private double Xe133m_con;
|
||||||
|
private double Xe133m_uncer;
|
||||||
|
private double Xe133_con;
|
||||||
|
private double Xe133_uncer;
|
||||||
|
|
||||||
|
private double LC_Xe135; //LC XE135
|
||||||
|
private double LC_Xe131m; //LC XE131m
|
||||||
|
private double LC_Xe133m; //LC XE133m
|
||||||
|
private double LC_Xe133; //LC XE133
|
||||||
|
|
||||||
|
private int Xe131mFlag;
|
||||||
|
|
||||||
|
private int Xe133Flag;
|
||||||
|
|
||||||
|
private int Xe133mFlag;
|
||||||
|
|
||||||
|
private int Xe135Flag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package org.jeecg.modules.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecg.modules.base.vo.ParameterInfo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ChangeData implements Serializable {
|
||||||
|
|
||||||
|
private List<Double> m_vCurCentroid;
|
||||||
|
|
||||||
|
private List<Double> m_vCurReso;
|
||||||
|
|
||||||
|
private List<Double> m_vCurEffi;
|
||||||
|
|
||||||
|
private List<Double> m_vCurEnergy;
|
||||||
|
|
||||||
|
private List<Double> m_vCurUncert;
|
||||||
|
|
||||||
|
private ParameterInfo m_curParam;
|
||||||
|
|
||||||
|
private String curCalName;
|
||||||
|
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
private Integer funcId;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package org.jeecg.modules.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TablePeaks implements Serializable {
|
||||||
|
|
||||||
|
private String lab;
|
||||||
|
|
||||||
|
private String nuclide;
|
||||||
|
|
||||||
|
private String energy;
|
||||||
|
|
||||||
|
private String netArea;
|
||||||
|
|
||||||
|
private String fwhm;
|
||||||
|
|
||||||
|
private String step;
|
||||||
|
|
||||||
|
private String bwGamma;
|
||||||
|
|
||||||
|
private boolean netAreaB;
|
||||||
|
|
||||||
|
private boolean centroid;
|
||||||
|
|
||||||
|
private boolean fwhmB;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsBgEfficiencyPairs;
|
||||||
|
|
||||||
|
public interface GardsBgEfficiencyPairsSpectrumMapper extends BaseMapper<GardsBgEfficiencyPairs> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsCalibrationPairsOrig;
|
||||||
|
|
||||||
|
public interface GardsCalibrationPairsOrigSpectrumMapper extends BaseMapper<GardsCalibrationPairsOrig> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsHistogram;
|
||||||
|
|
||||||
|
public interface GardsHistogramSpectrumMapper extends BaseMapper<GardsHistogram> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsRoiLimits;
|
||||||
|
|
||||||
|
public interface GardsRoiLimitsSpectrumMapper extends BaseMapper<GardsRoiLimits> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleAux;
|
||||||
|
|
||||||
|
public interface GardsSampleAuxSpectrumMapper extends BaseMapper<GardsSampleAux> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleCertLine;
|
||||||
|
|
||||||
|
public interface GardsSampleCertLineSpectrumMapper extends BaseMapper<GardsSampleCertLine> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleCert;
|
||||||
|
|
||||||
|
public interface GardsSampleCertSpectrumMapper extends BaseMapper<GardsSampleCert> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||||
|
|
||||||
|
public interface GardsSampleDataSpectrumMapper extends BaseMapper<GardsSampleData> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleDescription;
|
||||||
|
|
||||||
|
public interface GardsSampleDescriptionSpectrumMapper extends BaseMapper<GardsSampleDescription> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleRatios;
|
||||||
|
|
||||||
|
public interface GardsSampleRatiosSpectrumMapper extends BaseMapper<GardsSampleRatios> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSpectrum;
|
||||||
|
|
||||||
|
public interface GardsSpectrumSpectrumMapper extends BaseMapper<GardsSpectrum> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsTotalEfficiencyPairs;
|
||||||
|
|
||||||
|
public interface GardsTotalEfficiencyPairsSpectrumMapper extends BaseMapper<GardsTotalEfficiencyPairs> {
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
||||||
|
@ -10,6 +11,7 @@ import org.jeecg.modules.base.vo.*;
|
||||||
import org.jeecg.modules.entity.*;
|
import org.jeecg.modules.entity.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
public interface SpectrumAnalysisMapper {
|
public interface SpectrumAnalysisMapper {
|
||||||
|
|
||||||
List<GardsSampleDataSpectrum> getDBSearchList(String dbName, List<String> stationTypes, List<String> userStations, boolean AllUsers);
|
List<GardsSampleDataSpectrum> getDBSearchList(String dbName, List<String> stationTypes, List<String> userStations, boolean AllUsers);
|
||||||
|
@ -84,6 +86,8 @@ public interface SpectrumAnalysisMapper {
|
||||||
|
|
||||||
List<GardsXeResultsSpectrum> ReadXeResults(@Param(value = "dbName") String dbName, @Param(value = "idAnalysis") Integer idAnalysis, @Param(value = "sampleId") Integer sampleId);
|
List<GardsXeResultsSpectrum> ReadXeResults(@Param(value = "dbName") String dbName, @Param(value = "idAnalysis") Integer idAnalysis, @Param(value = "sampleId") Integer sampleId);
|
||||||
|
|
||||||
|
List<String> getUserNuclideNames(@Param(value = "nuclides") List<String> nuclides, @Param(value = "min") Double min, @Param(value = "max") Double max);
|
||||||
|
|
||||||
List<String> getFULLNuclideNames(@Param(value = "min") Double min, @Param(value = "max") Double max);
|
List<String> getFULLNuclideNames(@Param(value = "min") Double min, @Param(value = "max") Double max);
|
||||||
|
|
||||||
List<String> getRelevantNuclideNames(@Param(value = "min") Double min, @Param(value = "max") Double max);
|
List<String> getRelevantNuclideNames(@Param(value = "min") Double min, @Param(value = "max") Double max);
|
||||||
|
@ -98,4 +102,40 @@ public interface SpectrumAnalysisMapper {
|
||||||
|
|
||||||
String findAutomaticLogPath(@Param(value = "sampleId") Integer sampleId);
|
String findAutomaticLogPath(@Param(value = "sampleId") Integer sampleId);
|
||||||
|
|
||||||
|
List<String> findNuclideList(@Param(value = "min") Double min, @Param(value = "max") Double max, @Param(value = "nuclides") List<String> nuclides);
|
||||||
|
|
||||||
|
List<GardsNuclLinesLib> getNuclideTable( @Param(value = "name") String name, @Param(value = "span") Long span);
|
||||||
|
|
||||||
|
List<String> getPossibleNuclide(@Param(value = "nuclides") List<String> nuclides, @Param(value = "min") double min, @Param(value = "max") double max);
|
||||||
|
|
||||||
|
Integer SampleIsExist(@Param(value = "filePathName") String filePathName, @Param(value = "userName") String userName);
|
||||||
|
|
||||||
|
void updateAnalysesStatus(String filePathName);
|
||||||
|
|
||||||
|
Integer getStationId(String stationName);
|
||||||
|
|
||||||
|
Integer getDetectorId(String detectorName);
|
||||||
|
|
||||||
|
Integer getSampleId(@Param(value = "filePathName") String filePathName);
|
||||||
|
|
||||||
|
void updateGardsAnalyses(GardsAnalysesSpectrum gardsAnalyses);
|
||||||
|
|
||||||
|
void insertGardsAnalyses(GardsAnalysesSpectrum gardsAnalyses);
|
||||||
|
|
||||||
|
void deleteCalibrationPairs(Integer idAnalysis);
|
||||||
|
|
||||||
|
void insertCalibrationPairs(List<GardsCalibrationPairsSpectrum> calibrationPairsList);
|
||||||
|
|
||||||
|
void deleteCalibration(Integer idAnalysis);
|
||||||
|
|
||||||
|
void insertCalibration(List<GardsCalibrationSpectrum> calibrationList);
|
||||||
|
|
||||||
|
void deleteROIChannels(Integer idAnalysis);
|
||||||
|
|
||||||
|
void insertROIChannels(List<GardsROIChannelsSpectrum> roiChannelsList);
|
||||||
|
|
||||||
|
void deleteXeResult(Integer idAnalysis);
|
||||||
|
|
||||||
|
void insertXeResult(List<GardsXeResultsSpectrum> xeResults);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,6 @@ import java.util.List;
|
||||||
|
|
||||||
public interface SysDefaultNuclideSpectrumMapper extends BaseMapper<SysDefaultNuclide> {
|
public interface SysDefaultNuclideSpectrumMapper extends BaseMapper<SysDefaultNuclide> {
|
||||||
|
|
||||||
List<String> findNuclidesByUserName(@Param(value = "userName") String userName);
|
List<String> findNuclidesByUserName(@Param(value = "userName") String userName, @Param(value = "systemType") String systemType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -585,6 +585,19 @@
|
||||||
AND XE_RESULTS.SAMPLE_ID = #{sampleId}
|
AND XE_RESULTS.SAMPLE_ID = #{sampleId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getFULLNuclideNames" resultType="java.lang.String">
|
||||||
|
select
|
||||||
|
distinct a.name
|
||||||
|
from
|
||||||
|
CONFIGURATION.GARDS_NUCL_LINES_LIB a
|
||||||
|
where a.name in
|
||||||
|
<foreach collection="nuclides" item="nuclide" open="(" close=")" separator=",">
|
||||||
|
#{nuclide}
|
||||||
|
</foreach>
|
||||||
|
and a.energy > #{min}
|
||||||
|
and a.energy < #{max}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getFULLNuclideNames" resultType="java.lang.String">
|
<select id="getFULLNuclideNames" resultType="java.lang.String">
|
||||||
select
|
select
|
||||||
distinct a.name
|
distinct a.name
|
||||||
|
@ -621,8 +634,8 @@
|
||||||
CONFIGURATION.GARDS_NUCL_LINES_LIB a
|
CONFIGURATION.GARDS_NUCL_LINES_LIB a
|
||||||
where a.name = #{name}
|
where a.name = #{name}
|
||||||
<if test=" min != null and max != null ">
|
<if test=" min != null and max != null ">
|
||||||
and a.energy > min
|
and a.energy > #{min}
|
||||||
and a.energy < max
|
and a.energy < #{max}
|
||||||
</if>
|
</if>
|
||||||
order by a.yield
|
order by a.yield
|
||||||
</select>
|
</select>
|
||||||
|
@ -663,4 +676,227 @@
|
||||||
SELECT LOG_PATH FROM RNAUTO.GARDS_ANALYSES WHERE SAMPLE_ID = #{sampleId}
|
SELECT LOG_PATH FROM RNAUTO.GARDS_ANALYSES WHERE SAMPLE_ID = #{sampleId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findNuclideList" resultType="java.lang.String">
|
||||||
|
select
|
||||||
|
distinct a.name
|
||||||
|
from
|
||||||
|
CONFIGURATION.GARDS_NUCL_LINES_LIB a
|
||||||
|
where a.name in
|
||||||
|
<foreach collection="nuclides" item="nuclide" open="(" close=")" separator=",">
|
||||||
|
#{nuclide}
|
||||||
|
</foreach>
|
||||||
|
and a.energy > #{min}
|
||||||
|
and a.energy < #{max}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getNuclideTable" resultType="org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib">
|
||||||
|
select
|
||||||
|
a.fullname,
|
||||||
|
a.energy,
|
||||||
|
a.energy_uncert,
|
||||||
|
a.yield,
|
||||||
|
a.yield_uncert
|
||||||
|
from CONFIGURATION.GARDS_NUCL_LINES_LIB a
|
||||||
|
where a.name = #{name}
|
||||||
|
and a.energy >= 30
|
||||||
|
and a.energy <= #{span}
|
||||||
|
order by a.yield
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getPossibleNuclide" resultType="java.lang.String">
|
||||||
|
select
|
||||||
|
distinct a.name
|
||||||
|
from
|
||||||
|
CONFIGURATION.GARDS_NUCL_LINES_LIB a
|
||||||
|
where a.name in
|
||||||
|
<foreach collection="nuclides" item="nuclide" open="(" close=")" separator=",">
|
||||||
|
#{nuclide}
|
||||||
|
</foreach>
|
||||||
|
and a.energy > #{min}
|
||||||
|
and a.energy < #{max}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="SampleIsExist" resultType="java.lang.Integer">
|
||||||
|
SELECT IDANALYSIS FROM RNMAN.GARDS_ANALYSES WHERE SAMPLE_ID=(SELECT SAMPLE_ID FROM ORIGINAL.GARDS_SAMPLE_DATA WHERE INPUT_FILE_NAME = #{filePathName}) AND ANALYST= #{userName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateAnalysesStatus">
|
||||||
|
UPDATE ORIGINAL.GARDS_SAMPLE_DATA A SET A.STATUS='R' WHERE INPUT_FILE_NAME=#{filePathName}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getStationId" resultType="java.lang.Integer">
|
||||||
|
SELECT STATION_ID FROM CONFIGURATION.GARDS_STATIONS WHERE STATION_CODE = #{stationName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetectorId" resultType="java.lang.Integer">
|
||||||
|
SELECT DETECTOR_ID FROM CONFIGURATION.GARDS_DETECTORS WHERE DETECTOR_CODE = #{detectorName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getSampleId" resultType="java.lang.Integer">
|
||||||
|
SELECT SAMPLE_ID FROM ORIGINAL.GARDS_SAMPLE_DATA WHERE INPUT_FILE_NAME = #{filePathName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateGardsAnalyses">
|
||||||
|
UPDATE
|
||||||
|
RNMAN.GARDS_ANALYSES
|
||||||
|
SET
|
||||||
|
ANALYSISBEGIN=to_date(#{gardsAnalyses.analysisBeginStr},'YYYY-MM-DD hh24:mi:ss'),
|
||||||
|
ANALYSISEND=to_date(#{gardsAnalyses.analysisEndStr},'YYYY-MM-DD hh24:mi:ss'),
|
||||||
|
TYPE=#{gardsAnalyses.type},
|
||||||
|
SOFTWARE=#{gardsAnalyses.software},
|
||||||
|
SWVERSION=#{gardsAnalyses.swVersion},
|
||||||
|
CATEGORY=#{gardsAnalyses.category},
|
||||||
|
COMMENTS=#{gardsAnalyses.comments},
|
||||||
|
USEDGASPHD=#{gardsAnalyses.usedgasphd},
|
||||||
|
USEDDETPHD=#{gardsAnalyses.useddetphd},
|
||||||
|
USEDGASPHD_ID=#{gardsAnalyses.usedgasphdId},
|
||||||
|
USEDDETPHD_ID=#{gardsAnalyses.useddetphdId}
|
||||||
|
WHERE
|
||||||
|
SAMPLE_ID=#{gardsAnalyses.sampleId}
|
||||||
|
AND ANALYST=#{gardsAnalyses.analyst}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<insert id="insertGardsAnalyses">
|
||||||
|
INSERT INTO
|
||||||
|
RNMAN.GARDS_ANALYSES(
|
||||||
|
SAMPLE_ID,
|
||||||
|
ANALYSISBEGIN,
|
||||||
|
ANALYSISEND,
|
||||||
|
TYPE,
|
||||||
|
SOFTWARE,
|
||||||
|
SWVERSION,
|
||||||
|
ANALYST,
|
||||||
|
CATEGORY,
|
||||||
|
COMMENTS,
|
||||||
|
USEDGASPHD,
|
||||||
|
USEDDETPHD,
|
||||||
|
USEDGASPHD_ID,
|
||||||
|
USEDDETPHD_ID)
|
||||||
|
VALUES(#{gardsAnalyses.sampleId},
|
||||||
|
to_date(#{gardsAnalyses.analysisBeginStr},'YYYY-MM-DD hh24:mi:ss'),
|
||||||
|
to_date(#{gardsAnalyses.analysisEndStr},'YYYY-MM-DD hh24:mi:ss'),
|
||||||
|
#{gardsAnalyses.type},
|
||||||
|
#{gardsAnalyses.software},
|
||||||
|
#{gardsAnalyses.swVersion},
|
||||||
|
#{gardsAnalyses.analyst},
|
||||||
|
#{gardsAnalyses.category},
|
||||||
|
#{gardsAnalyses.comments},
|
||||||
|
#{gardsAnalyses.usedgasphd},
|
||||||
|
#{gardsAnalyses.useddetphd},
|
||||||
|
#{gardsAnalyses.usedgasphdId},
|
||||||
|
#{gardsAnalyses.useddetphdId})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteCalibrationPairs">
|
||||||
|
DELETE FROM RNMAN.GARDS_CALIBRATION_PAIRS WHERE IDANALYSIS=#{idAnalysis}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insertCalibrationPairs">
|
||||||
|
<foreach collection="calibrationPairsList" item="calibrationPairs" open="(" close=")" separator=",">
|
||||||
|
INSERT INTO
|
||||||
|
RNMAN.GARDS_CALIBRATION_PAIRS(
|
||||||
|
SAMPLE_ID,
|
||||||
|
IDANALYSIS,
|
||||||
|
SAMPLE_TYPE,
|
||||||
|
CALTYPE,
|
||||||
|
INPUT,
|
||||||
|
IDCALPOINT,
|
||||||
|
XVALUE,
|
||||||
|
YVALUE)
|
||||||
|
VALUES(#{calibrationPairs.sampleId},
|
||||||
|
#{calibrationPairs.idAnalysis},
|
||||||
|
#{calibrationPairs.sampleType},
|
||||||
|
#{calibrationPairs.caltype},
|
||||||
|
#{calibrationPairs.input},
|
||||||
|
#{calibrationPairs.idCalPoint},
|
||||||
|
#{calibrationPairs.xValue},
|
||||||
|
#{calibrationPairs.yValue},)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteCalibration">
|
||||||
|
DELETE FROM RNMAN.GARDS_CALIBRATION WHERE IDANALYSIS=#{idAnalysis}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insertCalibration">
|
||||||
|
<foreach collection="calibrationList" item="calibration" open="(" close=")" separator=",">
|
||||||
|
INSERT INTO
|
||||||
|
RNMAN.GARDS_CALIBRATION(
|
||||||
|
SAMPLE_ID,
|
||||||
|
IDANALYSIS,
|
||||||
|
SAMPLE_TYPE,
|
||||||
|
CALTYPE,
|
||||||
|
FUNCTION,
|
||||||
|
FUNCTIONDEF,
|
||||||
|
STARTOFRANGE,
|
||||||
|
ENDOFRANGE,
|
||||||
|
COEFF1,
|
||||||
|
COEFF2,
|
||||||
|
COEFF3)
|
||||||
|
VALUES(#{calibration.sampleId},
|
||||||
|
#{calibration.idAnalysis},
|
||||||
|
#{calibration.sampleType},
|
||||||
|
#{calibration.calType},
|
||||||
|
#{calibration.function},
|
||||||
|
#{calibration.functionDef},
|
||||||
|
#{calibration.startOfRange},
|
||||||
|
#{calibration.endOfRange},
|
||||||
|
#{calibration.coeff1},
|
||||||
|
#{calibration.coeff2},
|
||||||
|
#{calibration.coeff3})
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteROIChannels">
|
||||||
|
DELETE FROM RNMAN.GARDS_ROI_CHANNELS WHERE IDANALYSIS=#{idAnalysis}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insertROIChannels">
|
||||||
|
<foreach collection="roiChannelsList" item="roiChannels" open="(" close=")" separator=",">
|
||||||
|
INSERT INTO
|
||||||
|
RNMAN.GARDS_ROI_CHANNELS(
|
||||||
|
SAMPLE_ID,
|
||||||
|
IDANALYSIS,
|
||||||
|
ROI,
|
||||||
|
B_CHAN_START,
|
||||||
|
B_CHAN_STOP,
|
||||||
|
G_CHAN_START,
|
||||||
|
G_CHAN_STOP)
|
||||||
|
VALUES(#{roiChannels.sampleId},
|
||||||
|
#{roiChannels.idAnalysis},
|
||||||
|
#{roiChannels.roi},
|
||||||
|
#{roiChannels.bChanStart},
|
||||||
|
#{roiChannels.bChanStop},
|
||||||
|
#{roiChannels.gChanStart},
|
||||||
|
#{roiChannels.gChanStop})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteXeResult">
|
||||||
|
DELETE FROM RNMAN.GARDS_XE_RESULTS WHERE IDANALYSIS=#{idAnalysis}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insertXeResult">
|
||||||
|
<foreach collection="xeResults" item="xeResult" open="(" close=")" separator=",">
|
||||||
|
INSERT INTO
|
||||||
|
RNMAN.GARDS_XE_RESULTS(SAMPLE_ID,
|
||||||
|
IDANALYSIS,
|
||||||
|
NUCLIDE_NAME,
|
||||||
|
CONC,
|
||||||
|
CONC_ERR,
|
||||||
|
MDC,
|
||||||
|
LC,
|
||||||
|
NID_FLAG)
|
||||||
|
VALUES(#{xeResult.sampleId},
|
||||||
|
#{xeResult.idAnalysis},
|
||||||
|
#{xeResult.nuclideName},
|
||||||
|
#{xeResult.conc},
|
||||||
|
#{xeResult.concErr},
|
||||||
|
#{xeResult.mdc},
|
||||||
|
#{xeResult.lc},
|
||||||
|
#{xeResult.nidFlag})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -8,7 +8,7 @@
|
||||||
from
|
from
|
||||||
sys_default_nuclide
|
sys_default_nuclide
|
||||||
where use_type = 3
|
where use_type = 3
|
||||||
and nuclide_type = 'G'
|
and nuclide_type = #{systemType}
|
||||||
and create_by = #{userName}
|
and create_by = #{userName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,6 @@ public class CalValuesHandler {
|
||||||
|
|
||||||
public static native List<Double> calFitPara(String type, int funcId, List<Double> x, List<Double> y, List<Double> err);
|
public static native List<Double> calFitPara(String type, int funcId, List<Double> x, List<Double> y, List<Double> err);
|
||||||
|
|
||||||
public static native List<PeakInfo> ComputePeakRange(int m_nCount, List<Double> vCentroid, List<Double> vFwhmCh, List<Double> vTail, List<Double> vUpperTail);
|
public static native StructInsertOutput ComputePeakRange(int peakSize, int m_nCount, List<Double> vCentroid, List<Double> vFwhmCh, List<Double> vTail, List<Double> vUpperTail);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.jeecg.modules.native_jni;
|
package org.jeecg.modules.native_jni;
|
||||||
|
|
||||||
|
import org.jeecg.modules.entity.vo.SpectrumGroup;
|
||||||
import org.jeecg.modules.native_jni.struct.BgAnalyseResult;
|
import org.jeecg.modules.native_jni.struct.BgAnalyseResult;
|
||||||
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
||||||
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
|
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
|
||||||
|
@ -51,5 +52,4 @@ public class EnergySpectrumHandler {
|
||||||
*/
|
*/
|
||||||
public static native BgAnalyseResult bgAnalyse(String sampleFile, String gasFile, String detFile);
|
public static native BgAnalyseResult bgAnalyse(String sampleFile, String gasFile, String detFile);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,25 +5,41 @@ import java.util.List;
|
||||||
public class BgAnalyseResult {
|
public class BgAnalyseResult {
|
||||||
/************************** BgMDCPara **************************/
|
/************************** BgMDCPara **************************/
|
||||||
/** MDC XE135 */
|
/** MDC XE135 */
|
||||||
double MDC_Xe135;
|
public double MDC_Xe135;
|
||||||
/** MDC XE131m */
|
/** MDC XE131m */
|
||||||
double MDC_Xe131m;
|
public double MDC_Xe131m;
|
||||||
/** MDC XE133m*/
|
/** MDC XE133m*/
|
||||||
double MDC_Xe133m;
|
public double MDC_Xe133m;
|
||||||
/** MDC XE133 */
|
/** MDC XE133 */
|
||||||
double MDC_Xe133;
|
public double MDC_Xe133;
|
||||||
List<Double> MDC;
|
public List<Double> MDC;
|
||||||
List<Double> MDC_CTS;
|
public List<Double> MDC_CTS;
|
||||||
|
|
||||||
/************************** BgXeConUncer **************************/
|
/************************** BgXeConUncer **************************/
|
||||||
/** 135不浓度 */
|
/** 135不浓度 */
|
||||||
double Xe135_con;
|
public double Xe135_con;
|
||||||
/** 135不确定度 */
|
/** 135不确定度 */
|
||||||
double Xe135_uncer;
|
public double Xe135_uncer;
|
||||||
double Xe131m_con;
|
public double Xe131m_con;
|
||||||
double Xe131m_uncer;
|
public double Xe131m_uncer;
|
||||||
double Xe133m_con;
|
public double Xe133m_con;
|
||||||
double Xe133m_uncer;
|
public double Xe133m_uncer;
|
||||||
double Xe133_con;
|
public double Xe133_con;
|
||||||
double Xe133_uncer;
|
public double Xe133_uncer;
|
||||||
|
|
||||||
|
// public double LC_Xe135; //LC XE135
|
||||||
|
// public double LC_Xe131m; //LC XE131m
|
||||||
|
// public double LC_Xe133m; //LC XE133m
|
||||||
|
// public double LC_Xe133; //LC XE133
|
||||||
|
// public List<Double> LC;
|
||||||
|
// public List<Double> LC_CTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分析结果标记,true成功,false失败
|
||||||
|
*/
|
||||||
|
public boolean analyse_flag;
|
||||||
|
/**
|
||||||
|
* 失败原因
|
||||||
|
*/
|
||||||
|
public String error_log;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,10 +70,10 @@ public class EnergySpectrumStruct {
|
||||||
* transmit time (hh : mm : ss . s)
|
* transmit time (hh : mm : ss . s)
|
||||||
*/
|
*/
|
||||||
public String transmit_time;
|
public String transmit_time;
|
||||||
/************************* Comment ******************/
|
/************************* Sample ******************/
|
||||||
public Double dimension_1;
|
public double dimension_1;
|
||||||
|
|
||||||
public Double dimension_2;
|
public double dimension_2;
|
||||||
|
|
||||||
/************************* Comment ******************/
|
/************************* Comment ******************/
|
||||||
public String comment;
|
public String comment;
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
package org.jeecg.modules.service;
|
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
public interface IDataService {
|
|
||||||
|
|
||||||
Result initValue(HttpServletRequest request);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,8 +1,7 @@
|
||||||
package org.jeecg.modules.service;
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.base.vo.CoeffData;
|
import org.jeecg.modules.base.vo.*;
|
||||||
import org.jeecg.modules.base.vo.InputData;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -12,48 +11,77 @@ public interface IGammaService{
|
||||||
|
|
||||||
Result gammaByDB(String dbName, Integer sampleId);
|
Result gammaByDB(String dbName, Integer sampleId);
|
||||||
|
|
||||||
Result configure(Integer sampleId);
|
Result gammaByFile(String fileName, HttpServletRequest request);
|
||||||
|
|
||||||
Result Reprocessing(Integer sampleId);
|
Result configure(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result InteractiveTool(Integer sampleId);
|
Result Reprocessing(ConfigureData configureData, HttpServletRequest request);
|
||||||
|
|
||||||
Result ZeroTime(Integer sampleId);
|
Result InteractiveTool(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
Result insertPeak(Integer sampleId, String fileName, Integer curChan);
|
||||||
|
|
||||||
|
Result getSelPosNuclide(Integer sampleId, String fileName, int channel, String nuclides, HttpServletRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
Result nuclideReview(Integer sampleId, String fileName, Integer channel, HttpServletRequest request);
|
||||||
|
|
||||||
|
Result changeNuclide(Integer sampleId, String fileName, String nuclideName);
|
||||||
|
|
||||||
|
Result searchNuclide(Integer sampleId, String fileName, Double energy, Double tolerance, HttpServletRequest request);
|
||||||
|
|
||||||
|
Result ZeroTime();
|
||||||
|
|
||||||
|
Result ZeroTimeAnalyse(String nuclide1, String nuclide2, Double product1, Double product2, String target, String energyTFH, String date, String time);
|
||||||
|
|
||||||
Result Korsum();
|
Result Korsum();
|
||||||
|
|
||||||
List<InputData> KorSumInput(CoeffData coeffData);
|
List<InputData> KorSumInput(CoeffData coeffData);
|
||||||
|
|
||||||
Result energyCalibration(Integer sampleId);
|
Result energyCalibration(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result resolutionCalibration(Integer sampleId);
|
Result changeDataEnergy(List<Double> m_vCurCentroid, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result EfficiencyCalibration(Integer sampleId);
|
Result applyDataEnergy(List<Double> m_vCurCentroid, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, String curCalName, Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result NuclideLibrary(String editEnergy, double err, String libraryName, String nuclideName, HttpServletRequest request);
|
Result resolutionCalibration(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result configUserLibrary(HttpServletRequest request);
|
Result changeDataResolution(List<Double> m_vCurReso, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result viewComment(Integer sampleId);
|
Result applyDataResolution(List<Double> m_vCurReso, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, String curCalName, Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result peakInformation(Integer sampleId);
|
Result EfficiencyCalibration(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result viewARR(Integer sampleId, HttpServletResponse response);
|
Result changeDataEfficiency(List<Double> m_vCurEffi, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, Integer funcId, Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result viewRRR(Integer sampleId);
|
Result applyDataEfficiency(List<Double> m_vCurEffi, List<Double> m_vCurEnergy, List<Double> m_vCurUncert, ParameterInfo m_curParam, String curCalName, Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result radionuclideActivity(Integer sampleId);
|
Result NuclideLibrary(Integer sampleId, String fileName, String editEnergy, double err, String libraryName, String nuclideName, HttpServletRequest request);
|
||||||
|
|
||||||
Result Spectrum(Integer sampleId);
|
Result configUserLibrary(Integer sampleId, String fileName, HttpServletRequest request);
|
||||||
|
|
||||||
Result sampleInformation(Integer sampleId);
|
Result viewComment(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result viewQCResult(Integer sampleId);
|
Result peakInformation(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result viewRLR(Integer sampleId);
|
void viewARR(Integer sampleId, HttpServletResponse response);
|
||||||
|
|
||||||
Result viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response);
|
Result viewRRR(Integer sampleId, String fileName);
|
||||||
|
|
||||||
Result viewGammaviewerLog(Integer sampleId);
|
Result radionuclideActivity(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
Result Spectrum(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
Result sampleInformation(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
Result viewQCResult(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
Result viewRLR(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
void viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response);
|
||||||
|
|
||||||
|
Result viewGammaviewerLog(Integer sampleId, String fileName);
|
||||||
|
|
||||||
|
Result saveToDB(String fileName, String userName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsBgEfficiencyPairs;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsBgEfficiencyPairsSpectrumService extends IService<GardsBgEfficiencyPairs> {
|
||||||
|
|
||||||
|
Integer saveBgEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsCalibrationPairsOrig;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsCalibrationPairsOrigSpectrumService extends IService<GardsCalibrationPairsOrig> {
|
||||||
|
|
||||||
|
Integer saveGardsCalibrationPairsOrig(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsHistogram;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsHistogramSpectrumService extends IService<GardsHistogram> {
|
||||||
|
|
||||||
|
Integer saveHistogram(EnergySpectrumStruct sourceData, Integer sampleId, String filePathName);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsRoiLimits;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsRoiLimitsSpectrumService extends IService<GardsRoiLimits> {
|
||||||
|
|
||||||
|
Integer saveRoiLimits(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleAux;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsSampleAuxSpectrumService extends IService<GardsSampleAux> {
|
||||||
|
|
||||||
|
Integer saveSampleAux(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleCertLine;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsSampleCertLineSpectrumService extends IService<GardsSampleCertLine> {
|
||||||
|
|
||||||
|
Integer saveSampleCertLine(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleCert;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsSampleCertSpectrumService extends IService<GardsSampleCert> {
|
||||||
|
|
||||||
|
Integer saveSampleCert(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsSampleDataSpectrumService extends IService<GardsSampleData> {
|
||||||
|
|
||||||
|
Integer saveSampleData(EnergySpectrumStruct sourceData, Integer stationId, Integer detectorId, String filePathName, List<String> readLines);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleDescription;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsSampleDescriptionSpectrumService extends IService<GardsSampleDescription> {
|
||||||
|
|
||||||
|
Integer saveSampleDescription(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleRatios;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsSampleRatiosSpectrumService extends IService<GardsSampleRatios> {
|
||||||
|
|
||||||
|
Integer saveSampleRatios(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSpectrum;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsSpectrumSpectrumService extends IService<GardsSpectrum> {
|
||||||
|
|
||||||
|
Integer saveSpectrum(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines, String filePathName);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsTotalEfficiencyPairs;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
|
||||||
|
public interface IGardsTotalEfficiencyPairsSpectrumService extends IService<GardsTotalEfficiencyPairs> {
|
||||||
|
|
||||||
|
Integer saveTotalEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId);
|
||||||
|
|
||||||
|
}
|
|
@ -3,9 +3,7 @@ package org.jeecg.modules.service;
|
||||||
import org.jeecg.common.api.QueryRequest;
|
import org.jeecg.common.api.QueryRequest;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.entity.GardsSampleDataSpectrum;
|
import org.jeecg.modules.entity.GardsSampleDataSpectrum;
|
||||||
import org.jeecg.modules.base.vo.AnalyseData;
|
import org.jeecg.modules.base.vo.*;
|
||||||
import org.jeecg.modules.base.vo.SeriseData;
|
|
||||||
import org.jeecg.modules.base.vo.StatisticsQueryData;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -18,8 +16,14 @@ public interface ISpectrumAnalysisService {
|
||||||
|
|
||||||
Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleDataSpectrum gardsSampleData, String dbName, String[] menuTypes, boolean AllUsers, boolean CollectStopB, boolean AcqStartB, Date startDate, Date endDate, HttpServletRequest request);
|
Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleDataSpectrum gardsSampleData, String dbName, String[] menuTypes, boolean AllUsers, boolean CollectStopB, boolean AcqStartB, Date startDate, Date endDate, HttpServletRequest request);
|
||||||
|
|
||||||
|
Result getSpectrumFiles(HttpServletRequest request);
|
||||||
|
|
||||||
|
Result getFilesBySampleFile(String sampleFileName, HttpServletRequest request);
|
||||||
|
|
||||||
Result getDBSpectrumChart(String dbName, Integer sampleId);
|
Result getDBSpectrumChart(String dbName, Integer sampleId);
|
||||||
|
|
||||||
|
Result getFileSpectrumChart(String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request);
|
||||||
|
|
||||||
Result deleteDBSpectrumChartData(Integer[] sampleIds);
|
Result deleteDBSpectrumChartData(Integer[] sampleIds);
|
||||||
|
|
||||||
Result viewComment(Integer sampleId, HttpServletRequest request);
|
Result viewComment(Integer sampleId, HttpServletRequest request);
|
||||||
|
@ -54,10 +58,12 @@ public interface ISpectrumAnalysisService {
|
||||||
|
|
||||||
Result getGammaGated(Integer chartHeight, Integer channelWidth, Integer gammaChannel, Integer sampleId);
|
Result getGammaGated(Integer chartHeight, Integer channelWidth, Integer gammaChannel, Integer sampleId);
|
||||||
|
|
||||||
Result ReAnalyse(AnalyseData analyseData);
|
Result ReAnalyse(AnalyseData analyseData, HttpServletRequest request);
|
||||||
|
|
||||||
Result analyseCurrentSpectrum(String dbName, Integer sampleId);
|
Result analyseCurrentSpectrum(String dbName, Integer sampleId, String sampleFileName, String gasFileName, String detFileName, HttpServletRequest request);
|
||||||
|
|
||||||
Result analyseAllSpectrum();
|
Result analyseAllSpectrum();
|
||||||
|
|
||||||
|
Result saveToDB(BgDataAnlyseResultIn anlyseResultIn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,6 @@ import java.util.List;
|
||||||
|
|
||||||
public interface ISysDefaultNuclideSpectrumService extends IService<SysDefaultNuclide> {
|
public interface ISysDefaultNuclideSpectrumService extends IService<SysDefaultNuclide> {
|
||||||
|
|
||||||
List<String> findNuclidesByUserName(String userName);
|
List<String> findNuclidesByUserName(String userName, String systemType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,7 @@ public interface IUserTaskService {
|
||||||
@RequestMapping("/sysTask/findUserStations")
|
@RequestMapping("/sysTask/findUserStations")
|
||||||
List<String> findUserStations(@RequestParam String userId);
|
List<String> findUserStations(@RequestParam String userId);
|
||||||
|
|
||||||
|
@RequestMapping("/sys/user/findRoleCodeByUserName")
|
||||||
|
List<String> findRoleCodeByUserName(@RequestParam String userName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
package org.jeecg.modules.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
|
||||||
import org.jeecg.common.system.util.JwtUtil;
|
|
||||||
import org.jeecg.common.util.GammaFileUtil;
|
|
||||||
import org.jeecg.common.util.RedisUtil;
|
|
||||||
import org.jeecg.modules.base.vo.NuclideLines;
|
|
||||||
import org.jeecg.modules.mapper.SpectrumAnalysisMapper;
|
|
||||||
import org.jeecg.modules.service.IDataService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Service("dataService")
|
|
||||||
public class DataServiceImpl implements IDataService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SpectrumAnalysisMapper spectrumAnalysisMapper;
|
|
||||||
@Autowired
|
|
||||||
private GammaFileUtil gammaFileUtil;
|
|
||||||
@Autowired
|
|
||||||
private RedisUtil redisUtil;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result initValue(HttpServletRequest request) {
|
|
||||||
Result result = new Result();
|
|
||||||
String userName = JwtUtil.getUserNameByToken(request);
|
|
||||||
List<String> PNuclideList = spectrumAnalysisMapper.UserNuclide("P", userName);
|
|
||||||
if (CollectionUtils.isEmpty(PNuclideList)){
|
|
||||||
PNuclideList = spectrumAnalysisMapper.UserNuclide("P", "admin");
|
|
||||||
}
|
|
||||||
List<String> GNuclideList = spectrumAnalysisMapper.UserNuclide("G", userName);
|
|
||||||
if (CollectionUtils.isEmpty(GNuclideList)){
|
|
||||||
GNuclideList = spectrumAnalysisMapper.UserNuclide("G", "admin");
|
|
||||||
}
|
|
||||||
Map<String, NuclideLines> PNuclideLinesMap = gammaFileUtil.GetNuclideLines(PNuclideList);
|
|
||||||
redisUtil.set("Gamma:GammaPInit"+userName,PNuclideLinesMap);
|
|
||||||
Map<String, NuclideLines> GNuclideLinesMap = gammaFileUtil.GetNuclideLines(GNuclideList);
|
|
||||||
redisUtil.set("Gamma:GammaGInit"+userName,GNuclideLinesMap);
|
|
||||||
result.setSuccess(true);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,35 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsBgEfficiencyPairs;
|
||||||
|
import org.jeecg.modules.mapper.GardsBgEfficiencyPairsSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsBgEfficiencyPairsSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsBgEfficiencyPairsSpectrumService")
|
||||||
|
public class GardsBgEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<GardsBgEfficiencyPairsSpectrumMapper, GardsBgEfficiencyPairs> implements IGardsBgEfficiencyPairsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveBgEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
List<GardsBgEfficiencyPairs> bgEfficiencyPairsList = new LinkedList<>();
|
||||||
|
for (int i=0; i< sourceData.bg_record_count; i++){
|
||||||
|
GardsBgEfficiencyPairs bgEfficiencyPairs = new GardsBgEfficiencyPairs();
|
||||||
|
bgEfficiencyPairs.setSampleId(sampleId);
|
||||||
|
bgEfficiencyPairs.setRoi(Integer.valueOf(sourceData.bg_ROI_number.get(i)));
|
||||||
|
bgEfficiencyPairs.setNuclideName(sourceData.bg_nuclide_name.get(i));
|
||||||
|
bgEfficiencyPairs.setBgEfficiency(sourceData.bg_efficiency.get(i));
|
||||||
|
bgEfficiencyPairs.setBgEfficError(sourceData.bg_uncertainty.get(i));
|
||||||
|
bgEfficiencyPairsList.add(bgEfficiencyPairs);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(bgEfficiencyPairsList)){
|
||||||
|
this.saveBatch(bgEfficiencyPairsList);
|
||||||
|
}
|
||||||
|
return bgEfficiencyPairsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsCalibrationPairsOrig;
|
||||||
|
import org.jeecg.modules.base.enums.CalType;
|
||||||
|
import org.jeecg.modules.base.enums.SampleFileHeader;
|
||||||
|
import org.jeecg.modules.base.enums.SystemType;
|
||||||
|
import org.jeecg.modules.mapper.GardsCalibrationPairsOrigSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsCalibrationPairsOrigSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsCalibrationPairsOrigSpectrumService")
|
||||||
|
public class GardsCalibrationPairsOrigSpectrumServiceImpl extends ServiceImpl<GardsCalibrationPairsOrigSpectrumMapper, GardsCalibrationPairsOrig> implements IGardsCalibrationPairsOrigSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveGardsCalibrationPairsOrig(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines) {
|
||||||
|
List<GardsCalibrationPairsOrig> calibrationPairsOrigList = new LinkedList<>();
|
||||||
|
//判断文件是否包含g_Energy块 新增Gards_Calibration_Pairs_Orig数据
|
||||||
|
if (readLines.contains(SampleFileHeader.GENERGY.getMessage())){
|
||||||
|
for (int i=0; i<sourceData.g_record_count; i++){
|
||||||
|
GardsCalibrationPairsOrig calibrationPairsOrig = new GardsCalibrationPairsOrig();
|
||||||
|
calibrationPairsOrig.setSampleId(sampleId);
|
||||||
|
calibrationPairsOrig.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
calibrationPairsOrig.setCaltype(CalType.ENERGY_CAL.getType());
|
||||||
|
calibrationPairsOrig.setInput("PHD");
|
||||||
|
calibrationPairsOrig.setIdCalPoint(i);
|
||||||
|
calibrationPairsOrig.setXValue(sourceData.g_centroid_channel.get(i));
|
||||||
|
calibrationPairsOrig.setYValue(sourceData.g_energy.get(i));
|
||||||
|
calibrationPairsOrig.setUncYValue(sourceData.g_uncertainty.get(i));
|
||||||
|
calibrationPairsOrigList.add(calibrationPairsOrig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.BENERGY.getMessage())){
|
||||||
|
for (int i=0; i<sourceData.b_record_count; i++){
|
||||||
|
GardsCalibrationPairsOrig calibrationPairsOrig = new GardsCalibrationPairsOrig();
|
||||||
|
calibrationPairsOrig.setSampleId(sampleId);
|
||||||
|
calibrationPairsOrig.setSampleType(SystemType.BETA.getType());
|
||||||
|
calibrationPairsOrig.setCaltype(CalType.ENERGY_CAL.getType());
|
||||||
|
calibrationPairsOrig.setInput("PHD");
|
||||||
|
calibrationPairsOrig.setIdCalPoint(i);
|
||||||
|
calibrationPairsOrig.setXValue(sourceData.b_channel.get(i));
|
||||||
|
calibrationPairsOrig.setYValue(sourceData.b_electron_energy.get(i));
|
||||||
|
calibrationPairsOrig.setUncYValue(sourceData.b_uncertainty.get(i));
|
||||||
|
calibrationPairsOrig.setDecayMode(sourceData.b_decay_mode.get(i));
|
||||||
|
calibrationPairsOrigList.add(calibrationPairsOrig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.GEFFICIENCY.getMessage())){
|
||||||
|
for (int i=0; i<sourceData.g_e_record_count; i++){
|
||||||
|
GardsCalibrationPairsOrig calibrationPairsOrig = new GardsCalibrationPairsOrig();
|
||||||
|
calibrationPairsOrig.setSampleId(sampleId);
|
||||||
|
calibrationPairsOrig.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
calibrationPairsOrig.setCaltype(CalType.EFFICIENCY_CAL.getType());
|
||||||
|
calibrationPairsOrig.setInput("PHD");
|
||||||
|
calibrationPairsOrig.setIdCalPoint(i);
|
||||||
|
calibrationPairsOrig.setXValue(sourceData.g_e_energy.get(i));
|
||||||
|
calibrationPairsOrig.setYValue(sourceData.g_e_efficiency.get(i));
|
||||||
|
calibrationPairsOrig.setUncYValue(sourceData.g_e_uncertainty.get(i));
|
||||||
|
calibrationPairsOrigList.add(calibrationPairsOrig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.BRESOLUTION.getMessage())){
|
||||||
|
for (int i=0; i<sourceData.b_r_record_count; i++){
|
||||||
|
GardsCalibrationPairsOrig calibrationPairsOrig = new GardsCalibrationPairsOrig();
|
||||||
|
calibrationPairsOrig.setSampleId(sampleId);
|
||||||
|
calibrationPairsOrig.setSampleType(SystemType.BETA.getType());
|
||||||
|
calibrationPairsOrig.setCaltype(CalType.RESOLUTION_CAL.getType());
|
||||||
|
calibrationPairsOrig.setInput("PHD");
|
||||||
|
calibrationPairsOrig.setIdCalPoint(i);
|
||||||
|
calibrationPairsOrig.setXValue(sourceData.b_r_electron_energy.get(i));
|
||||||
|
calibrationPairsOrig.setYValue(sourceData.b_r_FWHM.get(i));
|
||||||
|
calibrationPairsOrig.setUncYValue(sourceData.b_r_uncertainty.get(i));
|
||||||
|
calibrationPairsOrigList.add(calibrationPairsOrig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.GRESOLUTION.getMessage())){
|
||||||
|
for (int i=0; i<sourceData.g_r_record_count; i++){
|
||||||
|
GardsCalibrationPairsOrig calibrationPairsOrig = new GardsCalibrationPairsOrig();
|
||||||
|
calibrationPairsOrig.setSampleId(sampleId);
|
||||||
|
calibrationPairsOrig.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
calibrationPairsOrig.setCaltype(CalType.RESOLUTION_CAL.getType());
|
||||||
|
calibrationPairsOrig.setInput("PHD");
|
||||||
|
calibrationPairsOrig.setIdCalPoint(i);
|
||||||
|
calibrationPairsOrig.setXValue(sourceData.g_r_energy.get(i));
|
||||||
|
calibrationPairsOrig.setYValue(sourceData.g_r_FWHM.get(i));
|
||||||
|
calibrationPairsOrig.setUncYValue(sourceData.g_r_uncertainty.get(i));
|
||||||
|
calibrationPairsOrigList.add(calibrationPairsOrig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(calibrationPairsOrigList)){
|
||||||
|
this.saveBatch(calibrationPairsOrigList);
|
||||||
|
}
|
||||||
|
return calibrationPairsOrigList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsHistogram;
|
||||||
|
import org.jeecg.modules.mapper.GardsHistogramSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsHistogramSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsHistogramSpectrumService")
|
||||||
|
public class GardsHistogramSpectrumServiceImpl extends ServiceImpl<GardsHistogramSpectrumMapper, GardsHistogram> implements IGardsHistogramSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveHistogram(EnergySpectrumStruct sourceData, Integer sampleId, String filePathName) {
|
||||||
|
GardsHistogram histogram = new GardsHistogram();
|
||||||
|
histogram.setSampleId(sampleId);
|
||||||
|
histogram.setFilename(filePathName);
|
||||||
|
histogram.setGChannels(Integer.valueOf(String.valueOf(sourceData.g_channels)));
|
||||||
|
histogram.setBChannels(Integer.valueOf(String.valueOf(sourceData.b_channels)));
|
||||||
|
histogram.setGEnergySpan(Integer.valueOf(String.valueOf(sourceData.g_h_energy_span)));
|
||||||
|
histogram.setBEnergySpan(Integer.valueOf(String.valueOf(sourceData.b_h_energy_span)));
|
||||||
|
int insert = this.baseMapper.insert(histogram);
|
||||||
|
return insert;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsRoiLimits;
|
||||||
|
import org.jeecg.modules.mapper.GardsRoiLimitsSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsRoiLimitsSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsRoiLimitsSpectrumService")
|
||||||
|
public class GardsRoiLimitsSpectrumServiceImpl extends ServiceImpl<GardsRoiLimitsSpectrumMapper, GardsRoiLimits> implements IGardsRoiLimitsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveRoiLimits(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
List<GardsRoiLimits> roiLimitsList = new LinkedList<>();
|
||||||
|
for (int i=0; i<sourceData.roi_record_count; i++){
|
||||||
|
GardsRoiLimits roiLimits = new GardsRoiLimits();
|
||||||
|
roiLimits.setSampleId(sampleId);
|
||||||
|
roiLimits.setRoi(Integer.valueOf(sourceData.ROI_number.get(i)));
|
||||||
|
roiLimits.setBEnergyStart(sourceData.POI_B_x1.get(i));
|
||||||
|
roiLimits.setBEnergyStop(sourceData.POI_B_x2.get(i));
|
||||||
|
roiLimits.setGEnergyStart(sourceData.POI_G_y1.get(i));
|
||||||
|
roiLimits.setGEnergyStop(sourceData.POI_G_y2.get(i));
|
||||||
|
roiLimitsList.add(roiLimits);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(roiLimitsList)){
|
||||||
|
this.saveBatch(roiLimitsList);
|
||||||
|
}
|
||||||
|
return roiLimitsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.common.util.DateUtils;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleAux;
|
||||||
|
import org.jeecg.modules.base.enums.SampleFileHeader;
|
||||||
|
import org.jeecg.modules.mapper.GardsSampleAuxSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSampleAuxSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsSampleAuxSpectrumService")
|
||||||
|
public class GardsSampleAuxSpectrumServiceImpl extends ServiceImpl<GardsSampleAuxSpectrumMapper, GardsSampleAux> implements IGardsSampleAuxSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSampleAux(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines) {
|
||||||
|
String sampleRefId = "";
|
||||||
|
String measurementID = "";
|
||||||
|
String bkgdMeasurementID = "";
|
||||||
|
String gasBkgdMeasurementID = "";
|
||||||
|
String sampleHeight = "";
|
||||||
|
String sampleDiameter = "";
|
||||||
|
String calibrationDtg = "";
|
||||||
|
String msgID = "";
|
||||||
|
String archiveBottleID = "";
|
||||||
|
double xeVolume=0;
|
||||||
|
double xeVolumeUncer=0;
|
||||||
|
double xeCollectionYied=0;
|
||||||
|
double xeCollectionYiedUncer=0;
|
||||||
|
//读取message下内容
|
||||||
|
msgID = sourceData.msg_id;
|
||||||
|
GardsSampleAux sampleAux = new GardsSampleAux();
|
||||||
|
sampleAux.setMsgId(msgID);
|
||||||
|
sampleAux.setSampleHeight(Double.valueOf(sampleHeight));
|
||||||
|
sampleAux.setSampleDiameter(Double.valueOf(sampleDiameter));
|
||||||
|
if (readLines.contains(SampleFileHeader.HEADER.getMessage())){
|
||||||
|
//封装sampleAux对应的数据
|
||||||
|
measurementID = sourceData.measurement_id.replace("\\", "/").replace(" ", "-");
|
||||||
|
bkgdMeasurementID = sourceData.detector_bk_measurement_id.replace("\\", "/").replace(" ", "-");
|
||||||
|
gasBkgdMeasurementID = sourceData.gas_bk_measurement_id.replace("\\", "/").replace(" ", "-");
|
||||||
|
sampleRefId = sourceData.sample_ref_id;
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.SAMPLE.getMessage())){
|
||||||
|
//读取Sample下内容
|
||||||
|
sampleHeight = String.valueOf(sourceData.dimension_2);
|
||||||
|
sampleDiameter = String.valueOf(sourceData.dimension_1);
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.CALIBRATION.getMessage())){
|
||||||
|
calibrationDtg = sourceData.date_calibration+" "+sourceData.time_calibration;
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.PROCESSING.getMessage())){
|
||||||
|
//读取Processing下内容
|
||||||
|
archiveBottleID = sourceData.archive_bottle_id;
|
||||||
|
xeVolume = sourceData.sample_volume_of_Xe;
|
||||||
|
xeVolumeUncer = sourceData.uncertainty_1;
|
||||||
|
xeCollectionYied = sourceData.Xe_collection_yield;
|
||||||
|
xeCollectionYiedUncer= sourceData.uncertainty_2;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
sampleAux.setSampleId(sampleId);
|
||||||
|
sampleAux.setSampleRefId(sampleRefId);
|
||||||
|
sampleAux.setMeasurementId(measurementID);
|
||||||
|
sampleAux.setBkgdMeasurementId(bkgdMeasurementID);
|
||||||
|
sampleAux.setGasBkgdMeasurementId(gasBkgdMeasurementID);
|
||||||
|
sampleAux.setSampleHeight(Double.valueOf(sampleHeight));
|
||||||
|
sampleAux.setSampleDiameter(Double.valueOf(sampleDiameter));
|
||||||
|
sampleAux.setCalibrationDtg(DateUtils.parseDate(calibrationDtg));
|
||||||
|
sampleAux.setArchiveBottleId(archiveBottleID);
|
||||||
|
sampleAux.setXeVolume(xeVolume);
|
||||||
|
sampleAux.setXeVolumeUncer(xeVolumeUncer);
|
||||||
|
sampleAux.setXeCollectionYied(xeCollectionYied);
|
||||||
|
sampleAux.setXeCollectionYiedUncer(xeCollectionYiedUncer);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
int insert = this.baseMapper.insert(sampleAux);
|
||||||
|
return insert;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleCertLine;
|
||||||
|
import org.jeecg.modules.mapper.GardsSampleCertLineSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSampleCertLineSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsSampleCertLineSpectrumService")
|
||||||
|
public class GardsSampleCertLineSpectrumServiceImpl extends ServiceImpl<GardsSampleCertLineSpectrumMapper, GardsSampleCertLine> implements IGardsSampleCertLineSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSampleCertLine(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
List<GardsSampleCertLine> sampleCertLineList = new LinkedList<>();
|
||||||
|
for (int i=0; i<sourceData.record_count; i++){
|
||||||
|
GardsSampleCertLine sampleCertLine = new GardsSampleCertLine();
|
||||||
|
sampleCertLine.setSampleId(sampleId);
|
||||||
|
sampleCertLine.setNuclName(sourceData.nuclide_name.get(i));
|
||||||
|
sampleCertLine.setHalflife(sourceData.half_life_time.get(i));
|
||||||
|
sampleCertLine.setEnergy(sourceData.cer_g_energy.get(i));
|
||||||
|
sampleCertLine.setActivity(sourceData.activity_nuclide_time_assay.get(i));
|
||||||
|
sampleCertLine.setError(sourceData.uncertainty.get(i));
|
||||||
|
sampleCertLine.setAbundance(sourceData.g_intensity.get(i));
|
||||||
|
sampleCertLine.setBAbundance(sourceData.intensity_b_particle.get(i));
|
||||||
|
sampleCertLine.setBEnergy(sourceData.maximum_energy.get(i));
|
||||||
|
sampleCertLine.setDecayMode(sourceData.electron_decay_mode.get(i));
|
||||||
|
sampleCertLine.setHalfliftUnit(sourceData.time_unit.get(i));
|
||||||
|
sampleCertLineList.add(sampleCertLine);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(sampleCertLineList)){
|
||||||
|
this.saveBatch(sampleCertLineList);
|
||||||
|
}
|
||||||
|
return sampleCertLineList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.common.util.DateUtils;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleCert;
|
||||||
|
import org.jeecg.modules.mapper.GardsSampleCertSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSampleCertSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
|
||||||
|
@Service("gardsSampleCertSpectrumService")
|
||||||
|
public class GardsSampleCertSpectrumServiceImpl extends ServiceImpl<GardsSampleCertSpectrumMapper, GardsSampleCert> implements IGardsSampleCertSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSampleCert(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
GardsSampleCert sampleCert = new GardsSampleCert();
|
||||||
|
try {
|
||||||
|
sampleCert.setSampleId(sampleId);
|
||||||
|
sampleCert.setQuantity(sourceData.total_source_activity);
|
||||||
|
sampleCert.setAssayDate(DateUtils.parseDate(sourceData.assay_date+" "+sourceData.assay_time));
|
||||||
|
sampleCert.setUnit(sourceData.units_activity);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
int insert = this.baseMapper.insert(sampleCert);
|
||||||
|
return insert;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.common.util.DateUtils;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||||
|
import org.jeecg.modules.base.enums.SampleFileHeader;
|
||||||
|
import org.jeecg.modules.mapper.GardsSampleDataSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSampleDataSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsSampleDataSpectrumService")
|
||||||
|
public class GardsSampleDataSpectrumServiceImpl extends ServiceImpl<GardsSampleDataSpectrumMapper, GardsSampleData> implements IGardsSampleDataSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSampleData(EnergySpectrumStruct sourceData, Integer stationId, Integer detectorId, String filePathName, List<String> readLines) {
|
||||||
|
String sample_type = "";
|
||||||
|
String detect_code = "";
|
||||||
|
String geometry = "";
|
||||||
|
String spectral_qualifie = "";
|
||||||
|
String data_type = "";
|
||||||
|
String transmit_dtg = "";
|
||||||
|
String collect_start = "";
|
||||||
|
String collect_stop = "";
|
||||||
|
double quantity=0;
|
||||||
|
String acquisition_start = "";
|
||||||
|
double acquisition_real_sec=0;
|
||||||
|
double acquisition_live_sec=0;
|
||||||
|
//读取message下内容
|
||||||
|
data_type = sourceData.data_type;
|
||||||
|
//读取header下内容
|
||||||
|
GardsSampleData sampleData = new GardsSampleData();
|
||||||
|
if (readLines.contains(SampleFileHeader.HEADER.getMessage())){
|
||||||
|
sample_type=sourceData.system_type;
|
||||||
|
geometry=sourceData.sample_geometry;
|
||||||
|
spectral_qualifie=sourceData.spectrum_quantity;
|
||||||
|
transmit_dtg=sourceData.transmit_date+" "+sourceData.transmit_time;
|
||||||
|
detect_code=sourceData.detector_code;
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.COLLECTION.getMessage())){
|
||||||
|
//读取Collection下内容
|
||||||
|
collect_start = sourceData.collection_start_date+" "+sourceData.collection_start_time;
|
||||||
|
collect_stop = sourceData.collection_stop_date+" "+sourceData.collection_stop_time;
|
||||||
|
quantity = sourceData.air_volume;
|
||||||
|
}
|
||||||
|
if (readLines.contains(SampleFileHeader.ACQUISITION.getMessage())){
|
||||||
|
//读取Acquisition下内容
|
||||||
|
acquisition_start = sourceData.acquisition_start_date+" "+sourceData.acquisition_start_time;
|
||||||
|
acquisition_real_sec=sourceData.acquisition_real_time;
|
||||||
|
acquisition_live_sec=sourceData.acquisition_live_time;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
sampleData.setSiteDetCode(detect_code);
|
||||||
|
sampleData.setInputFileName(filePathName);
|
||||||
|
sampleData.setSampleType(sample_type);
|
||||||
|
sampleData.setDataType(data_type);
|
||||||
|
sampleData.setGeometry(geometry);
|
||||||
|
sampleData.setSpectralQualifie(spectral_qualifie);
|
||||||
|
sampleData.setTransmitDtg(DateUtils.parseDate(transmit_dtg));
|
||||||
|
sampleData.setCollectStart(DateUtils.parseDate(collect_start));
|
||||||
|
sampleData.setCollectStop(DateUtils.parseDate(collect_stop));
|
||||||
|
sampleData.setQuantity(quantity);
|
||||||
|
Date acquisitionStart = DateUtils.parseDate(acquisition_start);
|
||||||
|
long timeSecs = (long) (acquisitionStart.getTime() + acquisition_live_sec);
|
||||||
|
Date acquisitionStop = new Date(timeSecs);
|
||||||
|
sampleData.setAcquisitionStart(acquisitionStart);
|
||||||
|
sampleData.setAcquisitionStop(acquisitionStop);
|
||||||
|
sampleData.setAcquisitionLiveSec(acquisition_live_sec);
|
||||||
|
sampleData.setAcquisitionRealSec(acquisition_real_sec);
|
||||||
|
sampleData.setStatus("R");
|
||||||
|
sampleData.setStationId(stationId);
|
||||||
|
sampleData.setDetectorId(detectorId);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
int insert = this.baseMapper.insert(sampleData);
|
||||||
|
return insert;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleDescription;
|
||||||
|
import org.jeecg.modules.mapper.GardsSampleDescriptionSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSampleDescriptionSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service("gardsSampleDescriptionSpectrumService")
|
||||||
|
public class GardsSampleDescriptionSpectrumServiceImpl extends ServiceImpl<GardsSampleDescriptionSpectrumMapper, GardsSampleDescription> implements IGardsSampleDescriptionSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSampleDescription(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
GardsSampleDescription sampleDescription = new GardsSampleDescription();
|
||||||
|
String comment = sourceData.comment;
|
||||||
|
if (comment.length()>1024){
|
||||||
|
comment = comment.substring(0, 1022);
|
||||||
|
}
|
||||||
|
sampleDescription.setSampleId(sampleId);
|
||||||
|
sampleDescription.setDescription(comment);
|
||||||
|
int insert = this.baseMapper.insert(sampleDescription);
|
||||||
|
return insert;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleRatios;
|
||||||
|
import org.jeecg.modules.mapper.GardsSampleRatiosSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSampleRatiosSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsSampleRatiosSpectrumService")
|
||||||
|
public class GardsSampleRatiosSpectrumServiceImpl extends ServiceImpl<GardsSampleRatiosSpectrumMapper, GardsSampleRatios> implements IGardsSampleRatiosSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSampleRatios(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
List<GardsSampleRatios> sampleRatiosList = new LinkedList<>();
|
||||||
|
for (int i=0; i<sourceData.ratio_record_count; i++){
|
||||||
|
GardsSampleRatios sampleRatios = new GardsSampleRatios();
|
||||||
|
sampleRatios.setSampleId(sampleId);
|
||||||
|
sampleRatios.setRatioId(sourceData.ratio_id.get(i));
|
||||||
|
sampleRatios.setUpperRoiNumber(Integer.valueOf(sourceData.ROI_num_highter_G_energy_ROI.get(i)));
|
||||||
|
sampleRatios.setLowerRoiNumber(Integer.valueOf(sourceData.ROI_num_lower_G_energy_ROI.get(i)));
|
||||||
|
sampleRatios.setCountRatio(sourceData.count_ratio.get(i));
|
||||||
|
sampleRatios.setCountRatioErr(sourceData.count_ratio_uncertainty.get(i));
|
||||||
|
sampleRatiosList.add(sampleRatios);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(sampleRatiosList)){
|
||||||
|
this.saveBatch(sampleRatiosList);
|
||||||
|
}
|
||||||
|
return sampleRatiosList.size();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSpectrum;
|
||||||
|
import org.jeecg.modules.base.enums.SampleFileHeader;
|
||||||
|
import org.jeecg.modules.base.enums.SystemType;
|
||||||
|
import org.jeecg.modules.mapper.GardsSpectrumSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsSpectrumSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsSpectrumSpectrumService")
|
||||||
|
public class GardsSpectrumSpectrumServiceImpl extends ServiceImpl<GardsSpectrumSpectrumMapper, GardsSpectrum> implements IGardsSpectrumSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveSpectrum(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines, String filePathName) {
|
||||||
|
List<GardsSpectrum> spectrumList = new LinkedList<>();
|
||||||
|
//判断是否包含b_Spectrum块 新增Gards_Spectrum数据
|
||||||
|
if (readLines.contains(SampleFileHeader.BSPECTRUM.getMessage())){
|
||||||
|
GardsSpectrum spectrum = new GardsSpectrum();
|
||||||
|
spectrum.setSampleId(sampleId);
|
||||||
|
spectrum.setSampleType(SystemType.BETA.getType());
|
||||||
|
spectrum.setFilename(filePathName);
|
||||||
|
spectrum.setChannels(Integer.valueOf(String.valueOf(sourceData.num_b_channel)));
|
||||||
|
spectrum.setEnergySpan(Integer.valueOf(String.valueOf(sourceData.b_energy_span)));
|
||||||
|
spectrum.setStartChannel(Integer.valueOf(String.valueOf(sourceData.b_begin_channel)));
|
||||||
|
spectrumList.add(spectrum);
|
||||||
|
}
|
||||||
|
//判断是否包含g_Spectrum块 新增Gards_Spectrum数据
|
||||||
|
if (readLines.contains(SampleFileHeader.GSPECTRUM.getMessage())){
|
||||||
|
GardsSpectrum spectrum = new GardsSpectrum();
|
||||||
|
spectrum.setSampleId(sampleId);
|
||||||
|
spectrum.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
spectrum.setFilename(filePathName);
|
||||||
|
spectrum.setChannels(Integer.valueOf(String.valueOf(sourceData.num_g_channel)));
|
||||||
|
spectrum.setEnergySpan(Integer.valueOf(String.valueOf(sourceData.g_energy_span)));
|
||||||
|
spectrum.setStartChannel(Integer.valueOf(String.valueOf(sourceData.g_begin_channel)));
|
||||||
|
spectrumList.add(spectrum);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(spectrumList)){
|
||||||
|
this.saveBatch(spectrumList);
|
||||||
|
}
|
||||||
|
return spectrumList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsTotalEfficiencyPairs;
|
||||||
|
import org.jeecg.modules.mapper.GardsTotalEfficiencyPairsSpectrumMapper;
|
||||||
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
import org.jeecg.modules.service.IGardsTotalEfficiencyPairsSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("gardsTotalEfficiencyPairsSpectrumService")
|
||||||
|
public class GardsTotalEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<GardsTotalEfficiencyPairsSpectrumMapper, GardsTotalEfficiencyPairs> implements IGardsTotalEfficiencyPairsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer saveTotalEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
|
List<GardsTotalEfficiencyPairs> totalEfficiencyPairsList = new LinkedList<>();
|
||||||
|
for (int i=0; i<sourceData.t_record_count; i++){
|
||||||
|
GardsTotalEfficiencyPairs totalEfficiencyPairs = new GardsTotalEfficiencyPairs();
|
||||||
|
totalEfficiencyPairs.setSampleId(sampleId);
|
||||||
|
totalEfficiencyPairs.setEfficEnergy(String.valueOf(sourceData.t_g_energy.get(i)));
|
||||||
|
totalEfficiencyPairs.setTotalEfficiency(sourceData.total_efficiency.get(i));
|
||||||
|
totalEfficiencyPairs.setTotalEfficError(sourceData.t_uncertainty.get(i));
|
||||||
|
totalEfficiencyPairsList.add(totalEfficiencyPairs);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(totalEfficiencyPairsList)){
|
||||||
|
this.saveBatch(totalEfficiencyPairsList);
|
||||||
|
}
|
||||||
|
return totalEfficiencyPairsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -12,6 +12,7 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.Prompt;
|
import org.jeecg.common.constant.Prompt;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.jeecg.common.constant.enums.FileTypeEnum;
|
import org.jeecg.common.constant.enums.FileTypeEnum;
|
||||||
|
import org.jeecg.common.properties.SpectrumPathProperties;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
import org.jeecg.common.util.FTPUtil;
|
import org.jeecg.common.util.FTPUtil;
|
||||||
import org.jeecg.modules.base.comparator.FileComparator;
|
import org.jeecg.modules.base.comparator.FileComparator;
|
||||||
|
@ -36,6 +37,8 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FTPUtil ftpUtil;
|
private FTPUtil ftpUtil;
|
||||||
|
@Autowired
|
||||||
|
private SpectrumPathProperties spectrumPathProperties;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<?> upload(MultipartFile file) {
|
public Result<?> upload(MultipartFile file) {
|
||||||
|
@ -48,7 +51,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
|
||||||
FileOutputStream fos = null;
|
FileOutputStream fos = null;
|
||||||
ZipInputStream zipInputStream = null;
|
ZipInputStream zipInputStream = null;
|
||||||
String slash = SymbolConstant.SINGLE_SLASH;
|
String slash = SymbolConstant.SINGLE_SLASH;
|
||||||
String filePath = "/SpectrumFile" + slash + username;
|
String filePath = slash + spectrumPathProperties.getUploadPath() + slash + username;
|
||||||
String tempFilePath = System.getProperty("java.io.tmpdir") + username + slash;
|
String tempFilePath = System.getProperty("java.io.tmpdir") + username + slash;
|
||||||
List<String> fileNames = new ArrayList<>();
|
List<String> fileNames = new ArrayList<>();
|
||||||
List<File> fileList = new ArrayList<>();
|
List<File> fileList = new ArrayList<>();
|
||||||
|
@ -111,7 +114,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String username = user.getUsername();
|
String username = user.getUsername();
|
||||||
String slash = SymbolConstant.SINGLE_SLASH;
|
String slash = SymbolConstant.SINGLE_SLASH;
|
||||||
String filePath = "/SpectrumFile" + slash + username;
|
String filePath = slash + spectrumPathProperties.getUploadPath() + slash + username;
|
||||||
FTPClient ftpClient = null;
|
FTPClient ftpClient = null;
|
||||||
List<FileDto> fileDtos = new ArrayList<>();
|
List<FileDto> fileDtos = new ArrayList<>();
|
||||||
Page<FileDto> page = new Page<>(pageNo, pageSize);
|
Page<FileDto> page = new Page<>(pageNo, pageSize);
|
||||||
|
|
|
@ -18,11 +18,11 @@ public class SysDefaultNuclideSpectrumServiceImpl extends ServiceImpl<SysDefault
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public List<String> findNuclidesByUserName(String userName) {
|
public List<String> findNuclidesByUserName(String userName, String systemType) {
|
||||||
//查询当前用户的核素信息
|
//查询当前用户的核素信息
|
||||||
List<String> nuclides = this.baseMapper.findNuclidesByUserName(userName);
|
List<String> nuclides = this.baseMapper.findNuclidesByUserName(userName, systemType);
|
||||||
if (CollectionUtils.isEmpty(nuclides)){
|
if (CollectionUtils.isEmpty(nuclides)){
|
||||||
nuclides = this.baseMapper.findNuclidesByUserName("admin");
|
nuclides = this.baseMapper.findNuclidesByUserName("admin", systemType);
|
||||||
}
|
}
|
||||||
return nuclides;
|
return nuclides;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1768,4 +1768,9 @@ public class SysUserController {
|
||||||
return sysUserService.getUserByName(userName);
|
return sysUserService.getUserByName(userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("findRoleCodeByUserName")
|
||||||
|
public List<String> findRoleCodeByUserName(@RequestParam String userName){
|
||||||
|
return sysUserService.findRoleCodeByUserName(userName);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,4 +404,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||||
Map<String, SysUser> findUserMap();
|
Map<String, SysUser> findUserMap();
|
||||||
|
|
||||||
List<SysUser> listByIds(List<String> ids);
|
List<SysUser> listByIds(List<String> ids);
|
||||||
|
|
||||||
|
List<String> findRoleCodeByUserName(String userName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1339,6 +1339,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
return list(wrapper);
|
return list(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> findRoleCodeByUserName(String userName) {
|
||||||
|
return sysUserRoleMapper.getRoleByUserName(userName);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改租户下的部门
|
* 修改租户下的部门
|
||||||
* @param departs
|
* @param departs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user