Merge branch 'dev' into sit
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<Tran>
|
||||
<Transaction code="BAT_GET_DISK_RESULT" log_switch='1' desc="获取批量回盘">
|
||||
<Attributes>
|
||||
<Attribute name="nodatabase" value="2"/> <!--数据库长连接-->
|
||||
</Attributes>
|
||||
<Transaction code="BAT_GET_DISK_RESULT" log_switch='1' desc="获取批量回盘">
|
||||
<DynSentence name="QryBatLst">
|
||||
<Sentence>
|
||||
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
|
||||
</Sentence>
|
||||
<Fields>DT_BEFER|DT_BEFER|</Fields>
|
||||
</DynSentence>
|
||||
@@ -44,7 +39,7 @@
|
||||
<Sentence>
|
||||
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
|
||||
</Sentence>
|
||||
<Fields>DSK_NAM|</Fields>
|
||||
</DynSentence>
|
||||
@@ -94,10 +89,12 @@
|
||||
<FlowCtrl>
|
||||
<Quote name="Init_CAP01"/> <!--交易初始化-->
|
||||
<Set>DT_BEFER=CALCDATE(GETDATE(),-,d,7)</Set>
|
||||
|
||||
<Exec func="PUB:ReadRecord" error="IGNORE">
|
||||
<Arg name="SqlCmd" value="QryBatLst"/>
|
||||
</Exec>
|
||||
|
||||
<Exec func="PUB:QueryInGroup" error="IGNORE" desc="查询待处理交易">
|
||||
<Arg name="SqlCmd" value="QryBatLst" /> <!-- SQL -->
|
||||
<Arg name="Limit" value="20" /> <!-- 每页多少行 -->
|
||||
<Arg name="RecordName" value="REC" />
|
||||
</Exec>
|
||||
<If condition="~RetCod=2">
|
||||
<Return/>
|
||||
</If>
|
||||
@@ -106,6 +103,36 @@
|
||||
<Set>Rsp_Msg=查询数据库错误</Set>
|
||||
<Return/>
|
||||
</ElseIf>
|
||||
|
||||
<Set>RecNo=0</Set>
|
||||
<Set>FLG=0</Set>
|
||||
<While condition="INTCMP($RecNo,1,$REC_NUM)">
|
||||
<Set>RecNo=ADD($RecNo,1)</Set>
|
||||
<Set>DSK_NAM=$REC[_$RecNo].DSK_NAM</Set>
|
||||
|
||||
<Exec func="PUB:ReadRecord" error="IGNORE">
|
||||
<Arg name="SqlCmd" value="QRY_CAPDSKINF_DSK_NAM"/>
|
||||
</Exec>
|
||||
<If condition="~RetCod=2">
|
||||
<Continue />
|
||||
</If>
|
||||
<ElseIf condition="~RetCod=0">
|
||||
<Set>FLG=1</Set>
|
||||
<Break/>
|
||||
</ElseIf>
|
||||
<Else>
|
||||
<Set>Rsp_Cd=80</Set>
|
||||
<Set>Rsp_Msg=查询数据库错误</Set>
|
||||
<Return/>
|
||||
</Else>
|
||||
</While>
|
||||
|
||||
<If condition="IS_EQUAL_STRING($FLG,0)">
|
||||
<Set>Rsp_Cd=80</Set>
|
||||
<Set>Rsp_Msg=无需要处理的记录</Set>
|
||||
<Return/>
|
||||
</If>
|
||||
|
||||
<!--获取TOKEN-->
|
||||
<Exec func="PUB:PARAM_GRP_GET" error="IGNORE">
|
||||
<Arg name="ParamNam" value="CAPPARAMTER"/>
|
||||
@@ -121,14 +148,7 @@
|
||||
</Exec>
|
||||
<Set>FIL_TOKEN_URL=$URL.P_VALUES</Set>
|
||||
|
||||
<Exec func="PUB:ReadRecord" error="IGNORE">
|
||||
<Arg name="SqlCmd" value="QRY_CAPDSKINF_DSK_NAM"/>
|
||||
</Exec>
|
||||
<If condition="~RetCod!=0">
|
||||
<Set>Rsp_Cd=80</Set>
|
||||
<Set>Rsp_Msg=批次不存在</Set>
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<!--统计成功笔数、失败笔数,成功金额,失败金额-->
|
||||
<Exec func="PUB:ReadRecord" error="IGNORE">
|
||||
<Arg name="SqlCmd" value="SUM_CAPTXNJNL"/>
|
||||
|
||||
Reference in New Issue
Block a user