|
|
|
@ -35,7 +35,7 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitorSubset != null and monitorSubset != ''">
|
|
|
|
|
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))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fluxFlow != null ">and flux_flow = #{fluxFlow}</if>
|
|
|
|
|
<if test="waterFlow != null ">and water_flow = #{waterFlow}</if>
|
|
|
|
@ -63,7 +63,7 @@
|
|
|
|
|
<if test="monitorId != null and monitorId != ''">and rdi.monitor_id = #{monitorId}</if>
|
|
|
|
|
<if test="monitorSubset != null and monitorSubset != ''">
|
|
|
|
|
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))
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.monitorIdList != null and params.monitorIdList.size > 0">
|
|
|
|
|
and rdi.monitor_id IN
|
|
|
|
@ -74,7 +74,7 @@
|
|
|
|
|
</where>
|
|
|
|
|
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
|
|
|
|
|
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
|
|
|
|
|
where rpd.begin_time between #{params.beginCollectTime} and #{params.endCollectTime}
|
|
|
|
@ -94,7 +94,7 @@
|
|
|
|
|
<if test="monitorId != null and monitorId != ''">and bmi.monitor_id = #{monitorId}</if>
|
|
|
|
|
<if test="monitorSubset != null and monitorSubset != ''">
|
|
|
|
|
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))
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|