From 3761c0debaecb588e18d71d553e47ad5ce91c981 Mon Sep 17 00:00:00 2001 From: xiaoguangbin Date: Mon, 13 Jan 2025 10:23:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B8=E7=B4=A0=E5=88=86=E6=9E=90?= =?UTF-8?q?=E8=A7=84=E5=88=99=20=E5=A2=9E=E5=8A=A0=E6=A0=B8=E7=B4=A0?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E6=8A=A5=E8=AD=A6=EF=BC=8C=E6=B1=82=E5=B9=B3?= =?UTF-8?q?=E5=9D=87=E5=80=BC=E7=9A=84=E5=91=A8=E6=9C=9F=E5=92=8C=E7=B3=BB?= =?UTF-8?q?=E6=95=B0=E9=83=BD=E6=95=B4=E5=90=88=E5=88=B0=E8=A7=84=E5=88=99?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/postgre/AlarmAnalysisRule.java | 1 + .../org/jeecg/modules/job/NucliedAvgJob.java | 1 + .../mapper/xml/GardsNuclIdedAutoMapper.xml | 56 +++++---- .../mapper/xml/GardsNuclIdedManMapper.xml | 51 ++++---- .../mapper/xml/GardsXeResultsAutoMapper.xml | 113 +++++++++++------- .../mapper/xml/GardsXeResultsManMapper.xml | 89 +++++++++----- .../modules/redisStream/AnalysisConsumer.java | 13 +- 7 files changed, 193 insertions(+), 131 deletions(-) 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 + + +