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 502864db..0a0feabd 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 @@ -88,6 +88,7 @@ public class AlarmAnalysisRule extends JeecgEntity { private Integer days; + @TableField(value = "identify_nuclides", updateStrategy = FieldStrategy.IGNORED) private String identifyNuclides; /** 备注 */ private String remark; diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/job/NucliedAvgJob.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/job/NucliedAvgJob.java index 71824dba..3439b62a 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/job/NucliedAvgJob.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/job/NucliedAvgJob.java @@ -15,6 +15,7 @@ public class NucliedAvgJob implements Job{ @Override @Scheduled(cron = "${task.period-avg:0 2 0 * * ?}") +// @Scheduled(cron = "${task.period-avg:0/59 0/1 * * * ? }") public void execute() { calculateConcService.calcAndSave(); } 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 2ff05e46..7b01aa0a 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 @@ -12,7 +12,7 @@ INNER JOIN RNAUTO.GARDS_ANALYSES ana ON ana.IDANALYSIS = nucl.IDANALYSIS INNER JOIN ORIGINAL.GARDS_SAMPLE_DATA samp ON samp.SAMPLE_ID = nucl.SAMPLE_ID INNER JOIN RNAUTO.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') @@ -24,31 +24,37 @@ #{item} - - AND (qc.qc_name = 'col_time' and qc.qc_value between #{colTime[0]} and #{colTime[1]} ) + + + + (qc.qc_name = 'col_time' and qc.qc_value between #{colTime[0]} and #{colTime[1]} ) or + + + (qc.qc_name = 'acq_time' and qc.qc_value = #{acqTime[0]}) or + + + (qc.qc_name = 'airFlow' and qc.qc_value < #{airFlow} ) or + + + (qc.qc_name = 'decay_time' and qc.qc_value < #{decayTime} ) or + + + (qc.qc_name = 'samp_vol' and qc.qc_value < #{sampVol} ) or + + + (qc.qc_name = 'Be7-FWHM' and qc.qc_value < #{be7FWHM} ) or + + + (qc.qc_name = 'Ba140-MDC' and qc.qc_value < #{ba140MDC} ) or + + + (qc.qc_name = 'Xe133-MDC' and qc.qc_value < #{xe133MDC} ) or + + - - 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} ) - - + + diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsXeResultsAutoMapper.xml b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsXeResultsAutoMapper.xml index 1167f928..8362ed65 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsXeResultsAutoMapper.xml +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/GardsXeResultsAutoMapper.xml @@ -2,53 +2,78 @@ - SELECT - DISTINCT samp.SAMPLE_ID, + SELECT * FROM ( + SELECT + samp.SAMPLE_ID, xe.NUCLIDE_NAME, xe.CONC, - ana.ANALYSISBEGIN - FROM + ana.ANALYSISBEGIN, + xe.NID_FLAG + FROM 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]} ) - - + 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} + + + + )a + + + + (a.NUCLIDE_NAME = 'Xe133m' AND a.NID_FLAG = 1 ) or + + + (a.NUCLIDE_NAME = 'Xe133m' AND (a.NID_FLAG = 1 AND a.NID_FLAG = 0) ) or + + + + + (a.NUCLIDE_NAME = 'Xe133' AND a.NID_FLAG = 1 ) or + + + (a.NUCLIDE_NAME = 'Xe133' AND (a.NID_FLAG = 1 AND a.NID_FLAG = 0) ) or + + + + + (a.NUCLIDE_NAME = 'Xe131m' AND a.NID_FLAG = 1 ) or + + + (a.NUCLIDE_NAME = 'Xe131m' AND (a.NID_FLAG = 1 AND a.NID_FLAG = 0) ) or + + + + + (a.NUCLIDE_NAME = 'Xe135' AND a.NID_FLAG = 1 ) or + + + (a.NUCLIDE_NAME = 'Xe135' AND (a.NID_FLAG = 1 AND a.NID_FLAG = 0) ) or + + +