From e00ea1a642c78781447894881d8ec4033c44a5eb Mon Sep 17 00:00:00 2001 From: chenxiwang <1520264117@qq.com> Date: Tue, 20 Aug 2024 16:34:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8D=86=E6=A5=9A=E6=B0=B4?= =?UTF-8?q?=E5=BA=93=E9=9B=A8=E9=87=8F=E5=AE=9E=E6=97=B6=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/StPptnRRealMapper.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/StPptnRRealMapper.xml b/src/main/resources/mapper/StPptnRRealMapper.xml index fe23e4d..2f6a5a5 100644 --- a/src/main/resources/mapper/StPptnRRealMapper.xml +++ b/src/main/resources/mapper/StPptnRRealMapper.xml @@ -10,9 +10,12 @@ (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN (date_trunc('day', t1.tm) + interval '8 hour') AND (date_trunc('day', t1.tm) + interval '1 day' - interval '1 second')) today, (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '10 min' and t1.tm) m10, (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '30 min' and t1.tm) m30, - (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '1 hour' and t1.tm) h1, - (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '3 hour' and t1.tm) h3, - (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '6 hour' and t1.tm) h6, + (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '1 hour' and t1.tm) h1, + (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '3 hour' and t1.tm) h3, + (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '6 hour' and t1.tm) h6, + (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '12 hour' and t1.tm) h12, + (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '24 hour' and t1.tm) h24, + (select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '48 hour' and t1.tm) h48, CURRENT_TIMESTAMP chtm from st_pptn_r t1 where exists(select 1 from m1 t2 where t2.stcd=t1.stcd and t2.tmx=t1.tm) and stcd = #{stcd} )