70 lines
2.6 KiB
XML
70 lines
2.6 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<Tran>
|
|
<Transaction code="BAT_GETRECEIPT_TIMER" log_switch='1' timeout="3600" desc="获取账户电子回单定时发起">
|
|
<Attributes>
|
|
<Attribute name="nodatabase" value="2"/> <!--数据库长连接-->
|
|
</Attributes>
|
|
|
|
<DynSentence name="QRY_CAPCMBJNLTOT_LST">
|
|
<Sentence>
|
|
SELECT * FROM (
|
|
SELECT ACC_NBR,TRS_DAT FROM CAPCMBJNLTOT WHERE (SND_TM <=?) AND ACC_RPT_STS='1')
|
|
ORDER BY ACC_NBR
|
|
</Sentence>
|
|
<Fields>C_SND_TIME|</Fields>
|
|
</DynSentence>
|
|
<FlowCtrl>
|
|
|
|
<Quote name="Init_CAP01"/> <!--交易初始化-->
|
|
<If condition="ISNULL($SND_TIME_INTERVAL)">
|
|
<Set>SND_TIME_INTERVAL=2</Set>
|
|
</If>
|
|
<Set>C_SND_TIME=CALCTIME(GETDATETIME(MMDDHHMISS),-,m,$SND_TIME_INTERVAL)</Set>
|
|
<Exec func="PUB:OpenCursor" error="IGNORE">
|
|
<Arg name="SqlCmd" value="QRY_CAPCMBJNLTOT_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_CMBRECEIPT</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>
|