Files
2021-01-12 22:04:24 +08:00

74 lines
2.6 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<Root>
<Transaction code="204064" desc="商户批量回盘清单" log_switch="1">
<DynSentence name="QryBatFil"> <!--获取昨天批次文件-->
<Sentence>
SELECT DISTINCT(MERC_ID) MERC_ID,MERC_NAM FROM CAPDSKINF WHERE AC_DT=?
</Sentence>
<Fields>TXN_DT|</Fields>
</DynSentence>
<FlowCtrl>
<!--Exec func="PUB:InitGWA" /--> <!--交易初始化-->
<Set>AC_DT=$GWA.AC_DT</Set>
<!-- 获取昨天批次文件 -->
<Exec func="PUB:OpenCursor" error="IGNORE">
<Arg name="SqlCmd" value="QryBatFil"/>
</Exec>
<If condition="~RetCod!=0">
<Set>Rsp_Cd=80</Set>
<Set>Rsp_Msg=查询数据库错误</Set>
<Exec func="PUB:CloseCursor" error="IGNORE"/>
<Return/>
</If>
<While>
<Exec func="PUB:FetchCursor" error="IGNORE"/>
<If condition="~RetCod=2">
<Break/>
</If>
<ElseIf condition="~RetCod&lt;0">
<Set>Rsp_Cd=80</Set>
<Set>Rsp_Msg="查询数据库错误"</Set>
<Exec func="PUB:CloseCursor" error="IGNORE"/>
<Return/>
</ElseIf>
<Set>RPT_KND=RPT_MERC_BATCH_FIL_RSP</Set>
<Set>raqname=STRCAT($RPT_KND,-,$MERC_ID,-,$AC_DT,.xls)</Set>
<Set>WORKDIR=GETENV(HWORKDIR)</Set>
<Set>CR_RPT_FILE=STRCAT($WORKDIR,/app/cap/etc/OCAPRPT1/raq/RPT_MERC_BATCH_FIL_RSP.raq)</Set>
<Set>RPTNAME=STRCAT($WORKDIR,/rptdata/,$raqname)</Set>
<Set>RPT_FIL_NM=STRCAT($MERC_NAM,"-批量回盘清单-",FMTDATE($AC_DT,0,5),.xls)</Set>
<Exec func="PUB:GenerateReportNew" error="IGNORE"> <!--报表生成组件-->
<Arg name="RptName" value="$RPTNAME" />
<Arg name="RptFile" value="$CR_RPT_FILE" />
<Arg name="MERC_ID" value="$MERC_ID" />
<Arg name="AC_DT" value="$AC_DT" />
<Arg name="MERC_NAM" value="$MERC_NAM" />
</Exec>
<If condition="~RetCod=-1">
<Set>Rsp_Cd=20499</Set>
<Set>Rsp_Msg=失败</Set>
<Return/>
</If>
<ElseIf condition="~RetCod=0">
<Set>Rsp_Cd=00000</Set>
<Set>Rsp_Msg=成功</Set>
<Set>RPT_TYP=D</Set>
<Quote name="Do_SVRPro"/> <!--插入报表登记表-->
</ElseIf>
</While>
<Set>Rsp_Cd=00000</Set>
<Set>Rsp_Msg=成功</Set>
</FlowCtrl>
</Transaction>
</Root>