diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsAnalyses.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsAnalyses.java new file mode 100644 index 00000000..8ac4af39 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsAnalyses.java @@ -0,0 +1,147 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * gards_analyses数据表存储谱数据分析的基本信息,包括: + * 谱数据到达的时间、分析开始和结束时间、分析员姓名、使用的软件、谱分析使用的参数(基线类型、寻峰方式、核素识别方法)等 + */ +@Data +@TableName("GARDS_ANALYSES") +public class GardsAnalyses implements Serializable { + + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析开始时间 + */ + @TableField(value = "ANALYSISBEGIN") + private Data analysisBegin; + /** + * 分析结束时间 + */ + @TableField(value = "ANALYSISEND") + private Data analysisEnd; + /** + * Reviewed:交互,auto:自动 + */ + @TableField(value = "TYPE") + private String type; + /** + * 使用的软件名称 + */ + @TableField(value = "SOFTWARE") + private String software; + /** + * 软件版本号 + */ + @TableField(value = "SWVERSION") + private String swVersion; + /** + * 分析员名称 + */ + @TableField(value = "ANALYST") + private String analyst; + /** + * 基线计数方法描述 + */ + @TableField(value = "BASELINEMETHOD") + private String baselineMethod; + /** + * 寻峰方法描述 + */ + @TableField(value = "PEAKSMETHOD") + private String peaksMethod; + /** + * 核素识别方法描述 + */ + @TableField(value = "NUCLIDEMETHOD") + private String nuclideMethod; + /** + * 不确定度计算描述 + */ + @TableField(value = "UNCCALCMETHOD") + private String uncCalcMethod; + /** + * Lc计算方法描述 + */ + @TableField(value = "LCMETHOD") + private String lcMethod; + /** + * 寻峰起始道 + */ + @TableField(value = "SEARCHSTARTCHANNEL") + private Integer searchStartChannel; + /** + * 寻峰结束道 + */ + @TableField(value = "SEARCHENDCHANNEL") + private Integer searchEndChannel; + /** + * 寻峰阈值 + */ + @TableField(value = "SEARCHTHRESHOLD") + private Double searchThreshold; + /** + * 峰数目 + */ + @TableField(value = "NUMBEROFPEAKS") + private Integer numberOfPeaks; + /** + * 总计数 + */ + @TableField(value = "TOTALCOUNTS") + private Float totalCounts; + /** + * 分级结果 + */ + @TableField(value = "CATEGORY") + private Integer category; + /** + * 注释 + */ + @TableField(value = "COMMENTS") + private String comments; + + @TableField(value = "MODDATE") + private Long moddate; + + @TableField(value = "USEDGASPHD") + private String usedgasphd; + + @TableField(value = "USEDDETPHD") + private String useddetphd; + + @TableField(value = "USEDGASPHD_ID") + private Integer usedgasphdId; + + @TableField(value = "USEDDETPHD_ID") + private Integer useddetphdId; + + @TableField(value = "BASELINE_PATH") + private String baselinePath; + + @TableField(value = "LC_PATH") + private String lcPath; + + @TableField(value = "SCAC_PATH") + private String scacPath; + + @TableField(value = "LOG_PATH") + private String logPath; + + @TableField(value = "REPORT_PAHT") + private String reportPath; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsBgEfficiencyPairs.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsBgEfficiencyPairs.java new file mode 100644 index 00000000..ff2241cb --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsBgEfficiencyPairs.java @@ -0,0 +1,44 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储β-γ符合谱中#b_ gefficiency 数据块中的探测器符合效率刻度点。 + */ +@Data +@TableName("GARDS_BG_EFFICIENCY_PAIRS") +public class GardsBgEfficiencyPairs implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 感兴趣区编号 + */ + @TableField(value = "ROI") + private Integer roi; + /** + * 核素名称 + */ + @TableField(value = "NUCLIDE_NAME") + private String nuclideName; + /** + * 符合效率 + */ + @TableField(value = "BG_EFFICIENCY") + private Double bgEfficiency; + /** + * 不确定度 + */ + @TableField(value = "BG_EFFIC_ERROR") + private Double bgEfficError; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibration.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibration.java new file mode 100644 index 00000000..07fd2db2 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibration.java @@ -0,0 +1,108 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储数据分析过程中能量、分辨率和效率刻度的拟合结果。 + */ +@Data +@TableName("GARDS_CALIBRATION") +public class GardsCalibration implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * G:gamma探测器的数据,#g_;B:beta探测器的数据,#b_ + */ + @TableField(value = "SAMPLE_TYPE") + private String sampleType; + /** + * energy:能量刻度; + * efficiency:效率刻度; + * Resolution:分辨率刻度 + */ + @TableField(value = "CALTYPE") + private String calType; + /** + * 拟合方程ID号(统一定义) + */ + @TableField(value = "FUNCTION") + private Integer function; + /** + * 拟合方程描述 + */ + @TableField(value = "FUNCTIONDEF") + private String functionDef; + /** + * 拟合的起始值 + */ + @TableField(value = "STARTOFRANGE") + private Integer startOfRange; + /** + * 拟合的结束值 + */ + @TableField(value = "ENDOFRANGE") + private Integer endOfRange; + /** + * 拟合系数1 + */ + @TableField(value = "COEFF1") + private Double coeff1; + /** + * 拟合系数2 + */ + @TableField(value = "COEFF2") + private Double coeff2; + /** + * 拟合系数3 + */ + @TableField(value = "COEFF3") + private Double coeff3; + /** + * 拟合系数4 + */ + @TableField(value = "COEFF4") + private Double coeff4; + /** + * 拟合系数5 + */ + @TableField(value = "COEFF5") + private Double coeff5; + /** + * 拟合系数6 + */ + @TableField(value = "COEFF6") + private Double coeff6; + /** + * 拟合系数7 + */ + @TableField(value = "COEFF7") + private Double coeff7; + /** + * 拟合系数8 + */ + @TableField(value = "COEFF8") + private Double coeff8; + /** + * 拟合系数9 + */ + @TableField(value = "COEFF9") + private Double coeff9; + + @TableField(value = "MODDATE") + private Long moddate; + + @TableField(value = "COEFF_STRING") + private String coeffString; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibrationPairs.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibrationPairs.java new file mode 100644 index 00000000..94634963 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibrationPairs.java @@ -0,0 +1,64 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储数据分析过程中能量、分辨率和效率刻度实际使用的刻度点数据。 + */ +@Data +@TableName("GARDS_CALIBRATION_PAIRS") +public class GardsCalibrationPairs implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * G:gamma探测器的数据,#g_;B:beta探测器的数据,#b_ + */ + @TableField(value = "SAMPLE_TYPE") + private String sampleType; + /** + * energy:能量刻度; + * efficiency:效率刻度; + * Resolution:分辨率刻度 + */ + @TableField(value = "CALTYPE") + private String caltype; + /** + * PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等 + */ + @TableField(value = "INPUT") + private String input; + /** + * 刻度点ID号 + */ + @TableField(value = "IDCALPOINT") + private Integer idCalPoint; + + @TableField(value = "XVALUE") + private Double xValue; + + @TableField(value = "YVALUE") + private Double yValue; + + @TableField(value = "DECAY_MODE") + private String decayMode; + /** + * y值不确定度 + */ + @TableField(value = "UNCYVALUE") + private String uncYValue; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibrationPairsOrig.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibrationPairsOrig.java new file mode 100644 index 00000000..3a7928ce --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsCalibrationPairsOrig.java @@ -0,0 +1,59 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储所有能谱中#g_energy、#b_energy、#b_resolution、#g_resolution、#g_efficiency数据块中的刻度点。 + */ +@Data +@TableName("GARDS_CALIBRATION_PAIRS_ORIG") +public class GardsCalibrationPairsOrig implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * G:gamma探测器的数据,#g_;B:beta探测器的数据,#b_ + */ + @TableField(value = "SAMPLE_TYPE") + private String sampleType; + /** + * energy:能量刻度; + * efficiency:效率刻度; + * Resolution:分辨率刻度 + */ + @TableField(value = "CALTYPE") + private String caltype; + /** + * PHD:代表数据来自PHD文件;External:代表数据来自外部,如刻度工具、其它文件等 + */ + @TableField(value = "INPUT") + private String input; + /** + * 刻度点ID号 + */ + @TableField(value = "IDCALPOINT") + private Double idCalPoint; + + @TableField(value = "XVALUE") + private Double xValue; + + @TableField(value = "YVALUE") + private Double yValue; + /** + * y值不确定度 + */ + @TableField(value = "UNCYVALUE") + private Double uncYValue; + /** + * 衰变模式 + */ + @TableField(value = "DECAY_MODE") + private String decayMode; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsHistogram.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsHistogram.java new file mode 100644 index 00000000..af1f0788 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsHistogram.java @@ -0,0 +1,49 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储β-γ符合谱中#histogram数据块中的数据。 + */ +@Data +@TableName("GARDS_HISTOGRAM") +public class GardsHistogram implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 报文的文件路径,同gards_sample数据表中input_file_name中的记录 + */ + @TableField(value = "FILENAME") + private String filename; + /** + * γ探测器总道数 + */ + @TableField(value = "G_CHANNELS") + private Integer gChannels; + /** + * β探测器总道数 + */ + @TableField(value = "B_CHANNELS") + private Integer bChannels; + /** + * γ能量最大值(keV) + */ + @TableField(value = "G_ENERGY_SPAN") + private Integer gEnergySpan; + /** + * β能量最大值(keV) + */ + @TableField(value = "B_ENERGY_SPAN") + private Integer bEnergySpan; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsNuclIded.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsNuclIded.java new file mode 100644 index 00000000..d1c8acea --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsNuclIded.java @@ -0,0 +1,112 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储gamma谱中识别到的核素计算结果。 + */ +@Data +@TableName("GARDS_NUCL_IDED") +public class GardsNuclIded implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * 核素名称 + */ + @TableField(value = "NUCLIDE_NAME") + private String nuclideName; + /** + * 核素类型 + */ + @TableField(value = "TYPE") + private String type; + /** + * 核素半衰期 + */ + @TableField(value = "HALFLIFE") + private String halflife; + /** + * 平均活度值 + */ + @TableField(value = "AVE_ACTIV") + private String aveActiv; + /** + * 平均活度值不确定度 + */ + @TableField(value = "AVE_ACTIV_ERR") + private Double aveActivErr; + /** + * 主射线活度值 + */ + @TableField(value = "ACTIV_KEY") + private Double activKey; + /** + * 主射线活度值不确定度 + */ + @TableField(value = "ACTIV_KEY_ERR") + private Double activKeyErr; + /** + * 核素的最小可探测活度 + */ + @TableField(value = "MDA") + private String mda; + /** + * 核素的最小可探测活度不确定度 + */ + @TableField(value = "MDA_ERR") + private Double mdaErr; + /** + * 核素识别标志 + */ + @TableField(value = "NID_FLAG") + private Integer nidFlag; + + @TableField(value = "ACTIV_DECAY") + private Double activDecay; + + @TableField(value = "ACTIV_DECAY_ERR") + private Double activDecayErr; + /** + * 符合相加校正因子(无设为1) + */ + @TableField(value = "CSC_RATIO") + private Double cscRatio; + /** + * 符合相加校正因子不确定度(无设为0) + */ + @TableField(value = "CSC_RATIO_ERR") + private Double cscRatioErr; + /** + * 活度是否经过符合相加校正 + */ + @TableField(value = "CSC_MOD_FLAG") + private Integer cscModFlag; + + @TableField(value = "MODDATE") + private Long moddate; + + @TableField(value = "MDC") + private String mdc; + + @TableField(value = "CONCENTRATION") + private String concentration; + + @TableField(value = "KEY_ENERGY") + private String keyEnergy; + + @TableField(value = "KEY_YIELD") + private String keyYield; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsNuclLinesIded.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsNuclLinesIded.java new file mode 100644 index 00000000..a88d0b89 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsNuclLinesIded.java @@ -0,0 +1,106 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储gamma谱中识别到的峰计算结果。 + */ +@Data +@TableName("GARDS_NUCL_LINES_IDED") +public class GardsNuclLinesIded implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 峰序号 + */ + @TableField(value = "IDPEAK") + private Integer idPeak; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + /** + * 核素名称 + */ + @TableField(value = "NUCLIDE_NAME") + private String nuclideName; + + @TableField(value = "MODDATE") + private Long moddate; + + /** + * 核素库中核素对应峰的能量(keV) + */ + @TableField(value = "ENERGY") + private Double energy; + /** + * 核素库中核素对应峰的能量不确定度(keV) + */ + @TableField(value = "UNCENERGY") + private Double uncEnergy; + /** + * 核素库中核素对应峰的发射几率 + */ + @TableField(value = "ABUNDANCE") + private Double abundance; + /** + * 核素库中核素对应峰的发射几率不确定度 + */ + @TableField(value = "UNCABUNDANCE") + private Double uncAbundance; + /** + * 利用该峰计算得到的活度 + */ + @TableField(value = "ACTIVITY") + private String activity; + /** + * 利用该峰计算得到的活度不确定度 + */ + @TableField(value = "UNCACTIVITY") + private Double uncActivity; + /** + * 该峰处的探测效率 + */ + @TableField(value = "EFFIC") + private Double effic; + /** + * 该峰处的探测效率不确定度 + */ + @TableField(value = "UNEFFIC") + private Double uncEffic; + /** + * 利用该峰计算得到的最小可探测活度 + */ + @TableField(value = "MDA") + private Double mda; + /** + * 主射线标识:0-否;1-是 + */ + @TableField(value = "KEY_FLAG") + private Double keyFlag; + /** + * 符合相加校正因子(无设为1) + */ + @TableField(value = "CSC_RATIO") + private Double cscRatio; + /** + * 符合相加校正因子不确定度(无设为0) + */ + @TableField(value = "CSC_RATIO_ERR") + private Double cscRatioErr; + /** + * 活度是否经过符合相加校正 + */ + @TableField(value = "CSC_MOD_FLAG") + private Double cscModFlag; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsPeaks.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsPeaks.java new file mode 100644 index 00000000..39f49e6c --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsPeaks.java @@ -0,0 +1,155 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; +/** + * 存储gamma谱的寻峰结果 + */ +@Data +@TableName("GARDS_PEAKS") +public class GardsPeaks implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 峰序号 + */ + @TableField(value = "IDPEAK") + private Integer idPeak; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + @TableField(value = "MODDATE") + private Long moddate; + + /** + * 峰中心道(道址) + */ + @TableField(value = "CENTROIDCHANNEL") + private Double centroidChannel; + /** + * 峰中心道不确定度(道址) + */ + @TableField(value = "UNCCENTROIDCHANNEL") + private Double uncCentroidChannel; + /** + * 峰中心道能量(keV) + */ + @TableField(value = "ENERGY") + private Double energy; + /** + * 峰中心道能量不确定度(keV) + */ + @TableField(value = "UNCENERGY") + private Double uncEnergy; + /** + * 峰面积(计数)。已扣除基线面积,但未扣除空白样品计数和探测器本底计数 + */ + @TableField(value = "AREA") + private Double area; + /** + * 峰面积不确定度(计数) + */ + @TableField(value = "UNCAREA") + private Double uncArea; + /** + * 峰的净计数率(1/s)=峰面积/活时间 + */ + @TableField(value = "NETCOUNTRATE") + private Double netCountRate; + /** + * 峰的净计数率的不确定度(1/s) + */ + @TableField(value = "UNCNETCOUNTRATE") + private Double uncNetCountRate; + /** + * 测量系统在峰能量处的绝对效率 + */ + @TableField(value = "EFFICIENCY") + private Double efficiency; + /** + * 测量系统在峰能量处的绝对效率的不确定度 + */ + @TableField(value = "UNCEFFICIENCY") + private Double uncefficiency; + /** + * 峰的半高宽(道) + */ + @TableField(value = "FWHM") + private Double fwhm; + /** + * 峰的十分之一高宽(道) + */ + @TableField(value = "FWTM") + private Double fwtm; + /** + * 峰的重要性因子 + */ + @TableField(value = "SIGNIFICANCE") + private Double significance; + /** + * 峰的可探测线Lc + */ + @TableField(value = "LC") + private Double lc; + /** + * 峰的感兴趣区的起始道 + */ + @TableField(value = "ROISTART") + private Double roiStart; + /** + * 峰的感兴趣区的结束道 + */ + @TableField(value = "ROIEND") + private Double roiEnd; + + @TableField(value = "MULTIINDEX") + private Double mulitiIndex; + + @TableField(value = "TAIL") + private Double tail; + + @TableField(value = "TAILALPHA") + private Double tailAlpha; + + @TableField(value = "UPPERTAIL") + private Double upperTail; + + @TableField(value = "UPPERTAILALPHA") + private Double upperTailAlpha; + + @TableField(value = "BWWIDTHCHAN") + private Double bwwidthchan; + + @TableField(value = "RECOILDELTACHAN") + private Double recoildeltachan; + + @TableField(value = "STEPRAIO") + private Double stepraio; + + @TableField(value = "LD") + private Double ld; + + @TableField(value = "SENSITIVITY") + private Double sensitivity; + + @TableField(value = "BACKGROUNDAREA") + private Double backgroundarea; + + @TableField(value = "MEANBACKCOUNT") + private Double meanbackcount; + + @TableField(value = "RECOILBETACHAN") + private Double recoilbetachan; + + @TableField(value = "PEAKCOMMENTS") + private String peakcomments; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiChannels.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiChannels.java new file mode 100644 index 00000000..5ba33b1d --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiChannels.java @@ -0,0 +1,54 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储β-γ符合谱中感兴趣区道址边界数据。 + */ +@Data +@TableName("GARDS_ROI_CHANNELS") +public class GardsRoiChannels implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 感兴趣区ID号 + */ + @TableField(value = "ROI") + private Integer roi; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * 感兴趣区的β能量起始值 + */ + @TableField(value = "B_CHAN_START") + private Integer bChanStart; + /** + * 感兴趣区的β能量结束值 + */ + @TableField(value = "B_CHAN_STOP") + private Integer bChanStop; + /** + * 感兴趣区的γ能量起始值 + */ + @TableField(value = "G_CHAN_START") + private Integer gChanStart; + /** + * 感兴趣区的γ能量结束值 + */ + @TableField(value = "G_CHAN_STOP") + private Integer gChanStop; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiLimits.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiLimits.java new file mode 100644 index 00000000..7a06b359 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiLimits.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储β-γ符合谱中#ROI_LMITS 数据块中的感兴趣区能量边界数据。 + */ +@Data +@TableName("GARDS_ROI_LIMITS") +public class GardsRoiLimits implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 感兴趣区ID号 + */ + @TableField(value = "ROI") + private Integer roi; + /** + * 感兴趣区的β能量起始值 + */ + @TableField(value = "B_ENERGY_START") + private Double bEnergyStart; + /** + * 感兴趣区的β能量结束值 + */ + @TableField(value = "B_ENERGY_STOP") + private Double bEnergyStop; + /** + * 感兴趣区的γ能量起始值 + */ + @TableField(value = "G_ENERGY_START") + private Double gEnergyStart; + /** + * 感兴趣区的γ能量结束值 + */ + @TableField(value = "G_ENERGY_STOP") + private Double gEnergyStop; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiResults.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiResults.java new file mode 100644 index 00000000..94694a3f --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsRoiResults.java @@ -0,0 +1,94 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储β-γ符合谱中分析过程中的有关感兴趣区(ROI)计算的中间结果。 + */ +@Data +@TableName("GARDS_ROI_RESULTS") +public class GardsRoiResults implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 感兴趣区ID号 + */ + @TableField(value = "ROI") + private Integer roi; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * 样品谱感兴趣区总计数 + */ + @TableField(value = "S_GROSS") + private Double sGross; + /** + * 气体本底谱感兴趣区总计数 + */ + @TableField(value = "G_GROSS") + private Double gGross; + /** + * 探测器本底谱感兴趣区总计数 + */ + @TableField(value = "B_GROSS") + private Double bGross; + /** + * 样品谱感兴趣区净计数 + */ + @TableField(value = "S_NET") + private Double sNet; + /** + * 气体本底谱感兴趣区净计数 + */ + @TableField(value = "G_NET") + private Double gNet; + /** + * 感兴趣区净计数 + */ + @TableField(value = "NET") + private Double net; + /** + * 感兴趣区净计数不确定度 + */ + @TableField(value = "NET_ERR") + private Double netErr; + /** + * 感兴趣区活度浓度 + */ + @TableField(value = "CONC") + private Double conc; + /** + * 感兴趣区活度浓度不确定度 + */ + @TableField(value = "CONC_ERR") + private Double concErr; + /** + * 感兴趣区LC + */ + @TableField(value = "LC") + private Double lc; + /** + * 感兴趣区MDC + */ + @TableField(value = "MDC") + private Double mdc; + /** + * 感兴趣区识别标示;1:识别到,0,未识别到 + */ + @TableField(value = "NID_FLAG") + private Integer nidFlag; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleAux.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleAux.java new file mode 100644 index 00000000..cae4b07d --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleAux.java @@ -0,0 +1,99 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; +import java.util.Date; + +/** + * 存储所有原始数据的基本数据 + */ +@Data +@TableName("GARDS_SAMPLE_DATA") +public class GardsSampleAux implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + + /** + * 样品参考ID + */ + @TableField(value = "SAMPLE_REF_ID") + private String sampleRefId; + + /** + * 样品测量ID + */ + @TableField(value = "MEASUREMENT_ID") + private String measurementId; + + /** + * 探测器本底测量ID + */ + @TableField(value = "BKGD_MEASUREMENT_ID") + private String bkgdMeasurementId; + + /** + * 气体本底测量ID + */ + @TableField(value = "GAS_BKGD_MEASUREMENT_ID") + private String gasBkgdMeasurementId; + + /** + * 样品的几何尺寸,#Sample数据块 dimension2 + */ + @TableField(value = "SAMPLE_HEIGHT") + private Double sampleHeight; + + /** + * 样品的几何尺寸,#Sample数据块 dimension1 + */ + @TableField(value = "SAMPLE_DIAMETER") + private Double sampleDiameter; + + /** + * #calibration数据块 + */ + @TableField(value = "CALIBRATION_DTG") + private Date calibrationDtg; + + /** + * 报文ID号 + */ + @TableField(value = "MSG_ID") + private String msgId; + + /** + * 归档瓶ID号 + */ + @TableField(value = "ARCHIVE_BOTTLE_ID") + private String archiveBottleId; + + /** + * 氙体积 + */ + @TableField(value = "XE_VOLUME") + private Double xeVolume; + + /** + * 氙体积不确定度 + */ + @TableField(value = "XE_VOLUME_UNCER") + private Double xeVolumeUncer; + + /** + * 氙收集效率 + */ + @TableField(value = "XE_COLLECTION_YIED") + private Double xeCollectionYied; + + /** + * 氙收集效率不确定度 + */ + @TableField(value = "XE_COLLECTION_YIED_UNCER") + private Double xeCollectionYiedUncer; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleCert.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleCert.java new file mode 100644 index 00000000..8cf5d16f --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleCert.java @@ -0,0 +1,34 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 存储QCPHD 和 CALIBPHD谱中#CERTIFICATE数据块中的内容。 + */ +@Data +@TableName("GARDS_SAMPLE_CERT") +public class GardsSampleCert implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + + /** + * 刻度源活度(Bq)total_source_activity + */ + @TableField(value = "QUANTITY") + private Double quantity; + + /** + * 鉴定日期 + */ + @TableField(value = "ASSAY_DATE") + private Date assayDate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleCertLine.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleCertLine.java new file mode 100644 index 00000000..587a75fd --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleCertLine.java @@ -0,0 +1,69 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储QCPHD 和 CALIBPHD谱中#CERTIFICATE数据块中的内容。 + */ +@Data +@TableName("GARDS_SAMPLE_CERT_LINE") +public class GardsSampleCertLine implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 核素名称 + */ + @TableField(value = "NUCL_NAME") + private String nuclName; + /** + * 半衰期(秒S、小时H、天D、年Y) + */ + @TableField(value = "HALFLIFE") + private String halflife; + /** + * γ能量(keV) + */ + @TableField(value = "ENERGY") + private Double energy; + /** + * 核素活度(Bq) + */ + @TableField(value = "ACTIVITY") + private Double activity; + /** + * 核素活度不确定度(%) + */ + @TableField(value = "ERROR") + private Double error; + /** + * γ射线强度(%) + */ + @TableField(value = "ABUNDANCE") + private Double abundance; + /** + * β射线强度(%) + */ + @TableField(value = "B_ABUNDANCE") + private Double bAbundance; + /** + * β能量 + */ + @TableField(value = "B_ENERGY") + private Double b_energy; + /** + * 衰变模式 + */ + @TableField(value = "DECAY_MODE") + private String decayMode; + + @TableField(value = "HALFLIFT_UNIT") + private String halfliftUnit; + +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleDescription.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleDescription.java new file mode 100644 index 00000000..d1c8ad02 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleDescription.java @@ -0,0 +1,26 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储台站注释 + */ +@Data +@TableName("GARDS_SAMPLE_DESCRIPTION") +public class GardsSampleDescription implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + + /** + * 台站注释 + */ + @TableField(value = "DESCRIPTION") + private String description; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleRatios.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleRatios.java new file mode 100644 index 00000000..df7c0c66 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSampleRatios.java @@ -0,0 +1,40 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储β-γ符合谱中# Ratios 数据块中的感兴趣区相应核素的计数比率。 + */ +@Data +@TableName("GARDS_SAMPLE_RATIOS") +public class GardsSampleRatios implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 比率ID号 + */ + @TableField(value = "RATIO_ID") + private String ratioId; + + @TableField(value = "UPPER_ROI_NUMBER") + private Integer upperRoiNumber; + + @TableField(value = "LOWER_ROI_NUMBER") + private Integer lowerRoiNumber; + + @TableField(value = "COUNT_RATIO") + private Double countRatio; + + @TableField(value = "COUNT_RATIO_ERR") + private Double countRatioErr; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSpectrum.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSpectrum.java new file mode 100644 index 00000000..bac67ef0 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsSpectrum.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +/** + * 存储所有能谱中#G_Spectrum和#B_Spectrum数据块中的数据。 + */ +@Data +@TableName("GARDS_SPECTRUM") +public class GardsSpectrum implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * G:#G_Spectrum中数据;B:#B_Spectrum中数据 + */ + @TableField(value = "SAMPLE_TYPE") + private String sampleType; + /** + * 报文的文件路径,同gards_sample数据表中input_file_name中的记录 + */ + @TableField(value = "FILENAME") + private String filename; + /** + * γ探测器总道数 + */ + @TableField(value = "CHANNELS") + private Integer channels; + /** + * 能量最大值(keV) + */ + @TableField(value = "ENERGY_SPAN") + private Integer energySpan; + /** + * 起始道址 + */ + @TableField(value = "START_CHANNEL") + private Integer startChannel; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsTotalEfficiencyPairs.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsTotalEfficiencyPairs.java new file mode 100644 index 00000000..f5edc6a8 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsTotalEfficiencyPairs.java @@ -0,0 +1,40 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储所有谱中#TotalEff 数据块中的探测器总效率刻度点,此数据块是可选项。 + * IDC没有 + */ +@Data +@TableName("GARDS_TOTAL_EFFICIENCY_PAIRS") +public class GardsTotalEfficiencyPairs implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * γ能量值(keV) + */ + @TableField(value = "EFFIC_ENERGY") + private String efficEnergy; + /** + * 效率值 + */ + @TableField(value = "TOTAL_EFFICIENCY") + private Double totalEfficiency; + /** + * 不确定度 + */ + @TableField(value = "TOTAL_EFFIC_ERROR") + private Double totalEfficError; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsXeResults.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsXeResults.java new file mode 100644 index 00000000..f86d62ff --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/GardsXeResults.java @@ -0,0 +1,59 @@ +package org.jeecg.modules.base.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 存储β-γ符合谱最终分析结果。 + */ +@Data +@TableName("GARDS_XE_RESULTS") +public class GardsXeResults implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + /** + * 核素名称 + */ + @TableField(value = "NUCLIDE_NAME") + private String nuclideName; + /** + * 感兴趣区活度浓度 + */ + @TableField(value = "CONC") + private Double conc; + /** + * 感兴趣区活度浓度不确定度 + */ + @TableField(value = "CONC_ERR") + private Double concErr; + /** + * 感兴趣区MDC + */ + @TableField(value = "MDC") + private Double mdc; + /** + * 感兴趣区LC + */ + @TableField(value = "LC") + private Double lc; + /** + * 感兴趣区识别标示;1:识别到,0,未识别到 + */ + @TableField(value = "NID_FLAG") + private Integer nidFlag; + + @TableField(value = "MODDATE") + private Long moddate; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java index 72a9e2fe..3142f4b0 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java @@ -58,12 +58,6 @@ public class SysEmail implements Serializable { @TableField(value = "enabled") private Integer enabled; - /** - * 定时获取邮件时间周期(秒) - */ - @TableField(value = "receive_mail_fixed_cycle") - private Integer receiveMailFixedCycle; - /** * 创建日期 */ diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/struct/EnergySpectrumStruct.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/struct/EnergySpectrumStruct.java deleted file mode 100644 index dfa92128..00000000 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/struct/EnergySpectrumStruct.java +++ /dev/null @@ -1,363 +0,0 @@ -package org.jeecg.modules.base.struct; - -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 能谱结构体字段信息 - */ -@Data -public class EnergySpectrumStruct implements Serializable { - - /************************* Infomations ******************/ - /** - * 消息类型 - */ - private String msg_type; - /** - * 消息id - */ - private String msg_id; - /** - * 数据类型 - */ - private String data_type; - - /************************* Header Black ******************/ - /** - * designator - */ - private String designator; - /** - * site code - */ - private String site_code; - /** - * detector code - */ - private String detector_code; - /** - * system type: P for particulate; B for gas with 3-D β - γ coincidence detection; and - */ - private String system_type; - /** - * sample geometry - */ - private String sample_geometry; - /** - * spectrum qualifier: preliminary ( PREL )or full ( FULL) - */ - private String spectrum_quantity; - /** - * sample reference identification - */ - private String sample_ref_id; - /** - * measurement identification - */ - private String measurement_id; - /** - * detector background measurement identification - */ - private String detector_bk_measurement_id; - /** - * gas background measurement identification (memory effect) - */ - private String gas_bk_measurement_id; - /** - * transmit date (yyyy / mm / dd) - */ - private String transmit_date; - /** - * transmit time (hh : mm : ss . s) - */ - private String transmit_time; - - /************************* Comment ******************/ - private String comment; - - /************************* Acquisition Block ******************/ - /** - * acquisition start date (yyyy / mm / dd) - */ - private String acquisition_start_date; - /** - * acquisition start time (hh : mm : ss . s) - */ - private String acquisition_start_time; - /** - * acquisition real time (s) - */ - private Double acquisition_real_time; - /** - * acquisition live time (s) - */ - private Double acquisition_live_time; - - /************************* Collection Block ******************/ - - /** - * collection start date (yyyy / mm / dd) - */ - private String collection_start_date; - /** - * collection start time (hh : mm : ss . s) - */ - private String collection_start_time; - /** - * collection stop date (yyyy / mm / dd) - */ - private String collection_stop_date; - /** - * collection stop time (hh : mm : ss . s) - */ - private String collection_stop_time; - /** - * total air volume sampled (standard cubic meters [scm]) - */ - private Double air_volume; - - /************************* Processing Block ******************/ - /** - * sample volume of Xe (cm 3 ) - */ - private Double sample_volume_of_Xe; - /** - * uncertainty (cm 3 ) - */ - private Double uncertainty_1; - /** - * Xe collection yield (Xe gas in sample/total Xe gas sampled) - */ - private Double Xe_collection_yield; - /** - * uncertainty (Xe gas in sample/total Xe gas sampled) - */ - private Double uncertainty_2; - /** - * archive bottle identification - */ - private String archive_bottle_id; - - /************************* Calibration Block ******************/ - /** - * date of last calibration (yyyy / mm / dd) - */ - private String date_calibration; - /** - * time of last calibration (hh : mm : ss) - */ - private String time_calibration; - - /************************* g_Energy Block ******************/ - /** - * γ -energy (keV) - */ - private List g_energy; - /** - * centroid channel - */ - private List g_centroid_channel; - /** - * uncertainty (channels) - */ - private List g_uncertainty; - - private Integer g_record_count; - - /************************* b_Energy Block ******************/ - /** - * electron energy (keV) - */ - private List b_electron_energy; - /** - * decay mode descriptor: B for β-particle, C for conversion electron (CE) - */ - private List b_decay_mode; - /** - * maximum channel of β-particle distribution or centroid channel of CE (channels) - */ - private List b_channel; - /** - * uncertainty (channels) - */ - private List b_uncertainty; - - private Integer b_record_count; - - /************************* g_Resolution Block ******************/ - /** - * γ -energy (keV) - */ - private List g_r_energy; - /** - * FWHM (keV) - */ - private List g_r_FWHM; - /** - * uncertainty (keV) - */ - private List g_r_uncertainty; - - private Integer g_r_record_count; - - /************************* b_Resolution Block ******************/ - /** - * electron energy (keV) - */ - private List b_r_electron_energy; - /** - * FWHM (keV) - */ - private List b_r_FWHM; - /** - * uncertainty (keV) - */ - private List b_r_uncertainty; - - private Integer b_r_record_count; - - /************************* g_Efficiency Block ******************/ - /** - * γ -energy (keV) - */ - private List g_e_energy; - /** - * efficiency (counts in peak/photon emitted) - */ - private List g_e_efficiency; - /** - * uncertainty (counts in peak/photon emitted) - */ - private List g_e_uncertainty; - - private Integer g_e_record_count; - - /************************* ROI_Limits Block ******************/ - /** - * ROI number - */ - private List ROI_number; - /** - * 2-D ROI β-range start, x 1 (keV) - */ - private List POI_B_x1; - /** - * 2-D ROI β-range stop, x 2 (keV) - */ - private List POI_B_x2; - /** - * 2-D ROI γ-range start, y 1 (keV) - */ - private List POI_G_y1; - /** - * 2-D ROI γ-range stop, y 2 (keV) - */ - private List POI_G_y2; - - private Integer roi_record_count; - - /************************* b-gEfficiency Block ******************/ - /** - * nuclide name - */ - private List bg_nuclide_name; - /** - * ROI number - */ - private List bg_ROI_number; - /** - * β-γ coincidence efficiency (counts in ROI/β-γ pair emitted) - */ - private List bg_efficiency; - /** - * uncertainty (counts in ROI/β-γ pair emitted) - */ - private List bg_uncertainty; - - private Integer bg_record_count; - - /************************* Ratios Block ******************/ - /** - * ratio identifier - */ - private List ratio_id; - /** - * ROI number for the higher γ -energy ROI - */ - private List ROI_num_highter_G_energy_ROI; - /** - * ROI number for the lower γ -energy ROI - */ - private List ROI_num_lower_G_energy_ROI; - /** - * Q_DECLARE_METATYPE(RMSSOHData::HeaderBlock)count ratio(counts in higher γ -energy ROI/counts in lower γ -energy ROI) - */ - private List count_ratio; - /** - * count ratio uncertainty (percent) - */ - private List count_ratio_uncertainty; - - private Integer ratio_record_count; - - /************************* g_Spectrum Block ******************/ - /** - * number of γ channels - */ - private Long num_g_channel; - /** - * γ-energy span (keV) - */ - private Long g_energy_span; - /** - * begin of channels - */ - private Long g_begin_channel; - /** - * count at channel - */ - private List g_counts; - - /************************* b_Spectrum Block ******************/ - /** - * number of β -channels - */ - private Long num_b_channel; - /** - * β -energy span (keV) - */ - private Long b_energy_span; - /** - * begin of channels - */ - private Long b_begin_channel; - /** - * counts at channels - */ - private List b_counts; - - /************************* Histogram Block ******************/ - /** - * β-channels - */ - private Long b_channels; - /** - * γ-channels - */ - private Long g_channels; - /** - * β-energy span - */ - private Long b_h_energy_span; - /** - * γ-energy span - */ - private Long g_h_energy_span; - /** - * counts at channels - */ - private List h_counts; -} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java index ff06c53d..18ef29ae 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java @@ -4,6 +4,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.constant.EmailConstant; import org.jeecg.common.email.EmailServiceManager; +import org.jeecg.common.util.FTPUtil; import org.jeecg.common.util.RedisUtil; import org.jeecg.modules.email.EmailParsingActuator; import org.jeecg.modules.emuns.SysMailEnableType; @@ -27,6 +28,7 @@ import java.util.concurrent.TimeUnit; @RequiredArgsConstructor public class AutoProcessManager{ + private final FTPUtil ftpUtil; private final ISysMailService mailService; private final TaskProperties taskProperties; private final RedisUtil redisUtil; @@ -58,6 +60,10 @@ public class AutoProcessManager{ final MailServerMonitor monitorThread = new MailServerMonitor(); monitorThread.setName("mail-server-monitor"); monitorThread.start(); + + //调用dll + System.loadLibrary("ReadPHDFile"); + //邮件执行线程管理 final MailExecManager autoProcessThread = new MailExecManager(); autoProcessThread.setName("mail-exec-thread-manage"); @@ -87,7 +93,7 @@ public class AutoProcessManager{ } if(next.isNewEmailFlag()){ EmailParsingActuator emailParsingActuator = new EmailParsingActuator(); - emailParsingActuator.init(taskProperties,next); + emailParsingActuator.init(taskProperties,next,ftpUtil); emailParsingActuator.setName(next.getUsername()+"-email-monitor"); emailParsingActuator.start(); //把邮件监测执行线程加入管理队列 @@ -135,7 +141,7 @@ public class AutoProcessManager{ } if(!testFlag){ //如果邮件服务通信测试失败则添加删除标记 - email.setDelFlag(true); + email.setDelFlag(true); } } }); diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java index 21880970..4b06c8c1 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java @@ -1,37 +1,32 @@ package org.jeecg.modules.email; +import org.apache.commons.lang3.ArrayUtils; import org.jeecg.common.email.EmailServiceManager; -import org.jeecg.common.email.emuns.MailContentType; +import org.jeecg.common.util.FTPUtil; import org.jeecg.modules.properties.TaskProperties; -import org.jetbrains.annotations.NotNull; +import org.jeecg.modules.spectrum.SpectrumParsingActuator; import org.springframework.scheduling.concurrent.CustomizableThreadFactory; import javax.mail.Message; import javax.mail.MessagingException; -import javax.mail.internet.MimeUtility; -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; +import java.util.concurrent.*; /** * 邮件解析执行器 */ public class EmailParsingActuator extends Thread{ + private FTPUtil ftpUtil; private TaskProperties taskProperties; private EmailProperties emailProperties; private ThreadPoolExecutor poolExecutor; - public void init(TaskProperties taskProperties, - EmailProperties emailProperties){ + public void init(TaskProperties taskProperties,EmailProperties emailProperties,FTPUtil ftpUtil){ this.taskProperties = taskProperties; this.emailProperties = emailProperties; + this.ftpUtil = ftpUtil; //初始化线程池 ThreadFactory threadFactory = new CustomizableThreadFactory("mail-parsing-"); - ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(taskProperties.getReceiveNum(),taskProperties.getReceiveNum()*2,5, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),threadFactory); + poolExecutor = new ThreadPoolExecutor(taskProperties.getReceiveNum(),taskProperties.getReceiveNum()*2,5, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),threadFactory); } @Override @@ -42,66 +37,30 @@ public class EmailParsingActuator extends Thread{ emailServiceManager.init(emailProperties,taskProperties.getReceiveNum(),taskProperties.getTemporaryStoragePath()); try { final Message[] messages = emailServiceManager.receiveMail(); - for(Message message : messages){ - final EmailLogProperties emailLogProperties = this.parseingMail(emailServiceManager,message); - //如果邮件没有附件、获取附件都不是PHD文件、也不是IMS2.0协议的文件,需把邮件删除 - -// emailServiceManager.removeMail(message); + if(ArrayUtils.isNotEmpty(messages)){ + System.out.println(messages.length); + CountDownLatch taskLatch = new CountDownLatch(messages.length); + for(Message message : messages){ + SpectrumParsingActuator spectrumParsingActuator = new SpectrumParsingActuator(); + spectrumParsingActuator.init(message,emailProperties,emailServiceManager,ftpUtil,taskLatch); + poolExecutor.execute(spectrumParsingActuator); + } + taskLatch.await(); } - }catch (MessagingException e) { + }catch (MessagingException | InterruptedException e) { e.printStackTrace(); - }catch (IOException e) { - e.printStackTrace(); - }finally { - //关闭资源 - emailServiceManager.close(); } - break; -// long end = System.currentTimeMillis(); -// long sleepTime = taskProperties.getMailThreadExecCycle() - (end-start); -// //如果sleepTime > 0 需要睡眠到指定时间,否则继续下次获取邮件 -// if(sleepTime > 0){ -// try { -// //如果本次 -// TimeUnit.MILLISECONDS.sleep(sleepTime); -// } catch (InterruptedException e) { -// e.printStackTrace(); -// } -// } + long end = System.currentTimeMillis(); + long sleepTime = taskProperties.getMailThreadExecCycle() - (end-start); + //如果sleepTime > 0 需要睡眠到指定时间,否则继续下次获取邮件 + if(sleepTime > 0){ + try { + //如果本次 + TimeUnit.MILLISECONDS.sleep(sleepTime); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } } } - - /** - * 解析邮件 - * @param message - */ - public EmailLogProperties parseingMail(@NotNull EmailServiceManager emailServiceManager,@NotNull Message message) throws MessagingException, IOException { - //如果是带有附件的邮件 - if(message.getContentType().startsWith(MailContentType.MIXED.getContentType())){ - //封装邮件日志信息 - EmailLogProperties mailLog = new EmailLogProperties(); - mailLog.setEmailId(emailProperties.getId()); - mailLog.setSubject(MimeUtility.decodeText(message.getSubject())); - final StringBuilder content = new StringBuilder(); - emailServiceManager.getMailContent(message,content); - mailLog.setContext(content.toString()); - mailLog.setReceiveTime(message.getSentDate()); - final List filePathList = emailServiceManager.saveAttachment(message); - mailLog.setFilePathList(filePathList); - return mailLog; - }else{ - //如果此邮件不带有附件,则删除 - emailServiceManager.removeMail(message); - } - return null; - } - - //Sauna:β,Spalax:γ - private boolean checkMail(String filePath){ - File file = new File(filePath); - if(file.isFile()){ - - } - return true; - } } diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/emuns/SpectrumType.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/emuns/SpectrumType.java new file mode 100644 index 00000000..2dd23f47 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/emuns/SpectrumType.java @@ -0,0 +1,46 @@ +package org.jeecg.modules.emuns; + +/** + * 邮件类型 + */ +public enum SpectrumType { + + /** + * 气象谱 + */ + MET("MET"), + /** + * 警告谱 + */ + ALERT("ALERT_UPS"), + /** + * 健康状态谱 + */ + SOH("RMSSOH"), + /** + * 样品谱 + */ + SAMPLEPHD("SAMPLEPHD"), + /** + * 探测器本地谱 + */ + DETBKPHD("DETBKPHD"), + /** + * QC谱 + */ + QCPHD("QCPHD"), + /** + * 气体谱 + */ + GASBKPHD("GASBKPHD"); + + private String type; + + SpectrumType(String type) { + this.type = type; + } + + public String getType(){ + return this.type; + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/EnergySpectrumHandler.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/EnergySpectrumHandler.java new file mode 100644 index 00000000..34f30db1 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/EnergySpectrumHandler.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.native_jni; + +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +/** + * 能谱处理本地类 + */ +public class EnergySpectrumHandler { + + /** + * 获取能谱原始数据 + * @param path 能谱文件路径 + * @return 能谱原始数据 + */ + public static native EnergySpectrumStruct getSourceData(String path); +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/TestDll.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/TestDll.java new file mode 100644 index 00000000..add5bb26 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/TestDll.java @@ -0,0 +1,16 @@ +package org.jeecg.modules.native_jni; + +import com.alibaba.fastjson.JSON; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +public class TestDll { + + public static void main(String[] args) throws InterruptedException { + while (true){ + System.loadLibrary("ReadPHDFile"); + final EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData("E:\\工作\\五木\\核素监测数据自动处理与交互分析系统\\rndata\\savefile\\Spectrum\\Xenon\\Sauna\\Samplephd\\2011\\06\\CNX22_001-20110601_2306_S_FULL_40146.PHD"); + System.out.println(sourceData); + Thread.sleep(10000L); + } + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/struct/EnergySpectrumStruct.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/struct/EnergySpectrumStruct.java new file mode 100644 index 00000000..d090ed0d --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/native_jni/struct/EnergySpectrumStruct.java @@ -0,0 +1,402 @@ +package org.jeecg.modules.native_jni.struct; + +import java.util.List; + +/** + * 能谱结构体字段信息 + */ +public class EnergySpectrumStruct { + + /************************* Infomations ******************/ + /** + * 消息类型 + */ + public String msg_type; + /** + * 消息id + */ + public String msg_id; + /** + * 数据类型 + */ + public String data_type; + + /************************* Header Black ******************/ + /** + * designator + */ + public String designator; + /** + * site code + */ + public String site_code; + /** + * detector code + */ + public String detector_code; + /** + * system type: P for particulate; B for gas with 3-D β - γ coincidence detection; and + */ + public String system_type; + /** + * sample geometry + */ + public String sample_geometry; + /** + * spectrum qualifier: preliminary ( PREL )or full ( FULL) + */ + public String spectrum_quantity; + /** + * sample reference identification + */ + public String sample_ref_id; + /** + * measurement identification + */ + public String measurement_id; + /** + * detector background measurement identification + */ + public String detector_bk_measurement_id; + /** + * gas background measurement identification (memory effect) + */ + public String gas_bk_measurement_id; + /** + * transmit date (yyyy / mm / dd) + */ + public String transmit_date; + /** + * transmit time (hh : mm : ss . s) + */ + public String transmit_time; + + /************************* Comment ******************/ + public String comment; + + /************************* Acquisition Block ******************/ + /** + * acquisition start date (yyyy / mm / dd) + */ + public String acquisition_start_date; + /** + * acquisition start time (hh : mm : ss . s) + */ + public String acquisition_start_time; + /** + * acquisition real time (s) + */ + public double acquisition_real_time; + /** + * acquisition live time (s) + */ + public double acquisition_live_time; + + /************************* Collection Block ******************/ + + /** + * collection start date (yyyy / mm / dd) + */ + public String collection_start_date; + /** + * collection start time (hh : mm : ss . s) + */ + public String collection_start_time; + /** + * collection stop date (yyyy / mm / dd) + */ + public String collection_stop_date; + /** + * collection stop time (hh : mm : ss . s) + */ + public String collection_stop_time; + /** + * total air volume sampled (standard cubic meters [scm]) + */ + public double air_volume; + + /************************* Processing Block ******************/ + /** + * sample volume of Xe (cm 3 ) + */ + public double sample_volume_of_Xe; + /** + * uncertainty (cm 3 ) + */ + public double uncertainty_1; + /** + * Xe collection yield (Xe gas in sample/total Xe gas sampled) + */ + public double Xe_collection_yield; + /** + * uncertainty (Xe gas in sample/total Xe gas sampled) + */ + public double uncertainty_2; + /** + * archive bottle identification + */ + public String archive_bottle_id; + + /************************* Calibration Block ******************/ + /** + * date of last calibration (yyyy / mm / dd) + */ + public String date_calibration; + /** + * time of last calibration (hh : mm : ss) + */ + public String time_calibration; + + /************************* g_Energy Block ******************/ + /** + * γ -energy (keV) + */ + public List g_energy; + /** + * centroid channel + */ + public List g_centroid_channel; + /** + * uncertainty (channels) + */ + public List g_uncertainty; + + public int g_record_count; + + /************************* b_Energy Block ******************/ + /** + * electron energy (keV) + */ + public List b_electron_energy; + /** + * decay mode descriptor: B for β-particle, C for conversion electron (CE) + */ + public List b_decay_mode; + /** + * maximum channel of β-particle distribution or centroid channel of CE (channels) + */ + public List b_channel; + /** + * uncertainty (channels) + */ + public List b_uncertainty; + + public int b_record_count; + + /************************* g_Resolution Block ******************/ + /** + * γ -energy (keV) + */ + public List g_r_energy; + /** + * FWHM (keV) + */ + public List g_r_FWHM; + /** + * uncertainty (keV) + */ + public List g_r_uncertainty; + + public int g_r_record_count; + + /************************* b_Resolution Block ******************/ + /** + * electron energy (keV) + */ + public List b_r_electron_energy; + /** + * FWHM (keV) + */ + public List b_r_FWHM; + /** + * uncertainty (keV) + */ + public List b_r_uncertainty; + + public int b_r_record_count; + + /************************* g_Efficiency Block ******************/ + /** + * γ -energy (keV) + */ + public List g_e_energy; + /** + * efficiency (counts in peak/photon emitted) + */ + public List g_e_efficiency; + /** + * uncertainty (counts in peak/photon emitted) + */ + public List g_e_uncertainty; + + public int g_e_record_count; + + /************************* ROI_Limits Block ******************/ + /** + * ROI number + */ + public List ROI_number; + /** + * 2-D ROI β-range start, x 1 (keV) + */ + public List POI_B_x1; + /** + * 2-D ROI β-range stop, x 2 (keV) + */ + public List POI_B_x2; + /** + * 2-D ROI γ-range start, y 1 (keV) + */ + public List POI_G_y1; + /** + * 2-D ROI γ-range stop, y 2 (keV) + */ + public List POI_G_y2; + + public int roi_record_count; + + /************************* b-gEfficiency Block ******************/ + /** + * nuclide name + */ + public List bg_nuclide_name; + /** + * ROI number + */ + public List bg_ROI_number; + /** + * β-γ coincidence efficiency (counts in ROI/β-γ pair emitted) + */ + public List bg_efficiency; + /** + * uncertainty (counts in ROI/β-γ pair emitted) + */ + public List bg_uncertainty; + + public int bg_record_count; + + /************************* Ratios Block ******************/ + /** + * ratio identifier + */ + public List ratio_id; + /** + * ROI number for the higher γ -energy ROI + */ + public List ROI_num_highter_G_energy_ROI; + /** + * ROI number for the lower γ -energy ROI + */ + public List ROI_num_lower_G_energy_ROI; + /** + * Q_DECLARE_METATYPE(RMSSOHData::HeaderBlock)count ratio(counts in higher γ -energy ROI/counts in lower γ -energy ROI) + */ + public List count_ratio; + /** + * count ratio uncertainty (percent) + */ + public List count_ratio_uncertainty; + + public int ratio_record_count; + + /************************* g_Spectrum Block ******************/ + /** + * number of γ channels + */ + public long num_g_channel; + /** + * γ-energy span (keV) + */ + public long g_energy_span; + /** + * begin of channels + */ + public long g_begin_channel; + /** + * count at channel + */ + public List g_counts; + + /************************* b_Spectrum Block ******************/ + /** + * number of β -channels + */ + public long num_b_channel; + /** + * β -energy span (keV) + */ + public long b_energy_span; + /** + * begin of channels + */ + public long b_begin_channel; + /** + * counts at channels + */ + public List b_counts; + + /************************* Histogram Block ******************/ + /** + * β-channels + */ + public long b_channels; + /** + * γ-channels + */ + public long g_channels; + /** + * β-energy span + */ + public long b_h_energy_span; + /** + * γ-energy span + */ + public long g_h_energy_span; + /** + * counts at channels + */ + public List h_counts; + + public EnergySpectrumStruct() { + super(); + } + + @Override + public String toString() { + return "EnergySpectrumStruct [msg_type=" + msg_type + ", msg_id=" + msg_id + ", data_type=" + data_type + + ", designator=" + designator + ", site_code=" + site_code + ", detector_code=" + detector_code + + ", system_type=" + system_type + ", sample_geometry=" + sample_geometry + ", spectrum_quantity=" + + spectrum_quantity + ", sample_ref_id=" + sample_ref_id + ", measurement_id=" + measurement_id + + ", detector_bk_measurement_id=" + detector_bk_measurement_id + ", gas_bk_measurement_id=" + + gas_bk_measurement_id + ", transmit_date=" + transmit_date + ", transmit_time=" + transmit_time + + ", comment=" + comment + ", acquisition_start_date=" + acquisition_start_date + + ", acquisition_start_time=" + acquisition_start_time + ", acquisition_real_time=" + + acquisition_real_time + ", acquisition_live_time=" + acquisition_live_time + + ", collection_start_date=" + collection_start_date + ", collection_start_time=" + + collection_start_time + ", collection_stop_date=" + collection_stop_date + ", collection_stop_time=" + + collection_stop_time + ", air_volume=" + air_volume + ", sample_volume_of_Xe=" + sample_volume_of_Xe + + ", uncertainty_1=" + uncertainty_1 + ", Xe_collection_yield=" + Xe_collection_yield + + ", uncertainty_2=" + uncertainty_2 + ", archive_bottle_id=" + archive_bottle_id + + ", date_calibration=" + date_calibration + ", time_calibration=" + time_calibration + ", g_energy=" + + g_energy + ", g_centroid_channel=" + g_centroid_channel + ", g_uncertainty=" + g_uncertainty + + ", g_record_count=" + g_record_count + ", b_electron_energy=" + b_electron_energy + ", b_decay_mode=" + + b_decay_mode + ", b_channel=" + b_channel + ", b_uncertainty=" + b_uncertainty + ", b_record_count=" + + b_record_count + ", g_r_energy=" + g_r_energy + ", g_r_FWHM=" + g_r_FWHM + ", g_r_uncertainty=" + + g_r_uncertainty + ", g_r_record_count=" + g_r_record_count + ", b_r_electron_energy=" + + b_r_electron_energy + ", b_r_FWHM=" + b_r_FWHM + ", b_r_uncertainty=" + b_r_uncertainty + + ", b_r_record_count=" + b_r_record_count + ", g_e_energy=" + g_e_energy + ", g_e_efficiency=" + + g_e_efficiency + ", g_e_uncertainty=" + g_e_uncertainty + ", g_e_record_count=" + g_e_record_count + + ", ROI_number=" + ROI_number + ", POI_B_x1=" + POI_B_x1 + ", POI_B_x2=" + POI_B_x2 + ", POI_G_y1=" + + POI_G_y1 + ", POI_G_y2=" + POI_G_y2 + ", roi_record_count=" + roi_record_count + ", bg_nuclide_name=" + + bg_nuclide_name + ", bg_ROI_number=" + bg_ROI_number + ", bg_efficiency=" + bg_efficiency + + ", bg_uncertainty=" + bg_uncertainty + ", bg_record_count=" + bg_record_count + ", ratio_id=" + + ratio_id + ", ROI_num_highter_G_energy_ROI=" + ROI_num_highter_G_energy_ROI + + ", ROI_num_lower_G_energy_ROI=" + ROI_num_lower_G_energy_ROI + ", count_ratio=" + count_ratio + + ", count_ratio_uncertainty=" + count_ratio_uncertainty + ", ratio_record_count=" + ratio_record_count + + ", num_g_channel=" + num_g_channel + ", g_energy_span=" + g_energy_span + ", g_begin_channel=" + + g_begin_channel + ", g_counts=" + g_counts + ", num_b_channel=" + num_b_channel + ", b_energy_span=" + + b_energy_span + ", b_begin_channel=" + b_begin_channel + ", b_counts=" + b_counts + ", b_channels=" + + b_channels + ", g_channels=" + g_channels + ", b_h_energy_span=" + b_h_energy_span + + ", g_h_energy_span=" + g_h_energy_span + ", h_counts=1]"; + } +} \ No newline at end of file diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/AlertSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/AlertSpectrum.java new file mode 100644 index 00000000..33961f45 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/AlertSpectrum.java @@ -0,0 +1,68 @@ +package org.jeecg.modules.spectrum; + + +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * 警告谱处理 + */ +public class AlertSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + SpectrumHandler spectrumHandler = new HealthStatusSpectrum(); + spectrumHandler.init(super.filePath,super.ftpUtil,super.sourceData); + spectrumHandler.setPrevious(this); + super.setNext(spectrumHandler); + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + if(Objects.nonNull(super.sourceData) && SpectrumType.ALERT.getType().equals(super.sourceData.data_type)){ + System.out.println("----------------------------------"); + System.out.println(SpectrumType.ALERT.getType()); + System.out.println("----------------------------------"); + }else{ + super.next.handler(); + } + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Chain.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Chain.java new file mode 100644 index 00000000..628227ee --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Chain.java @@ -0,0 +1,41 @@ +package org.jeecg.modules.spectrum; + +import lombok.Getter; +import lombok.Setter; + +/** + * 能谱执行链路 + */ +public abstract class Chain { + + /** + * 上一任处理链 + */ + @Setter + protected SpectrumHandler previous; + + /** + * 下一任处理链 + */ + @Setter + protected SpectrumHandler next; + + /** + * 是否匹配成功 + */ + @Getter + protected boolean matchFlag = false; + + /** + * 设置过滤链路 + */ + protected abstract void setChina(); + + /** + * 设置匹配标记 + * @param matchFlag + */ + public void setMatchFlag(boolean matchFlag){ + this.previous.setMatchFlag(matchFlag); + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/DetbkphdSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/DetbkphdSpectrum.java new file mode 100644 index 00000000..24706a49 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/DetbkphdSpectrum.java @@ -0,0 +1,68 @@ +package org.jeecg.modules.spectrum; + + +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * 探测器本地谱处理 + */ +public class DetbkphdSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + SpectrumHandler spectrumHandler = new QcphdSpectrum(); + spectrumHandler.init(super.filePath,super.ftpUtil,super.sourceData); + spectrumHandler.setPrevious(this); + super.setNext(spectrumHandler); + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + if(Objects.nonNull(super.sourceData) && SpectrumType.DETBKPHD.getType().equals(super.sourceData.data_type)){ + System.out.println("----------------------------------"); + System.out.println(SpectrumType.DETBKPHD.getType()); + System.out.println("----------------------------------"); + }else{ + super.next.handler(); + } + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + + } + + /** + * 处理分析结果 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/GasbkphdSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/GasbkphdSpectrum.java new file mode 100644 index 00000000..bfe299e6 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/GasbkphdSpectrum.java @@ -0,0 +1,64 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * 气体谱处理 + */ +public class GasbkphdSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + if(Objects.nonNull(super.sourceData) && SpectrumType.GASBKPHD.getType().equals(super.sourceData.data_type)){ + System.out.println("----------------------------------"); + System.out.println(SpectrumType.GASBKPHD.getType()); + System.out.println("----------------------------------"); + }else{ + super.next.handler(); + } + } + + /** + * 处理分析结果 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/HealthStatusSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/HealthStatusSpectrum.java new file mode 100644 index 00000000..4171c947 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/HealthStatusSpectrum.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * 健康状态谱处理 + */ +public class HealthStatusSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + SpectrumHandler spectrumHandler = new SamplephdSpectrum(); + spectrumHandler.init(super.filePath,super.ftpUtil,super.sourceData); + spectrumHandler.setPrevious(this); + super.setNext(spectrumHandler); + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + if(Objects.nonNull(super.sourceData) && SpectrumType.SOH.getType().equals(super.sourceData.data_type)){ + System.out.println("----------------------------------"); + System.out.println(SpectrumType.SOH.getType()); + System.out.println("----------------------------------"); + }else{ + super.next.handler(); + } + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + + } + + /** + * 处理分析结果 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java new file mode 100644 index 00000000..97acf9c7 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * 气象谱处理 + */ +public class MetSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + SpectrumHandler spectrumHandler = new AlertSpectrum(); + spectrumHandler.init(super.filePath,super.ftpUtil,super.sourceData); + spectrumHandler.setPrevious(this); + super.setNext(spectrumHandler); + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + if(Objects.nonNull(super.sourceData) && SpectrumType.MET.getType().equals(super.sourceData.data_type)){ + System.out.println("----------------------------------"); + System.out.println(SpectrumType.MET.getType()); + System.out.println("----------------------------------"); + }else{ + super.next.handler(); + } + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + + } + + /** + * 处理分析结果 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/QcphdSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/QcphdSpectrum.java new file mode 100644 index 00000000..baa21a20 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/QcphdSpectrum.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * QC谱处理 + */ +public class QcphdSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + SpectrumHandler spectrumHandler = new GasbkphdSpectrum(); + spectrumHandler.init(super.filePath,super.ftpUtil,super.sourceData); + spectrumHandler.setPrevious(this); + super.setNext(spectrumHandler); + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + if(Objects.nonNull(super.sourceData) && SpectrumType.QCPHD.getType().equals(super.sourceData.data_type)){ + System.out.println("----------------------------------"); + System.out.println(SpectrumType.QCPHD.getType()); + System.out.println("----------------------------------"); + }else{ + super.next.handler(); + } + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + + } + + /** + * 处理分析结果 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java new file mode 100644 index 00000000..8a94ee12 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.spectrum; + +import org.bouncycastle.tsp.TSPUtil; +import org.jeecg.modules.emuns.SpectrumType; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.util.Objects; + +/** + * 样品谱处理 + */ +public class SamplephdSpectrum extends SpectrumHandler{ + + /** + * 设置过滤链路 + */ + @Override + protected void setChina() { + SpectrumHandler spectrumHandler = new DetbkphdSpectrum(); + spectrumHandler.init(super.filePath,super.ftpUtil,super.sourceData); + spectrumHandler.setPrevious(this); + super.setNext(spectrumHandler); + } + + /** + * 检查规则并处理数据 + */ + @Override + protected void handler() { + if(Objects.nonNull(super.sourceData) && SpectrumType.SAMPLEPHD.getType().equals(super.sourceData.data_type)){ + System.out.println("1111111111111111111111111111111111111111111111111"); + System.out.println(super.sourceData); + }else{ + super.next.handler(); + } + } + + /** + * 处理原始数据 + * + * @param struct + */ + @Override + protected void handlerOriginalData(EnergySpectrumStruct struct) { + + } + + /** + * 处理分析结果 + * + * @param struct + */ + @Override + protected void handlerAnalysisResult(EnergySpectrumStruct struct) { + + } + + /** + * 转存本地邮件到FTP服务 + * + * @return + */ + @Override + protected void transferToFTP() { + + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumHandler.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumHandler.java new file mode 100644 index 00000000..4c9cace0 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumHandler.java @@ -0,0 +1,66 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.common.util.FTPUtil; +import org.jeecg.modules.native_jni.EnergySpectrumHandler; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import java.io.File; +import java.io.InputStream; + +/** + * 能谱处理模版 + */ +public abstract class SpectrumHandler extends Chain{ + + protected FTPUtil ftpUtil; + + /** + * 当前解析的能谱文件路径 + */ + protected String filePath; + + protected EnergySpectrumStruct sourceData =null; + + /** + * 初始化参数 + */ + protected void init(String filePath,FTPUtil ftpUtil,EnergySpectrumStruct sourceData){ + this.filePath = filePath; + this.ftpUtil = ftpUtil; + this.sourceData = sourceData; + this.setChina(); + } + + /** + * 检查规则并处理数据 + */ + protected abstract void handler(); + + /** + * 处理原始数据 + * @param struct + */ + protected abstract void handlerOriginalData(EnergySpectrumStruct struct); + + /** + * 处理分析结果 + * @param struct + */ + protected abstract void handlerAnalysisResult(EnergySpectrumStruct struct); + + /** + * 转存本地邮件到FTP服务 + * @return + */ + protected abstract void transferToFTP(); + + /** + * 删除本地邮件 + */ + protected void removeLocalFile(){ + File file = new File(this.filePath); + if(file.exists() && file.isFile()){ + file.delete(); + } + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java new file mode 100644 index 00000000..2857d19d --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java @@ -0,0 +1,91 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.common.email.EmailServiceManager; +import org.jeecg.common.email.emuns.MailContentType; +import org.jeecg.common.util.FTPUtil; +import org.jeecg.modules.email.EmailLogProperties; +import org.jeecg.modules.email.EmailProperties; +import org.jeecg.modules.native_jni.EnergySpectrumHandler; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.internet.MimeUtility; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.List; +import java.util.concurrent.CountDownLatch; + +/** + * 能谱解析 + */ +public class SpectrumParsingActuator implements Runnable{ + + /** + * 邮件对象 + */ + private Message message; + /** + * 邮件属性 + */ + private EmailProperties emailProperties; + /** + * 邮件对象 + */ + private EmailServiceManager emailServiceManager; + /** + * FTP工具 + */ + private FTPUtil ftpUtil; + + CountDownLatch taskLatch; + + public void init(Message message,EmailProperties emailProperties, + EmailServiceManager emailServiceManager,FTPUtil ftpUtil, + CountDownLatch taskLatch){ + this.message = message; + this.emailProperties = emailProperties; + this.emailServiceManager = emailServiceManager; + this.ftpUtil = ftpUtil; + this.taskLatch = taskLatch; + } + + @Override + public void run() { + //如果是带有附件的邮件 + try { + if(message.getContentType().startsWith(MailContentType.MIXED.getContentType())){ + //封装邮件日志信息 + EmailLogProperties mailLog = new EmailLogProperties(); + mailLog.setEmailId(emailProperties.getId()); + mailLog.setSubject(MimeUtility.decodeText(message.getSubject())); + final StringBuilder content = new StringBuilder(); + emailServiceManager.getMailContent(message,content); + mailLog.setContext(content.toString()); + mailLog.setReceiveTime(message.getSentDate()); + final List filePathList = emailServiceManager.saveAttachment(message); + //通过策略模式根据条件适配那个谱所属类执行处理原始信息和分析结果 + for (String filePath : filePathList){ + final EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(filePath); + //如果返回的结构体数据是错误的说明文件不是正常能谱文件则跳出 + if(false){ + + }else{ + SpectrumHandler spectrumHandler = new MetSpectrum(); + spectrumHandler.init(filePath,ftpUtil,sourceData); + spectrumHandler.handler(); + } + } + }else{ + //如果此邮件不带有附件,则删除 + emailServiceManager.removeMail(message); + } + } catch (MessagingException | IOException e) { + e.printStackTrace(); + }finally { + this.taskLatch.countDown(); + //关闭资源 + emailServiceManager.close(); + } + } +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpecturmDataStorage.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpecturmDataStorage.java new file mode 100644 index 00000000..6c8c9845 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpecturmDataStorage.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.spectrum; + +import org.jeecg.modules.base.entity.GardsSampleData; +import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct; + +public class SpecturmDataStorage { + + /** + * 保存 GARDS_SAMPLE_DATA + */ + public static void saveSampleData(EnergySpectrumStruct struct){ + GardsSampleData gardsSampleData = new GardsSampleData(); + } +}