From 7804e44eaa803da8d383b2c9ae79994420e3bb51 Mon Sep 17 00:00:00 2001 From: Alawn Date: Thu, 16 Dec 2021 17:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E7=BB=88=E6=80=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cap/etc/batch/BAT_GET_DISK_RESULT_CTL.XML | 64 +++++++++++++++-------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/cap/etc/batch/BAT_GET_DISK_RESULT_CTL.XML b/cap/etc/batch/BAT_GET_DISK_RESULT_CTL.XML index 330c6ad..7b7443a 100644 --- a/cap/etc/batch/BAT_GET_DISK_RESULT_CTL.XML +++ b/cap/etc/batch/BAT_GET_DISK_RESULT_CTL.XML @@ -1,18 +1,13 @@ - - - - + - select DSK_NAM from capdskinf where DSK_NAM in - (select DSK_NAM from (select DSK_NAM, row_number() over (order by RCV_DT||RCV_TM asc) tm from capdskinf where DSK_NAM in - (select DSK_NAM from capdskinf a where dsk_sts = '1' and ord_dt >= ? and (dsk_nam,0) in + select DSK_NAM,RCV_DT||RCV_TM from capdskinf a where dsk_sts = '1' and ord_dt >= ? and (dsk_nam,0) in (select dsk_nam,sum(case when bat_sts not in ('4', '2') then 1 else 0 end) notfinal from capbatinf where ord_dt = a.ord_dt and dsk_nam = a.DSK_NAM group by dsk_nam having sum(case when bat_sts not in ('4', '2') then 1 else 0 end) = 0) - union all select DSK_NAM from CAPDSKINF a where a.dsk_sts = '9' and ORD_DT >= ?)) where tm = 1) - for update skip locked + union all select DSK_NAM ,RCV_DT||RCV_TM from CAPDSKINF a where a.dsk_sts = '9' and ORD_DT >= ? + order by 2 asc DT_BEFER|DT_BEFER| @@ -44,7 +39,7 @@ SELECT DSK_NO,DSK_STS,ORD_DT,END_DT,END_TM ,ORN_CNT ,ORN_AMT,SUC_CNT,SUC_AMT,FAL_CNT,FAL_AMT, FILE_ID_RESULT,MD5_RESULT,CUSTOMER_ID,DISK_DESC DISK_MESSAGE,TM_SMP FROM CAPDSKINF - WHERE DSK_NAM = ? + WHERE dsk_sts in ('1','9') and DSK_NAM = ? for update skip locked DSK_NAM| @@ -94,10 +89,12 @@ DT_BEFER=CALCDATE(GETDATE(),-,d,7) - - - - + + + + + + @@ -106,6 +103,36 @@ Rsp_Msg=查询数据库错误 + + RecNo=0 + FLG=0 + + RecNo=ADD($RecNo,1) + DSK_NAM=$REC[_$RecNo].DSK_NAM + + + + + + + + + FLG=1 + + + + Rsp_Cd=80 + Rsp_Msg=查询数据库错误 + + + + + + Rsp_Cd=80 + Rsp_Msg=无需要处理的记录 + + + @@ -121,14 +148,7 @@ FIL_TOKEN_URL=$URL.P_VALUES - - - - - Rsp_Cd=80 - Rsp_Msg=批次不存在 - - +