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

96 lines
3.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version='1.0' encoding='UTF-8'?>
<Application name="CAP" trace="yes">
<!-- 接收银联对账通知,并转发文件服务器下载-->
<Transaction code="204040" log_switch="1" desc="银联对账通知">
<Function name="_after">
<Process>
<Exec func="PUB:DumpMsg"/>
<!-- 解锁处理 -->
<Exec func="PUB:UnLock">
<Arg name="RecKey" value="$CK_LOCK" />
</Exec>
</Process>
</Function>
<!--查询对账总控表是否有重复数据-->
<DynSentence name="CHK_PWMTCKCT">
<Sentence>
SELECT 'Y'
FROM PWMTCKCT
WHERE
RUT_CORG='EBPP'
AND COP_BUS_TYP IN ('11','13')
AND CHK_FIL_DT=?
AND ROWNUM= 1
</Sentence>
<Fields>CHK_FIL_DT|</Fields>
</DynSentence>
<FlowCtrl>
<!--交易初始化-->
<Exec func="PUB:InitGWA" error="IGNORE"/>
<If condition="~RetCod!=0">
<Exit/>
</If>
<!--取当前会计日期前一天为对账日期-->
<Set>CHK_FIL_DT=CALCDATE($GWA.AC_DT,-,d,1)</Set>
<!--Set>y=SUBSTR($AC_DT1,1,4)</Set>
<Set>m=SUBSTR($AC_DT1,5,2)</Set>
<If condition="IS_EQUAL_STRING($m,01)">
<Set>m=13</Set>
<Set>y=SUB(y,1)</Set>
</If>
<If condition="IS_EQUAL_STRING($m,02)">
<Set>m=14</Set>
<Set>y=SUB(y,1)</Set>
</If>
<Set>d=SUBSTR($AC_DT1,7,2)</Set>
<Set>dd=MOD(SUB(ADD($d,MUL(2,$m),DIV(MUL(3,ADD($m,1)),5),$y,DIV($y,4),DIV($y,400),1),DIV($y,100)),7)</Set>
<Set>MSG_CD=STRCAT("星期",$dd)</Set>
<Return/-->
<!-- 判断对账总控表中是否存在现数据重复记录,如果存在不允许继续执行对账 -->
<!--Set>CHK_FIL_DT=CALCDATE($CHK_FIL_DT,-,d,1)</Set-->
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="CHK_PWMTCKCT" />
</Exec>
<If condition="~RetCod=0"><!-- @msg 对账文件之前已存在 -->
<Exec func="PUB:GWASetMsg">
<Arg name="MsgCd" value="PWM90006" />
</Exec>
<Return/>
</If>
<ElseIf condition="~RetCod=-1"><!-- @msg 系统错误-->
<Exec func="PUB:GWASetMsg">
<Arg name="MsgCd" value="PWM90007" />
</Exec>
<Return/>
</ElseIf>
<Exec func="PUB:CallThirdService">
<Arg name="HTxnCd" value="204041" />
<Arg name="ObjSvr" value="OCAPCHK1" />
</Exec>
<If condition="~RetCod=0" >
<If condition="NOT(IS_SUCC($GWA.MSG_CD))">
<Exec func="PUB:GWASetMsg">
<Arg name="MsgCd" value="$GWA.MSG_CD"/>
</Exec>
<Return/>
</If>
</If>
<Exec func="PUB:GWASetMsg">
<Arg name="MsgCd" value="PWM00000" />
</Exec>
</FlowCtrl>
</Transaction>
</Application>