diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/AlarmAnalysisRuleInfo.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/AlarmAnalysisRuleInfo.java index 9a76c693..14bdfa11 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/AlarmAnalysisRuleInfo.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/AlarmAnalysisRuleInfo.java @@ -59,4 +59,10 @@ public class AlarmAnalysisRuleInfo implements Serializable { private Integer xe133Flag; private Integer xe135Flag; + + private Integer days; + + private String identifyNuclides; + + private List identifyNuclidesChecked; } diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/Info.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/Info.java index cba0cc14..7f1d245b 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/Info.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/Info.java @@ -9,6 +9,7 @@ import org.jeecg.modules.base.enums.SourceType; import java.io.Serializable; import java.time.LocalDateTime; import java.util.Map; +import java.util.Set; @Data @AllArgsConstructor @@ -48,4 +49,6 @@ public class Info implements Serializable{ private String groupId; private String conditions; + + private Set identifyNuclideSet; } diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/postgre/AlarmAnalysisRule.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/postgre/AlarmAnalysisRule.java index e871cdb5..502864db 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/postgre/AlarmAnalysisRule.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/postgre/AlarmAnalysisRule.java @@ -1,19 +1,22 @@ package org.jeecg.modules.base.entity.postgre; -import com.baomidou.mybatisplus.annotation.FieldStrategy; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import org.jeecg.common.system.base.entity.JeecgEntity; +import java.math.BigDecimal; + @Data @TableName("alarm_analysis_rule") @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) public class AlarmAnalysisRule extends JeecgEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private String id; + /** 规则名称 */ private String name; @@ -42,7 +45,7 @@ public class AlarmAnalysisRule extends JeecgEntity { private String sampleType; - private Integer coefficient; + private BigDecimal coefficient; @TableField(updateStrategy = FieldStrategy.IGNORED) private String colTime; @@ -82,6 +85,10 @@ public class AlarmAnalysisRule extends JeecgEntity { @TableField(value = "xe135_flag", updateStrategy = FieldStrategy.IGNORED) private Integer xe135Flag; + + private Integer days; + + private String identifyNuclides; /** 备注 */ private String remark; } diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/enums/Condition.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/enums/Condition.java index 587c8923..2c8ea1f0 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/enums/Condition.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/enums/Condition.java @@ -7,7 +7,22 @@ import lombok.Getter; @Getter @AllArgsConstructor public enum Condition { - FIRST_FOUND("1"), ABOVE_AVERAGE("2"), MEANWHILE("3"); + /** + * 首次发现核素 + */ + FIRST_FOUND("1"), + /** + * 核素conc超过平均值 + */ + ABOVE_AVERAGE("2"), + /** + * 同时识别到多个核素 + */ + MEANWHILE("3"), + /** + * 识别到某个核素 + */ + IDENTIFY_NUCLIDES("4"); private final String value; diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedAutoMapper.xml b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedAutoMapper.xml index 12e27727..2ff05e46 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedAutoMapper.xml +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsNuclIdedAutoMapper.xml @@ -3,6 +3,7 @@ SELECT + DISTINCT samp.SAMPLE_ID, nucl.NUCLIDENAME, nucl.CONCENTRATION AS CONC, ana.ANALYSISBEGIN FROM - RNMAN.GARDS_NUCL_IDED nucl + RNMAN.GARDS_NUCL_IDED nucl INNER JOIN RNMAN.GARDS_ANALYSES ana ON ana.IDANALYSIS = nucl.IDANALYSIS INNER JOIN ORIGINAL.GARDS_SAMPLE_DATA samp ON samp.SAMPLE_ID = nucl.SAMPLE_ID + INNER JOIN RNMAN.GARDS_QC_CHECK qc ON samp.SAMPLE_ID = qc.SAMPLE_ID ana.ANALYSISBEGIN BETWEEN to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss') AND to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss') AND samp.DATA_TYPE = 'S' AND samp.STATUS IN ('P', 'R') AND samp.STATION_ID = #{stationId} + AND samp.SPECTRAL_QUALIFIE = 'FULL' AND nucl.NUCLIDENAME IN #{item} + + AND (qc.qc_name = 'col_time' and qc.qc_value between #{colTime[0]} and #{colTime[1]} ) + + + AND (qc.qc_name = 'acq_time' and qc.qc_value between #{acqTime[0]} and #{acqTime[1]} ) + + + AND (qc.qc_name = 'air_flow' and qc.qc_value < #{airFlow} ) + + + AND (qc.qc_name = 'decay_time' and qc.qc_value < #{decayTime} ) + + + AND (qc.qc_name = 'samp_vol' and qc.qc_value < #{sampVol} ) + + + AND (qc.qc_name = 'Be7-FWHM' and qc.qc_value < #{be7FWHM} ) + + + AND (qc.qc_name = 'Ba140-MDC' and qc.qc_value < #{ba140MDC} ) + + + AND (qc.qc_name = 'Xe133-MDC' and qc.qc_value < #{xe133MDC} ) + SELECT + DISTINCT samp.SAMPLE_ID, xe.NUCLIDE_NAME, xe.CONC, ana.ANALYSISBEGIN @@ -16,6 +17,7 @@ AND to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss') AND samp.DATA_TYPE = 'S' AND samp.STATUS IN ('P', 'R') AND samp.STATION_ID = #{stationId} + AND samp.SPECTRAL_QUALIFIE = 'FULL' AND xe.NUCLIDE_NAME IN @@ -34,6 +36,18 @@ AND (xe.NUCLIDE_NAME = 'Xe133m' AND MDC between #{Xe133MDC[0]} AND #{Xe133MDC[1]} ) + + AND (xe.NUCLIDE_NAME = 'Xe133m' AND xe.NID_FLAG = 1 ) + + + AND (xe.NUCLIDE_NAME = 'Xe133' AND xe.NID_FLAG = 1 ) + + + AND (xe.NUCLIDE_NAME = 'Xe131m' AND xe.NID_FLAG = 1 ) + + + AND (xe.NUCLIDE_NAME = 'Xe135' AND xe.NID_FLAG = 1 ) + SELECT + DISTINCT samp.SAMPLE_ID, xe.NUCLIDE_NAME, xe.CONC, ana.ANALYSISBEGIN @@ -10,17 +11,31 @@ RNMAN.GARDS_XE_RESULTS xe INNER JOIN RNMAN.GARDS_ANALYSES ana ON ana.IDANALYSIS = xe.IDANALYSIS INNER JOIN ORIGINAL.GARDS_SAMPLE_DATA samp ON samp.SAMPLE_ID = xe.SAMPLE_ID + INNER JOIN ORIGINAL.GARDS_SAMPLE_AUX aux ON samp.SAMPLE_ID = aux.SAMPLE_ID ana.ANALYSISBEGIN BETWEEN to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss') AND to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss') AND samp.DATA_TYPE = 'S' AND samp.STATUS IN ('P', 'R') AND samp.STATION_ID = #{stationId} + AND samp.SPECTRAL_QUALIFIE = 'FULL' AND xe.NUCLIDE_NAME IN #{item} + + and ((TO_NUMBER(samp.COLLECT_STOP - samp.COLLECT_START) * 24) between #{colTime[0]} and #{colTime[1]} ) + + + and (samp.ACQUISITION_LIVE_SEC / 3600 between #{colTime[0]} and #{colTime[1]} ) + + + AND (aux.XE_VOLUME > #{XeVol} ) + + + AND (xe.NUCLIDE_NAME = 'Xe133m' AND MDC between #{Xe133MDC[0]} AND #{Xe133MDC[1]} ) +