From 951f2e3161f75b183862fe9f2f3a6d64a2a9f5be Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 22 May 2024 15:32:13 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20=E6=B0=B4=E7=94=B5=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/record/RecordDnbInstantMapper.xml | 8 ++++---- .../resources/mapper/record/RecordWaterInstantMapper.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/op-modules/op-energy/src/main/resources/mapper/record/RecordDnbInstantMapper.xml b/op-modules/op-energy/src/main/resources/mapper/record/RecordDnbInstantMapper.xml index 1305bcbc..12c38729 100644 --- a/op-modules/op-energy/src/main/resources/mapper/record/RecordDnbInstantMapper.xml +++ b/op-modules/op-energy/src/main/resources/mapper/record/RecordDnbInstantMapper.xml @@ -44,7 +44,7 @@ and (record_dnb_instant.monitor_id = #{monitorSubset} OR record_dnb_instant.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0)) and vA = #{vA} and vB = #{vB} @@ -82,7 +82,7 @@ and rdi.monitor_id = #{monitorId} and (rdi.monitor_id = #{monitorSubset} OR rdi.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0)) and rdi.monitor_id IN @@ -93,7 +93,7 @@ group by rdi.monitor_id) md on md.monitor_id = d.monitor_id and md.collect_time = d.collect_time left join base_monitor_info m on m.monitor_id = d.monitor_id - left join (select rpd.monitor_id, ifnull(sum(rpd.expend), 0) consumption + left join (select rpd.monitor_id, isnull(sum(rpd.expend), 0) consumption from report_point_dnb rpd where rpd.begin_time between #{params.beginCollectTime} and #{params.endCollectTime} @@ -116,7 +116,7 @@ and bmi.monitor_id = #{monitorId} and (bmi.monitor_id = #{monitorSubset} OR bmi.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0)) diff --git a/op-modules/op-energy/src/main/resources/mapper/record/RecordWaterInstantMapper.xml b/op-modules/op-energy/src/main/resources/mapper/record/RecordWaterInstantMapper.xml index b0538665..8d0f070b 100644 --- a/op-modules/op-energy/src/main/resources/mapper/record/RecordWaterInstantMapper.xml +++ b/op-modules/op-energy/src/main/resources/mapper/record/RecordWaterInstantMapper.xml @@ -35,7 +35,7 @@ and (record_water_instant.monitor_id = #{monitorSubset} OR record_water_instant.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0)) and flux_flow = #{fluxFlow} and water_flow = #{waterFlow} @@ -63,7 +63,7 @@ and rdi.monitor_id = #{monitorId} and (rdi.monitor_id = #{monitorSubset} OR rdi.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0)) and rdi.monitor_id IN @@ -74,7 +74,7 @@ group by rdi.monitor_id) md on md.monitor_id = d.monitor_id and md.collect_time = d.collect_time left join base_monitor_info m on m.monitor_id = d.monitor_id - left join (select rpd.monitor_id, ifnull(sum(rpd.expend), 0) consumption + left join (select rpd.monitor_id, isnull(sum(rpd.expend), 0) consumption from report_point_dnb rpd where rpd.begin_time between #{params.beginCollectTime} and #{params.endCollectTime} @@ -94,7 +94,7 @@ and bmi.monitor_id = #{monitorId} and (bmi.monitor_id = #{monitorSubset} OR bmi.monitor_id IN - (SELECT t.monitor_id FROM base_monitor_info t WHERE FIND_IN_SET(#{monitorSubset}, ancestors))) + (SELECT t.monitor_id FROM base_monitor_info t WHERE dbo.FIND_IN_SET(#{monitorSubset}, ancestors) > 0))