70 lines
2.6 KiB
XML
70 lines
2.6 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<Tran>
|
|
<Transaction code="BAT_GETBILL_TIMER" log_switch='1' timeout="3600" desc="获取明细对账单定时发起">
|
|
<Attributes>
|
|
<Attribute name="nodatabase" value="2"/> <!--数据库长连接-->
|
|
</Attributes>
|
|
|
|
<DynSentence name="QRY_CAPCMBHIJNL_LST">
|
|
<Sentence>
|
|
SELECT * FROM (
|
|
SELECT ACC_NBR,TRS_DAT FROM CAPCMBHIJNL WHERE BIL_RPT_STS='1' AND TRS_DAT >=? GROUP BY ACC_NBR,TRS_DAT)
|
|
ORDER BY TRS_DAT,ACC_NBR
|
|
</Sentence>
|
|
<Fields>CHECK_DATE|</Fields>
|
|
</DynSentence>
|
|
<FlowCtrl>
|
|
|
|
<Quote name="Init_CAP01"/> <!--交易初始化-->
|
|
<If condition="ISNULL($CHECK_DATE)">
|
|
<Set>CHECK_DATE=CALCDATE(GETDATE(),-,d,5)</Set>
|
|
</If>
|
|
|
|
<Exec func="PUB:OpenCursor" error="IGNORE">
|
|
<Arg name="SqlCmd" value="QRY_CAPCMBHIJNL_LST"/>
|
|
<Arg name="CursorName" value="CURSOR_1"/>
|
|
</Exec>
|
|
<If condition="~RetCod=-1">
|
|
<Set>Rsp_Cd=80</Set>
|
|
<Set>Rsp_Msg=数据库错误</Set>
|
|
<Return/>
|
|
</If>
|
|
<While>
|
|
<Exec func="PUB:FetchCursor" error="IGNORE">
|
|
<Arg name="CursorName" value="CURSOR_1"/>
|
|
</Exec>
|
|
<If condition="~RetCod=2">
|
|
<Exec func="PUB:CloseCursor" error="IGNORE"> <!-- 关闭游标 -->
|
|
<Arg name="CursorName" value="CURSOR_1"/>
|
|
</Exec>
|
|
<Break/>
|
|
</If>
|
|
<ElseIf condition="~RetCod!=0">
|
|
<Set>Rsp_Cd=80</Set>
|
|
<Set>Rsp_Msg=循环游标失败</Set>
|
|
<Return/>
|
|
</ElseIf>
|
|
<Set>TTXN_CD=GET_CMBBILL</Set>
|
|
|
|
<Exec func="PUB:CallThirdService" error="IGNORE">
|
|
<Arg name="HTxnCd" value="$TTXN_CD" />
|
|
<Arg name="ObjSvr" value="OFRTCAP3" />
|
|
<Arg name="In" value="ACC_NBR|TRS_DAT|" />
|
|
</Exec>
|
|
<If condition="~RetCod!=0">
|
|
<Set>Rsp_Cd=80</Set>
|
|
<Set>Rsp_Msg=发送批次失败</Set>
|
|
<Return/>
|
|
</If>
|
|
</While>
|
|
<Exec func="PUB:CloseCursor" error="IGNORE"> <!-- 关闭游标 -->
|
|
<Arg name="CursorName" value="CURSOR_1"/>
|
|
</Exec>
|
|
<Exec func="PUB:CommitWork"/>
|
|
|
|
<Set>Rsp_Cd=00</Set>
|
|
<Set>Rsp_Msg=交易成功</Set>
|
|
</FlowCtrl>
|
|
</Transaction>
|
|
</Tran>
|