diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsAnalysisRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsAnalysisRoi.java new file mode 100644 index 00000000..8cb64f78 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsAnalysisRoi.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.base.entity.rnauto; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; + +@Data +@TableName("RNAUTO.GARDS_ANALYSIS_ROI") +@Accessors(chain = true) +public class GardsAnalysisRoi { + + @TableId("IDANALYSIS") + private Integer idAnalysis; + + private Integer sampleId; + + private Integer roiId; + + private Integer roiNum; + + private Double minX; + + private Double maxX; + + private Double minY; + + private Double maxY; + + private String phdPath; + + private String baselinePath; + + private String lcPath; + + private String scacPath; + + private String logPath; + + private String reportPath; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsCalibrationPairsRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsCalibrationPairsRoi.java new file mode 100644 index 00000000..f17a8ee8 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsCalibrationPairsRoi.java @@ -0,0 +1,74 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 存储数据分析过程中能量、分辨率和效率刻度实际使用的刻度点数据。 + */ +@Data +@TableName("RNAUTO.GARDS_CALIBRATION_PAIRS_ROI") +public class GardsCalibrationPairsRoi implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + private Integer roiId; + + /** + * 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 Double uncYValue; + + @TableField(value = "MODDATE") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date moddate; + +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsCalibrationRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsCalibrationRoi.java new file mode 100644 index 00000000..b6d59362 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsCalibrationRoi.java @@ -0,0 +1,119 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 存储数据分析过程中能量、分辨率和效率刻度的拟合结果。 + */ +@Data +@TableName("RNAUTO.GARDS_CALIBRATION_ROI") +public class GardsCalibrationRoi implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + @TableField(value = "ROI_ID") + private Integer roiId; + + /** + * 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") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date moddate; + + @TableField(value = "COEFF_STRING") + private String coeffString; + +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsMDCRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsMDCRoi.java new file mode 100644 index 00000000..b347f64d --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsMDCRoi.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +@Data +@TableName("RNAUTO.GARDS_MDC_ROI") +public class GardsMDCRoi implements Serializable { + + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + @TableField(value = "ROI_ID") + private Integer roiId; + + @TableField(value = "NUCLIDENAME") + private String nuclideName; + + @TableField(value = "ENERGY") + private Double energy; + + @TableField(value = "YIELD") + private Double yield; + + @TableField(value = "EFFICIENCY") + private Double efficiency; + + @TableField(value = "MDC") + private String mdc; + + @TableField(value = "MDC_ERR") + private String mdcErr; + + @TableField(value = "MODDATE") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date moddate; + +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsNuclIdedRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsNuclIdedRoi.java new file mode 100644 index 00000000..b5d8165e --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsNuclIdedRoi.java @@ -0,0 +1,122 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 存储gamma谱中识别到的核素计算结果。 + */ +@Data +@TableName("RNAUTO.GARDS_NUCL_IDED_ROI") +public class GardsNuclIdedRoi implements Serializable { + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + @TableField(value = "ROI_ID") + private Integer roiId; + + /** + * 核素名称 + */ + @TableField(value = "NUCLIDENAME") + 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") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date 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/rnauto/GardsNuclLinesIdedRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsNuclLinesIdedRoi.java new file mode 100644 index 00000000..57a70435 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsNuclLinesIdedRoi.java @@ -0,0 +1,126 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 存储gamma谱中识别到的峰计算结果。 + */ +@Data +@TableName("RNAUTO.GARDS_NUCL_LINES_IDED_ROI") +public class GardsNuclLinesIdedRoi implements Serializable { + + /** + * 分析ID号 + */ + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + /** + * 样品id + */ + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + + @TableField(value = "ROI_ID") + private Integer roiId; + + /** + * 峰序号 + */ + @TableField(value = "IDPEAK") + private Integer idPeak; + + /** + * 核素名称 + */ + @TableField(value = "NUCLIDENAME") + private String nuclideName; + + @TableField(value = "MODDATE") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date 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 unEffic; + /** + * 利用该峰计算得到的最小可探测活度 + */ + @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; + + @TableField(value = "NUCLIDEFULLNAME") + private String nuclidefullname; + + @TableField(value = "MDC") + private String mdc; + + @TableField(value = "CONCENTRATION") + private String concentration; + +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsPeaksRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsPeaksRoi.java new file mode 100644 index 00000000..af5ffcd7 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsPeaksRoi.java @@ -0,0 +1,166 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 存储gamma谱的寻峰结果 + */ +@Data +@TableName("RNAUTO.GARDS_PEAKS_ROI") +public class GardsPeaksRoi 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 = "ROI_ID") + private Integer roiId; + + @TableField(value = "MODDATE") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date 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/rnauto/GardsQcCheckRoi.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsQcCheckRoi.java new file mode 100644 index 00000000..61fd5d69 --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/rnauto/GardsQcCheckRoi.java @@ -0,0 +1,42 @@ +package org.jeecg.modules.base.entity.rnauto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +@Data +@TableName(value = "RNAUTO.GARDS_QC_CHECK_ROI") +public class GardsQcCheckRoi implements Serializable { + + @TableField(value = "SAMPLE_ID") + private Integer sampleId; + + @TableField(value = "IDANALYSIS") + private Integer idAnalysis; + + @TableField(value = "ROI_ID") + private Integer roiId; + + @TableField(value = "QC_NAME") + private String qcName; + + @TableField(value = "QC_VALUE") + private Double qcValue; + + @TableField(value = "QC_STANDARD") + private String qcStandard; + + @TableField(value = "QC_RESULT") + private Integer qcResult; + + @TableField(value = "MODDATE") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date moddate; + +} diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_C_Analysis.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_C_Analysis.java index 1bae27d2..44a3ddcd 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_C_Analysis.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_C_Analysis.java @@ -2,14 +2,17 @@ package org.jeecg.modules.spectrum; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.google.common.collect.HashBasedTable; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import com.google.common.collect.Table; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -18,6 +21,7 @@ import org.jeecg.common.constant.enums.SpectrumSystemType; import org.jeecg.common.properties.ParameterProperties; import org.jeecg.common.properties.SpectrumPathProperties; import org.jeecg.common.util.*; +import org.jeecg.modules.ErrorLogManager; import org.jeecg.modules.base.bizVo.AttributeItemVo; import org.jeecg.modules.base.dto.*; import org.jeecg.modules.base.entity.original.GardsSampleData; @@ -26,10 +30,10 @@ import org.jeecg.modules.base.enums.DSType; import org.jeecg.modules.base.enums.MiddleDataType; import org.jeecg.modules.base.enums.SpectrumType; import org.jeecg.modules.config.datasource.DataSourceSwitcher; +import org.jeecg.modules.eneity.event.SpectrumErrorEvent; import org.jeecg.modules.entity.vo.*; import org.jeecg.modules.exception.AnalySpectrumException; import org.jeecg.modules.exception.CAnalyseException; -import org.jeecg.modules.exception.GAnalyseException; import org.jeecg.modules.file.FileOperation; import org.jeecg.modules.native_jni.EnergySpectrumHandler; import org.jeecg.modules.native_jni.struct.BgBoundary; @@ -127,6 +131,8 @@ public class Sample_C_Analysis { private PHDFile phdFile3; private PHDFile phdFile4; + private Table middleDataTable; + public Sample_C_Analysis(AbstractS_D_Q_G_SpectrumHandler spectrumHandler, EnergySpectrumStruct sampleStruct, SpectrumServiceQuotes serviceQuotes, GardsSampleData sampleData) { this.spectrumHandler = spectrumHandler; @@ -189,19 +195,20 @@ public class Sample_C_Analysis { Map nuclideLibs = this.getNuclideLinesG(); //读取参数内容 - readMDCParameter(phdFile1); - readMDCParameter(phdFile2); - readMDCParameter(phdFile3); - readMDCParameter(phdFile4); + Map mdcInfoMap = readMDCParameter(phdFile1, phdFile2, phdFile3, phdFile4); // 执行分析业务代码 boolean analyFlag1 = gammaFileUtil.GetMiddleData(phdFile1, CommonConstant.REPORT_PREFIX_AUTO, nuclideLibs, middleData1, MiddleDataType.Auto.getType(), ""); boolean analyFlag2 = gammaFileUtil.GetMiddleData(phdFile2, CommonConstant.REPORT_PREFIX_AUTO, nuclideLibs, middleData2, MiddleDataType.Auto.getType(), ""); boolean analyFlag3 = gammaFileUtil.GetMiddleData(phdFile3, CommonConstant.REPORT_PREFIX_AUTO, nuclideLibs, middleData3, MiddleDataType.Auto.getType(), ""); boolean analyFlag4 = gammaFileUtil.GetMiddleData(phdFile4, CommonConstant.REPORT_PREFIX_AUTO, nuclideLibs, middleData4, MiddleDataType.Auto.getType(), ""); + // 数据插入数据库 + this.storageDataToDatabase(mdcInfoMap, null, + middleData1, middleData2, middleData3, middleData4); /*if (analyFlag) { // 数据插入数据库 - this.storageDataToDatabase(phdFile, middleData, phdFile.getQcItems()); + this.storageDataToDatabase(mdcInfoMap, null, + middleData1, middleData2, middleData3, middleData4); // 生成日志文件 writeLog(middleData.getAnalyses_LogPath(), middleData); @@ -316,9 +323,11 @@ public class Sample_C_Analysis { /** * 读取计算MDC参数文件方法 */ - public void readMDCParameter(PHDFile phd) { + public Map readMDCParameter(PHDFile... phdFiles) { //存储文件结果用的map Map mdcInfoMap = new TreeMap<>(); + if (ArrayUtil.isEmpty(phdFiles)) return mdcInfoMap; + String systemType = phdFiles[0].getHeader().getSystem_type(); //配置文件路径 String filePath = parameterProperties.getFilePath()+ File.separator + "MDCParameter.xml"; try { @@ -339,7 +348,7 @@ public class Sample_C_Analysis { for (int i=0; i 0) { //遍历子节点信息 @@ -374,16 +383,15 @@ public class Sample_C_Analysis { } } } - if (CollectionUtils.isNotEmpty(mdcInfoMap)) { - phd.setMdcInfoMap(mdcInfoMap); + if (MapUtil.isNotEmpty(mdcInfoMap)) { + for (PHDFile phdFile : phdFiles) { + phdFile.setMdcInfoMap(mdcInfoMap); + } } - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } catch (SAXException e) { + } catch (ParserConfigurationException | IOException | SAXException e) { throw new RuntimeException(e); } + return mdcInfoMap; } /** @@ -413,43 +421,40 @@ public class Sample_C_Analysis { } } - private void storageDataToDatabase(PHDFile phdFile, GStoreMiddleProcessData middleData, Map qcItems){ - //如果数据已经存储,不在重复存储 - final Integer idAnalysis = serviceQuotes.getAnalysesService().getIdAnalysis(this.sampleData.getSampleId()); - if(Objects.nonNull(idAnalysis)){ -// log.warn("{} file analysis data has been stored",new File(this.sampleTempFilePath).getName()); - return; - } + public void storageDataToDatabase(Map mdcInfoMap, Map qcItems, GStoreMiddleProcessData... middleDatas){ + // 如果数据已经存储 不再重复存储 + final Integer idAnalysisAny = serviceQuotes.getAnalysisRoiAutoService().getIdAnalysisAny(this.sampleData.getSampleId()); + if(Objects.nonNull(idAnalysisAny)) return; DataSourceSwitcher.switchToOracle(); final TransactionStatus transactionStatus = serviceQuotes.getTransactionManager().getTransaction(serviceQuotes.getTransactionDefinition()); try { Integer sampleId = this.sampleData.getSampleId(); // 保存分析结果 ==> INSERT INTO RNAUTO.GARDS_ANALYSES - saveAnalysis(middleData, sampleId); - // 获取分析结果ID ==> SELECT IDANALYSIS - Integer IdAnalysis = getIdAnalysis(sampleId); + saveAnalysisROI(sampleId, middleDatas); + // 获取Table IdAnalysis:RoiId:GStoreMiddleProcessData + middleDataTable(sampleId, middleDatas); // 修改保存结果状态 ==> UPDATE ORIGINAL.GARDS_SAMPLE_DATA -// serviceQuotes.getSampleDataService().updateStatus(null,null); - /* GARDS_CALIBRATION_PAIRS 数据表保存 */ - saveCalibrationPairs(middleData, sampleId, IdAnalysis); - /* GARDS_CALIBRATION 数据表保存 */ - saveCalibration(middleData, sampleId, IdAnalysis); - /* Gards_Peaks 数据表保存 */ - savePeaks(middleData, sampleId, IdAnalysis); - /* Gards_Nucl_Lines_Ided 数据表保存 */ - saveNuclLinesIded(middleData, sampleId, IdAnalysis); - /* Gards_Nucl_Ided 数据表保存 */ - saveNuclIded(middleData, sampleId, IdAnalysis); - /* Gards_Qc_Check 数据表保存 */ - saveQcCheck(middleData, sampleId, IdAnalysis, qcItems); - /* GARDS_MDC 数据表保存 */ - saveMDC(sampleId, IdAnalysis, phdFile.getMdcInfoMap()); + // serviceQuotes.getSampleDataService().updateStatus(null,null); + /* GARDS_CALIBRATION_PAIRS_ROI 数据表保存 */ + saveCalibrationPairsROI(sampleId); + /* GARDS_CALIBRATION_ROI 数据表保存 */ + saveCalibrationROI(sampleId); + /* Gards_Peaks_ROI 数据表保存 */ + savePeaksROI(sampleId); + /* Gards_Nucl_Lines_Ided_ROI 数据表保存 */ + saveNuclLinesIdedROI(sampleId); + /* Gards_Nucl_Ided_ROI 数据表保存 */ + saveNuclIdedROI(sampleId); + /* Gards_Qc_Check_ROI 数据表保存 */ + // saveQcCheckROI(sampleId, qcItems); + /* GARDS_MDC_ROI 数据表保存 */ + saveMDCROI(sampleId, mdcInfoMap); //提交事务 serviceQuotes.getTransactionManager().commit(transactionStatus); } catch (Exception e) { - //设置分析数据存储失败标记 -// this.parsingProcessLog.setAnalysisDataStoreFlag(false); - //回滚事务 + // 设置分析数据存储失败标记 + // this.parsingProcessLog.setAnalysisDataStoreFlag(false); + // 回滚事务 serviceQuotes.getTransactionManager().rollback(transactionStatus); throw e; } finally { @@ -732,31 +737,60 @@ public class Sample_C_Analysis { } } - public void saveAnalysis(GStoreMiddleProcessData middleData,Integer sampleId){ - GardsAnalyses analysis = toAnalysis(middleData); - analysis.setSampleId(sampleId); - serviceQuotes.getAnalysesService().save(analysis); + public void saveAnalysisROI(Integer sampleId, GStoreMiddleProcessData... middleDatas){ + List analysisRois = new ArrayList<>(); + for (GStoreMiddleProcessData middleData : middleDatas) { + GardsAnalysisRoi analysisRoi = new GardsAnalysisRoi(); + analysisRoi.setSampleId(sampleId); + analysisRoi.setPhdPath(this.spectrumHandler.spectrumFileRelativePath); + analysisRoi.setBaselinePath(middleData.getAnalyses_baseline_filePath()); + analysisRoi.setLcPath(middleData.getAnalyses_lc_filePath()); + analysisRoi.setScacPath(middleData.getAnalyses_scac_filePath()); + analysisRoi.setLogPath(middleData.getAnalyses_LogPath()); + analysisRoi.setReportPath(middleData.getAnalyses_ReportPath()); + analysisRois.add(analysisRoi); + } + // ROI 相关列值赋值 + List roiNumber = this.sampleStruct.ROI_number; + for (int i = 0; i < roiNumber.size(); i++) { + GardsAnalysisRoi analysisRoi = analysisRois.get(i); + analysisRoi.setRoiNum(Integer.valueOf(roiNumber.get(i))); + analysisRoi.setMinX(this.sampleStruct.POI_B_x1.get(i)); + analysisRoi.setMaxX(this.sampleStruct.POI_B_x2.get(i)); + analysisRoi.setMinY(this.sampleStruct.POI_G_y1.get(i)); + analysisRoi.setMaxY(this.sampleStruct.POI_G_y2.get(i)); + } + serviceQuotes.getAnalysisRoiAutoService().saveBatch(analysisRois); } - public Integer getIdAnalysis(Integer sampleId){ - return serviceQuotes.getAnalysesService().getIdAnalysis(sampleId); + public void middleDataTable(Integer sampleId, GStoreMiddleProcessData... middleDatas){ + List analysisRois = serviceQuotes.getAnalysisRoiAutoService().analysisRoi(sampleId); + Table middleDataTable = HashBasedTable.create(); + for (int i = 0; i < analysisRois.size(); i++) { + GardsAnalysisRoi analysisRoi = analysisRois.get(i); + Integer idAnalysis = analysisRoi.getIdAnalysis(); + Integer roiId = analysisRoi.getRoiId(); + middleDataTable.put(idAnalysis, roiId, middleDatas[i]); + } + this.middleDataTable = middleDataTable; } - public void saveCalibrationPairs(GStoreMiddleProcessData middleData, - Integer sampleId, Integer IdAnalysis){ + public List saveCalibrationPairsROI(Integer sampleId, Integer IdAnalysis, + Integer roiId, GStoreMiddleProcessData middleData){ String pairsSampleType = middleData.getCalibration_pairs_sample_type(); - GardsCalibrationPairs pairs = new GardsCalibrationPairs(); + GardsCalibrationPairsRoi pairs = new GardsCalibrationPairsRoi(); // GARDS_CALIBRATION_PAIRS (Energy) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION_PAIRS String base_E_Paris = "calibration_pairs_E_idCalPoint"; PairsEDto pairsEDto = new PairsEDto(); - BeanUtil.copyProperties(middleData,pairsEDto); - List pairsE = Lists.newArrayList(); + BeanUtil.copyProperties(middleData, pairsEDto); + List pairsE = Lists.newArrayList(); if (pairsEDto.getCalibration_pairs_E_idCalPoint().size() > 0) { pairsE = mapFields(pairsEDto, pairs, base_E_Paris, fieldMap); String pairsECaltype = middleData.getCalibration_pairs_E_Caltype(); String pairsEInput = middleData.getCalibration_pairs_E_Input(); - for (GardsCalibrationPairs onePairs : pairsE) { + for (GardsCalibrationPairsRoi onePairs : pairsE) { onePairs.setSampleId(sampleId); + onePairs.setRoiId(roiId); onePairs.setIdAnalysis(IdAnalysis); onePairs.setSampleType(pairsSampleType); onePairs.setCaltype(pairsECaltype); @@ -766,14 +800,15 @@ public class Sample_C_Analysis { // GARDS_CALIBRATION_PAIRS (Efficiency) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION_PAIRS String base_EF_Paris = "calibration_pairs_EF_idCalPoint"; PairsEFDto pairsEFDto = new PairsEFDto(); - BeanUtil.copyProperties(middleData,pairsEFDto); - List pairsEF = Lists.newArrayList(); + BeanUtil.copyProperties(middleData, pairsEFDto); + List pairsEF = Lists.newArrayList(); if (pairsEFDto.getCalibration_pairs_EF_idCalPoint().size() > 0) { pairsEF = mapFields(pairsEFDto, pairs, base_EF_Paris, fieldMap); String pairsEFCaltype = middleData.getCalibration_pairs_EF_Caltype(); String pairsEFInput = middleData.getCalibration_pairs_EF_Input(); - for (GardsCalibrationPairs onePairs : pairsEF) { + for (GardsCalibrationPairsRoi onePairs : pairsEF) { onePairs.setSampleId(sampleId); + onePairs.setRoiId(roiId); onePairs.setIdAnalysis(IdAnalysis); onePairs.setSampleType(pairsSampleType); onePairs.setCaltype(pairsEFCaltype); @@ -784,13 +819,14 @@ public class Sample_C_Analysis { String base_R_Paris = "calibration_pairs_R_idCalPoint"; PairsRDto pairsRDto = new PairsRDto(); BeanUtil.copyProperties(middleData,pairsRDto); - List pairsR = Lists.newArrayList(); + List pairsR = Lists.newArrayList(); if (pairsRDto.getCalibration_pairs_R_idCalPoint().size() > 0) { pairsR = mapFields(pairsRDto, pairs, base_R_Paris, fieldMap); String pairsRCaltype = middleData.getCalibration_pairs_R_Caltype(); String pairsRInput = middleData.getCalibration_pairs_R_Input(); - for (GardsCalibrationPairs onePairs : pairsR) { + for (GardsCalibrationPairsRoi onePairs : pairsR) { onePairs.setSampleId(sampleId); + onePairs.setRoiId(roiId); onePairs.setIdAnalysis(IdAnalysis); onePairs.setSampleType(pairsSampleType); onePairs.setCaltype(pairsRCaltype); @@ -801,13 +837,14 @@ public class Sample_C_Analysis { String base_T_Paris = "calibration_pairs_T_idCalPoint"; PairsTDto pairsTDto = new PairsTDto(); BeanUtil.copyProperties(middleData,pairsTDto); - List pairsT = Lists.newArrayList(); + List pairsT = Lists.newArrayList(); if (pairsTDto.getCalibration_pairs_T_idCalPoint().size() > 0) { pairsT = mapFields(pairsTDto, pairs, base_T_Paris, fieldMap); String pairsTCaltype = middleData.getCalibration_pairs_T_Caltype(); String pairsTInput = middleData.getCalibration_pairs_T_Input(); - for (GardsCalibrationPairs onePairs : pairsT) { + for (GardsCalibrationPairsRoi onePairs : pairsT) { onePairs.setSampleId(sampleId); + onePairs.setRoiId(roiId); onePairs.setIdAnalysis(IdAnalysis); onePairs.setSampleType(pairsSampleType); onePairs.setCaltype(pairsTCaltype); @@ -815,23 +852,37 @@ public class Sample_C_Analysis { } } // GARDS_CALIBRATION_PAIRS 汇总保存 - List allPairs = new ArrayList<>(); + List allPairs = new ArrayList<>(); allPairs.addAll(pairsE);allPairs.addAll(pairsEF); allPairs.addAll(pairsR);allPairs.addAll(pairsT); - serviceQuotes.getGardsCalibrationPairsService().saveBatch(allPairs); + return allPairs; } - public void saveCalibration(GStoreMiddleProcessData middleData, - Integer sampleId, Integer IdAnalysis){ + + public void saveCalibrationPairsROI(Integer sampleId){ + List pairsRois = new ArrayList<>(); + Set> cells = this.middleDataTable.cellSet(); + for (Table.Cell cell : cells) { + Integer IdAnalysis = cell.getRowKey(); + Integer roiId = cell.getColumnKey(); + GStoreMiddleProcessData middleData = cell.getValue(); + pairsRois.addAll(saveCalibrationPairsROI(sampleId, IdAnalysis, roiId, middleData)); + } + this.serviceQuotes.getCalibrationPairsRoiAutoService().saveBatch(pairsRois); + } + + public List saveCalibrationROI(Integer sampleId, Integer IdAnalysis, Integer roiId, + GStoreMiddleProcessData middleData){ String calibrationSampleType = middleData.getCalibration_sample_type(); List pairsEIdCalPoint = middleData.getCalibration_pairs_E_idCalPoint(); List pairsEFIdCalPoint = middleData.getCalibration_pairs_EF_idCalPoint(); List pairsRIdCalPoint = middleData.getCalibration_pairs_R_idCalPoint(); List pairsTIdCalPoint = middleData.getCalibration_pairs_T_idCalPoint(); - List calibrations = new ArrayList<>(); + List calibrations = new ArrayList<>(); // GARDS_CALIBRATION (E) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION if (CollUtil.isNotEmpty(pairsEIdCalPoint)){ - GardsCalibration calibration = new GardsCalibration(); + GardsCalibrationRoi calibration = new GardsCalibrationRoi(); calibration.setSampleId(sampleId); + calibration.setRoiId(roiId); calibration.setIdAnalysis(IdAnalysis); calibration.setSampleType(calibrationSampleType); calibration.setCalType(middleData.getCalibration_E_Caltype()); @@ -845,8 +896,9 @@ public class Sample_C_Analysis { } // GARDS_CALIBRATION (EF) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION if (CollUtil.isNotEmpty(pairsEFIdCalPoint)){ - GardsCalibration calibration = new GardsCalibration(); + GardsCalibrationRoi calibration = new GardsCalibrationRoi(); calibration.setSampleId(sampleId); + calibration.setRoiId(roiId); calibration.setIdAnalysis(IdAnalysis); calibration.setSampleType(calibrationSampleType); String efCaltype = middleData.getCalibration_EF_Caltype(); @@ -866,8 +918,9 @@ public class Sample_C_Analysis { } // GARDS_CALIBRATION (R) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION if (CollUtil.isNotEmpty(pairsRIdCalPoint)){ - GardsCalibration calibration = new GardsCalibration(); + GardsCalibrationRoi calibration = new GardsCalibrationRoi(); calibration.setSampleId(sampleId); + calibration.setRoiId(roiId); calibration.setIdAnalysis(IdAnalysis); calibration.setSampleType(calibrationSampleType); String rCaltype = middleData.getCalibration_R_Caltype(); @@ -887,8 +940,9 @@ public class Sample_C_Analysis { } // GARDS_CALIBRATION (T) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION if (CollUtil.isNotEmpty(pairsTIdCalPoint)){ - GardsCalibration calibration = new GardsCalibration(); + GardsCalibrationRoi calibration = new GardsCalibrationRoi(); calibration.setSampleId(sampleId); + calibration.setRoiId(roiId); calibration.setIdAnalysis(IdAnalysis); calibration.setSampleType(calibrationSampleType); String tCaltype = middleData.getCalibration_T_Caltype(); @@ -906,71 +960,122 @@ public class Sample_C_Analysis { calibration.setModdate(new Date()); calibrations.add(calibration); } - if (calibrations.size() > 0) { - serviceQuotes.getGardsCalibrationService().createBatch(calibrations); - } + return calibrations; } - public void savePeaks(GStoreMiddleProcessData middleData,Integer sampleId, Integer IdAnalysis){ - // Gards_Peaks数据表 ==> INSERT INTO RNAUTO.GARDS_PEAKS + public void saveCalibrationROI(Integer sampleId){ + List calibrationRois = new ArrayList<>(); + Set> cells = this.middleDataTable.cellSet(); + for (Table.Cell cell : cells) { + Integer IdAnalysis = cell.getRowKey(); + Integer roiId = cell.getColumnKey(); + GStoreMiddleProcessData middleData = cell.getValue(); + calibrationRois.addAll(saveCalibrationROI(sampleId, IdAnalysis, roiId, middleData)); + } + this.serviceQuotes.getCalibrationRoiAutoService().createBatch(calibrationRois); + } + + public List savePeaksROI(Integer sampleId, Integer IdAnalysis, + Integer roiId, GStoreMiddleProcessData middleData){ + // Gards_Peaks_ROI数据表 ==> INSERT INTO RNAUTO.GARDS_PEAKS_ROI String base_P_IdPeak = "peaks_idPeak"; GardsPeaksDto gardsPeaksDto = new GardsPeaksDto(); - BeanUtil.copyProperties(middleData,gardsPeaksDto); - GardsPeaks gardsPeaks = new GardsPeaks(); - if (gardsPeaksDto.getPeaks_idPeak().size() > 0) { - List peaks = mapFields(gardsPeaksDto, gardsPeaks, base_P_IdPeak, fieldMap); - peaks.forEach(ided -> { - ided.setSampleId(sampleId); - ided.setIdAnalysis(IdAnalysis); + BeanUtil.copyProperties(middleData, gardsPeaksDto); + GardsPeaksRoi peak = new GardsPeaksRoi(); + List peaks = new ArrayList<>(); + if (CollUtil.isNotEmpty(gardsPeaksDto.getPeaks_idPeak())) { + peaks = mapFields(gardsPeaksDto, peak, base_P_IdPeak, fieldMap); + peaks.forEach(item -> { + item.setRoiId(roiId); + item.setSampleId(sampleId); + item.setIdAnalysis(IdAnalysis); }); - serviceQuotes.getGardsPeaksAutoService().saveBatch(peaks); } + return peaks; } - public void saveNuclLinesIded(GStoreMiddleProcessData middleData, - Integer sampleId, Integer IdAnalysis){ + public void savePeaksROI(Integer sampleId){ + List peaksRois = new ArrayList<>(); + Set> cells = this.middleDataTable.cellSet(); + for (Table.Cell cell : cells) { + Integer IdAnalysis = cell.getRowKey(); + Integer roiId = cell.getColumnKey(); + GStoreMiddleProcessData middleData = cell.getValue(); + peaksRois.addAll(savePeaksROI(sampleId, IdAnalysis, roiId, middleData)); + } + this.serviceQuotes.getPeaksRoiAutoService().saveBatch(peaksRois); + } + + public List saveNuclLinesIdedROI(Integer sampleId, Integer IdAnalysis, Integer roiId, + GStoreMiddleProcessData middleData){ // Gards_Nucl_Lines_Ided数据表 ==> INSERT INTO RNAUTO.GARDS_NUCL_LINES_IDED Map nuclLinesIdedData = middleData.getNucl_lines_ided_data(); String base_IdPeak = "idPeak"; - List allNuclLinesIdeds = new ArrayList<>(); + List allNuclLinesIdeds = new ArrayList<>(); for (Map.Entry entry : nuclLinesIdedData.entrySet()) { String nuclideName = entry.getKey(); GStoreMiddleProcessDataNuclLinesIded nuclLinesIded = entry.getValue(); - GardsNuclLinesIded gardsNuclLinesIded = new GardsNuclLinesIded(); - List gardsNuclLinesIdeds = mapFields(nuclLinesIded, gardsNuclLinesIded, base_IdPeak, fieldMap); - if (CollUtil.isNotEmpty(gardsNuclLinesIdeds)){ - for (GardsNuclLinesIded ided : gardsNuclLinesIdeds) { - ided.setSampleId(sampleId); - ided.setIdAnalysis(IdAnalysis); - ided.setNuclideName(nuclideName); + GardsNuclLinesIdedRoi linesIdedRoi = new GardsNuclLinesIdedRoi(); + List linesIdedRois = mapFields(nuclLinesIded, linesIdedRoi, base_IdPeak, fieldMap); + if (CollUtil.isNotEmpty(linesIdedRois)){ + for (GardsNuclLinesIdedRoi idedRoi : linesIdedRois) { + idedRoi.setRoiId(roiId); + idedRoi.setSampleId(sampleId); + idedRoi.setIdAnalysis(IdAnalysis); + idedRoi.setNuclideName(nuclideName); } - allNuclLinesIdeds.addAll(gardsNuclLinesIdeds); + allNuclLinesIdeds.addAll(linesIdedRois); } } - serviceQuotes.getGardsNuclLinesIdedAutoService().saveBatch(allNuclLinesIdeds); + return allNuclLinesIdeds; } - public void saveNuclIded(GStoreMiddleProcessData middleData, - Integer sampleId, Integer IdAnalysis){ + public void saveNuclLinesIdedROI(Integer sampleId){ + List linesIdedRois = new ArrayList<>(); + Set> cells = this.middleDataTable.cellSet(); + for (Table.Cell cell : cells) { + Integer IdAnalysis = cell.getRowKey(); + Integer roiId = cell.getColumnKey(); + GStoreMiddleProcessData middleData = cell.getValue(); + linesIdedRois.addAll(saveNuclLinesIdedROI(sampleId, IdAnalysis, roiId, middleData)); + } + this.serviceQuotes.getNuclLinesIdedRoiAutoService().saveBatch(linesIdedRois); + } + + public List saveNuclIdedROI(Integer sampleId, Integer IdAnalysis, + Integer roiId, GStoreMiddleProcessData middleData){ // Gards_Nucl_Ided数据表 ==> INSERT INTO RNAUTO.GARDS_NUCL_IDED - GardsNuclIdedDto gardsNuclIdedDto = new GardsNuclIdedDto(); - GardsNuclIded gardsNuclIded = new GardsNuclIded(); - BeanUtil.copyProperties(middleData,gardsNuclIdedDto); - if (!gardsNuclIdedDto.getNucl_ided_Nuclidename().isEmpty()) { + GardsNuclIdedDto nuclIdedDto = new GardsNuclIdedDto(); + GardsNuclIdedRoi nuclIdedRoi = new GardsNuclIdedRoi(); + BeanUtil.copyProperties(middleData, nuclIdedDto); + List nuclIdedRois = new ArrayList<>(); + if (CollUtil.isNotEmpty(nuclIdedDto.getNucl_ided_Nuclidename())) { String base_NuclideName = "nucl_ided_Nuclidename"; - List gardsNuclIdeds = - mapFields(gardsNuclIdedDto, gardsNuclIded, base_NuclideName, fieldMap); - for (GardsNuclIded ided : gardsNuclIdeds) { - ided.setSampleId(sampleId); - ided.setIdAnalysis(IdAnalysis); + nuclIdedRois = mapFields(nuclIdedDto, nuclIdedRoi, base_NuclideName, fieldMap); + for (GardsNuclIdedRoi idedRoi : nuclIdedRois) { + idedRoi.setRoiId(roiId); + idedRoi.setSampleId(sampleId); + idedRoi.setIdAnalysis(IdAnalysis); } - serviceQuotes.getGardsNuclIdedAutoService().saveBatch(gardsNuclIdeds); } - // serviceQuotes.get + return nuclIdedRois; } - public void saveQcCheck(GStoreMiddleProcessData middleData, - Integer sampleId, Integer IdAnalysis,Map qcItems){ + public void saveNuclIdedROI(Integer sampleId){ + List idedRois = new ArrayList<>(); + Set> cells = this.middleDataTable.cellSet(); + for (Table.Cell cell : cells) { + Integer IdAnalysis = cell.getRowKey(); + Integer roiId = cell.getColumnKey(); + GStoreMiddleProcessData middleData = cell.getValue(); + idedRois.addAll(saveNuclIdedROI(sampleId, IdAnalysis, roiId, middleData)); + } + this.serviceQuotes.getNuclIdedRoiAutoService().saveBatch(idedRois); + } + + public void saveQcCheckROI(Integer sampleId, Integer IdAnalysis, Integer roiId, + Map qcItems, + GStoreMiddleProcessData middleData){ // Gards_Qc_Check数据表 ==> INSERT INTO RNAUTO.GARDS_QC_CHECK if (MapUtil.isNotEmpty(qcItems)){ String base_QC = String.valueOf(qcItems.size()); @@ -988,33 +1093,48 @@ public class Sample_C_Analysis { } } - public void saveMDC(Integer sampleId, Integer IdAnalysis, Map mdcInfoMap) { - List mdcList = new LinkedList<>(); - if (CollectionUtils.isNotEmpty(mdcInfoMap)) { - for (CalMDCInfo mdcInfo :mdcInfoMap.values()) { - if (Objects.nonNull(mdcInfo.getEnergy()) && Objects.nonNull(mdcInfo.getYield()) && Objects.nonNull(mdcInfo.getEfficiency())) { - GardsMDC mdc = new GardsMDC(); - mdc.setIdAnalysis(IdAnalysis); - mdc.setSampleId(sampleId); - mdc.setNuclideName(mdcInfo.getNuclideName()); - mdc.setEnergy(mdcInfo.getEnergy()); - mdc.setYield(mdcInfo.getYield()); - mdc.setEfficiency(mdcInfo.getEfficiency()); - if (Objects.nonNull(mdcInfo.getMdc()) && Double.isFinite(mdcInfo.getMdc())) { - mdc.setMdc(String.valueOf(mdcInfo.getMdc())); - } else { - mdc.setMdc(null); - } - mdc.setMdcErr(null); - mdcList.add(mdc); + public void saveQcCheckROI(Integer sampleId, Map qcItems){ + + } + + public List saveMDCROI(Integer sampleId, Integer IdAnalysis, + Integer roiId, Map mdcInfoMap) { + List mdcRois = new LinkedList<>(); + for (CalMDCInfo mdcInfo :mdcInfoMap.values()) { + if (ObjectUtil.isNull(mdcInfo)) continue; + if (Objects.nonNull(mdcInfo.getEnergy()) && Objects.nonNull(mdcInfo.getYield()) + && Objects.nonNull(mdcInfo.getEfficiency())) { + GardsMDCRoi mdcRoi = new GardsMDCRoi(); + mdcRoi.setRoiId(roiId); + mdcRoi.setSampleId(sampleId); + mdcRoi.setIdAnalysis(IdAnalysis); + mdcRoi.setNuclideName(mdcInfo.getNuclideName()); + mdcRoi.setEnergy(mdcInfo.getEnergy()); + mdcRoi.setYield(mdcInfo.getYield()); + mdcRoi.setEfficiency(mdcInfo.getEfficiency()); + if (Objects.nonNull(mdcInfo.getMdc()) && Double.isFinite(mdcInfo.getMdc())) { + mdcRoi.setMdc(String.valueOf(mdcInfo.getMdc())); + } else { + mdcRoi.setMdc(null); } + mdcRoi.setMdcErr(null); + mdcRois.add(mdcRoi); } } - if (CollectionUtils.isNotEmpty(mdcList)) { - serviceQuotes.getGardsMDCAutoService().saveBatch(mdcList); - } + return mdcRois; } + public void saveMDCROI(Integer sampleId, Map mdcInfoMap){ + List mdcRois = new ArrayList<>(); + Set> cells = this.middleDataTable.cellSet(); + for (Table.Cell cell : cells) { + Integer IdAnalysis = cell.getRowKey(); + Integer roiId = cell.getColumnKey(); + mdcRois.addAll(saveMDCROI(sampleId, IdAnalysis, roiId, mdcInfoMap)); + } + this.serviceQuotes.getMdcRoiAutoService().saveBatch(mdcRois); + } + public Map getNuclideLinesG() { redisUtil = ApplicationContextUtil.getContext().getBean(RedisUtil.class); Object nuclideLibs = redisUtil.get(RedisConstant.NUCLIDE_LINES_LIB + "G"); @@ -1173,35 +1293,6 @@ public class Sample_C_Analysis { } } - private GardsAnalyses toAnalysis(GStoreMiddleProcessData middleData){ - GardsAnalyses gardsAnalyses = new GardsAnalyses(); - String dateTime = DateConstant.DATE_BIAS_TIME; - String analysisBegin = middleData.getAnalyses_analysisBegin(); - Date analysis_Begin = DateUtil.parse(analysisBegin, dateTime) - .toJdkDate(); - gardsAnalyses.setAnalysisBegin(analysis_Begin); - String analysisEnd = middleData.getAnalyses_analysisEnd(); - Date analysis_End = DateUtil.parse(analysisEnd, dateTime) - .toJdkDate(); - gardsAnalyses.setAnalysisEnd(analysis_End); - gardsAnalyses.setType(middleData.getAnalyses_type()); - gardsAnalyses.setSoftware(middleData.getAnalyses_software()); - gardsAnalyses.setSwVersion(middleData.getAnalyses_swVersion()); - gardsAnalyses.setAnalyst(middleData.getAnalyses_analyst()); - gardsAnalyses.setComments(middleData.getAnalyses_comments()); - gardsAnalyses.setSearchStartChannel((int)middleData.getAnalyses_searchStartChannel()); - gardsAnalyses.setSearchEndChannel((int)middleData.getAnalyses_searchEndChannel()); - gardsAnalyses.setSearchThreshold(middleData.getAnalyses_searchThreshold()); - gardsAnalyses.setNumberOfPeaks((int) middleData.getAnalyses_numberOfPeaks()); - gardsAnalyses.setTotalCounts((float) middleData.getAnalyses_totalCounts()); - gardsAnalyses.setBaselinePath(middleData.getAnalyses_baseline_filePath()); - gardsAnalyses.setLcPath(middleData.getAnalyses_lc_filePath()); - gardsAnalyses.setScacPath(middleData.getAnalyses_scac_filePath()); - gardsAnalyses.setLogPath(middleData.getAnalyses_LogPath()); - gardsAnalyses.setReportPath(middleData.getAnalyses_ReportPath()); - return gardsAnalyses; - } - /* public List mapFields(T1 source, T2 tartget, String baseLine, Map fieldMap) { try { List result = new ArrayList<>(); diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumServiceQuotes.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumServiceQuotes.java index 7057fc44..7eb323dc 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumServiceQuotes.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumServiceQuotes.java @@ -9,6 +9,7 @@ import org.jeecg.common.util.RedisUtil; import org.jeecg.common.util.SelfUtil; import org.jeecg.modules.datasource.OraDataSourceProperties; import org.jeecg.modules.service.*; +import org.jeecg.modules.service.impl.GardsCalibrationRoiAutoServiceImpl; import org.springframework.context.ApplicationContext; import org.springframework.core.io.ResourceLoader; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -91,6 +92,23 @@ public class SpectrumServiceQuotes { private final SelfUtil selfStationUtil; + /* 自动处理库_ROI相关类引用 */ + private final IGardsAnalysisRoiAutoService analysisRoiAutoService; + + private final GardsCalibrationRoiAutoServiceImpl calibrationRoiAutoService; + + private final IGardsCalibrationPairsRoiAutoService calibrationPairsRoiAutoService; + + private final IGardsMdcRoiAutoService mdcRoiAutoService; + + private final IGardsNuclIdedRoiAutoService nuclIdedRoiAutoService; + + private final IGardsNuclLinesIdedRoiAutoService nuclLinesIdedRoiAutoService; + + private final IGardsPeaksRoiAutoService peaksRoiAutoService; + + private final IGardsQcCheckRoiAutoService qcCheckRoiAutoService; + /** * 原始库插入数据锁 */ diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsAnalysisRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsAnalysisRoiMapper.java new file mode 100644 index 00000000..e61246be --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsAnalysisRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsAnalysisRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsAnalysisRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsCalibrationPairsRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsCalibrationPairsRoiMapper.java new file mode 100644 index 00000000..ef6c7f54 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsCalibrationPairsRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsCalibrationPairsRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsCalibrationPairsRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsCalibrationRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsCalibrationRoiMapper.java new file mode 100644 index 00000000..b78c01ef --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsCalibrationRoiMapper.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsCalibration; +import org.jeecg.modules.base.entity.rnauto.GardsCalibrationRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +public interface GardsCalibrationRoiMapper extends BaseMapper { + + @InterceptorIgnore(tenantLine = "true") + int createBatch(@Param("calibrationRois") List calibrationRois); +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsMdcRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsMdcRoiMapper.java new file mode 100644 index 00000000..37b203cc --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsMdcRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsMDCRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsMdcRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclIdedRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclIdedRoiMapper.java new file mode 100644 index 00000000..99e7c39c --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclIdedRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsNuclIdedRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsNuclIdedRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclLinesIdedRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclLinesIdedRoiMapper.java new file mode 100644 index 00000000..632d298f --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsNuclLinesIdedRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsNuclLinesIdedRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsNuclLinesIdedRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsPeaksRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsPeaksRoiMapper.java new file mode 100644 index 00000000..dfda46a3 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsPeaksRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsPeaksRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsPeaksRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsQcCheckRoiMapper.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsQcCheckRoiMapper.java new file mode 100644 index 00000000..c8ad85ae --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/GardsQcCheckRoiMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.base.entity.rnauto.GardsQcCheckRoi; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface GardsQcCheckRoiMapper extends BaseMapper { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsAnalysisRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsAnalysisRoiMapper.xml new file mode 100644 index 00000000..fe738e7b --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsAnalysisRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsCalibrationPairsRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsCalibrationPairsRoiMapper.xml new file mode 100644 index 00000000..e568bfff --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsCalibrationPairsRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsCalibrationRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsCalibrationRoiMapper.xml new file mode 100644 index 00000000..db4a9b32 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsCalibrationRoiMapper.xml @@ -0,0 +1,35 @@ + + + + + + begin + + insert into RNAUTO.GARDS_CALIBRATION_ROI( + SAMPLE_ID, + ROI_ID, + IDANALYSIS, + SAMPLE_TYPE, + CALTYPE, + FUNCTION, + FUNCTIONDEF, + STARTOFRANGE, + ENDOFRANGE, + COEFF_STRING, + moddate) + values + (#{calibration.sampleId}, + #{calibration.roiId}, + #{calibration.idAnalysis}, + #{calibration.sampleType}, + #{calibration.calType}, + #{calibration.function}, + #{calibration.functionDef}, + #{calibration.startOfRange}, + #{calibration.endOfRange}, + #{calibration.coeffString}, + #{calibration.moddate}) + + end; + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsMdcRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsMdcRoiMapper.xml new file mode 100644 index 00000000..4fa8e413 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsMdcRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedRoiMapper.xml new file mode 100644 index 00000000..4bcd2b63 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclLinesIdedRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclLinesIdedRoiMapper.xml new file mode 100644 index 00000000..e7332a0e --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclLinesIdedRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsPeaksRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsPeaksRoiMapper.xml new file mode 100644 index 00000000..6aed2caa --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsPeaksRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsQcCheckRoiMapper.xml b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsQcCheckRoiMapper.xml new file mode 100644 index 00000000..33bd5e1f --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/mapper/xml/GardsQcCheckRoiMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsAnalysisRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsAnalysisRoiAutoService.java new file mode 100644 index 00000000..18f73b90 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsAnalysisRoiAutoService.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsAnalysisRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +public interface IGardsAnalysisRoiAutoService extends IService { + + Integer getIdAnalysisAny(Integer sampleId); + + List analysisRoi(Integer sampleId); +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsCalibrationPairsRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsCalibrationPairsRoiAutoService.java new file mode 100644 index 00000000..b5dc804f --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsCalibrationPairsRoiAutoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsCalibrationPairsRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface IGardsCalibrationPairsRoiAutoService extends IService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsCalibrationRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsCalibrationRoiAutoService.java new file mode 100644 index 00000000..0669469c --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsCalibrationRoiAutoService.java @@ -0,0 +1,11 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsCalibrationRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +public interface IGardsCalibrationRoiAutoService extends IService { + + int createBatch(List calibrationRois); +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsMdcRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsMdcRoiAutoService.java new file mode 100644 index 00000000..d3f59d21 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsMdcRoiAutoService.java @@ -0,0 +1,8 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsMDCRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface IGardsMdcRoiAutoService extends IService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsNuclIdedRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsNuclIdedRoiAutoService.java new file mode 100644 index 00000000..dcb0657b --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsNuclIdedRoiAutoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsNuclIdedRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface IGardsNuclIdedRoiAutoService extends IService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsNuclLinesIdedRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsNuclLinesIdedRoiAutoService.java new file mode 100644 index 00000000..8550416c --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsNuclLinesIdedRoiAutoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsNuclLinesIdedRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface IGardsNuclLinesIdedRoiAutoService extends IService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsPeaksRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsPeaksRoiAutoService.java new file mode 100644 index 00000000..a7e1e264 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsPeaksRoiAutoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsPeaksRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface IGardsPeaksRoiAutoService extends IService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsQcCheckRoiAutoService.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsQcCheckRoiAutoService.java new file mode 100644 index 00000000..604cc504 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/IGardsQcCheckRoiAutoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.service; + +import org.jeecg.modules.base.entity.rnauto.GardsQcCheckRoi; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +public interface IGardsQcCheckRoiAutoService extends IService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsAnalysisRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsAnalysisRoiAutoServiceImpl.java new file mode 100644 index 00000000..c87a2866 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsAnalysisRoiAutoServiceImpl.java @@ -0,0 +1,36 @@ +package org.jeecg.modules.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import org.jeecg.modules.base.entity.rnauto.GardsAnalyses; +import org.jeecg.modules.base.entity.rnauto.GardsAnalysisRoi; +import org.jeecg.modules.mapper.GardsAnalysisRoiMapper; +import org.jeecg.modules.service.IGardsAnalysisRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.List; + +@Service +@DS("ora") +public class GardsAnalysisRoiAutoServiceImpl extends ServiceImpl implements IGardsAnalysisRoiAutoService { + + + @Override + public Integer getIdAnalysisAny(Integer sampleId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(GardsAnalysisRoi::getSampleId, sampleId); + List analysisRois = list(wrapper); + return analysisRois.stream().findAny().orElse(new GardsAnalysisRoi()) + .getIdAnalysis(); + } + + @Override + public List analysisRoi(Integer sampleId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(GardsAnalysisRoi::getSampleId, sampleId); + wrapper.orderByAsc(GardsAnalysisRoi::getIdAnalysis); + return list(wrapper); + } +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsCalibrationPairsRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsCalibrationPairsRoiAutoServiceImpl.java new file mode 100644 index 00000000..e9c20859 --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsCalibrationPairsRoiAutoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.service.impl; + +import org.jeecg.modules.base.entity.rnauto.GardsCalibrationPairsRoi; +import org.jeecg.modules.mapper.GardsCalibrationPairsRoiMapper; +import org.jeecg.modules.service.IGardsCalibrationPairsRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +@Service +public class GardsCalibrationPairsRoiAutoServiceImpl extends ServiceImpl implements IGardsCalibrationPairsRoiAutoService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsCalibrationRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsCalibrationRoiAutoServiceImpl.java new file mode 100644 index 00000000..7ce7273b --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsCalibrationRoiAutoServiceImpl.java @@ -0,0 +1,22 @@ +package org.jeecg.modules.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.jeecg.modules.base.entity.rnauto.GardsCalibrationRoi; +import org.jeecg.modules.mapper.GardsCalibrationRoiMapper; +import org.jeecg.modules.service.IGardsCalibrationRoiAutoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.List; + +@Service +@DS("ora") +public class GardsCalibrationRoiAutoServiceImpl extends ServiceImpl implements IGardsCalibrationRoiAutoService { + + @Override + public int createBatch(List calibrationRois) { + return this.baseMapper.createBatch(calibrationRois); + } +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsMdcRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsMdcRoiAutoServiceImpl.java new file mode 100644 index 00000000..21365c2f --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsMdcRoiAutoServiceImpl.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.service.impl; + +import org.jeecg.modules.base.entity.rnauto.GardsMDCRoi; +import org.jeecg.modules.mapper.GardsMdcRoiMapper; +import org.jeecg.modules.service.IGardsMdcRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +@Service +public class GardsMdcRoiAutoServiceImpl extends ServiceImpl implements IGardsMdcRoiAutoService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsNuclIdedRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsNuclIdedRoiAutoServiceImpl.java new file mode 100644 index 00000000..32a59d7d --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsNuclIdedRoiAutoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.service.impl; + +import org.jeecg.modules.base.entity.rnauto.GardsNuclIdedRoi; +import org.jeecg.modules.mapper.GardsNuclIdedRoiMapper; +import org.jeecg.modules.service.IGardsNuclIdedRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +@Service +public class GardsNuclIdedRoiAutoServiceImpl extends ServiceImpl implements IGardsNuclIdedRoiAutoService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsNuclLinesIdedRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsNuclLinesIdedRoiAutoServiceImpl.java new file mode 100644 index 00000000..48d884fc --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsNuclLinesIdedRoiAutoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.service.impl; + +import org.jeecg.modules.base.entity.rnauto.GardsNuclLinesIdedRoi; +import org.jeecg.modules.mapper.GardsNuclLinesIdedRoiMapper; +import org.jeecg.modules.service.IGardsNuclLinesIdedRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +@Service +public class GardsNuclLinesIdedRoiAutoServiceImpl extends ServiceImpl implements IGardsNuclLinesIdedRoiAutoService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsPeaksRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsPeaksRoiAutoServiceImpl.java new file mode 100644 index 00000000..f626b87a --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsPeaksRoiAutoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.service.impl; + +import org.jeecg.modules.base.entity.rnauto.GardsPeaksRoi; +import org.jeecg.modules.mapper.GardsPeaksRoiMapper; +import org.jeecg.modules.service.IGardsPeaksRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +@Service +public class GardsPeaksRoiAutoServiceImpl extends ServiceImpl implements IGardsPeaksRoiAutoService { + +} diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsQcCheckRoiAutoServiceImpl.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsQcCheckRoiAutoServiceImpl.java new file mode 100644 index 00000000..8281b2ef --- /dev/null +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/modules/service/impl/GardsQcCheckRoiAutoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.service.impl; + +import org.jeecg.modules.base.entity.rnauto.GardsQcCheckRoi; +import org.jeecg.modules.mapper.GardsQcCheckRoiMapper; +import org.jeecg.modules.service.IGardsQcCheckRoiAutoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: + * @Author: jeecg-boot + * @Date: 2024-07-24 + * @Version: V1.0 + */ +@Service +public class GardsQcCheckRoiAutoServiceImpl extends ServiceImpl implements IGardsQcCheckRoiAutoService { + +}