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

97 lines
2.8 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<Root>
<!--统计-->
<!--
必需输入域:
选择输入域:
正常输出域:MSG_TYP|RSP_CD|
出错输出域:RSP_CD|
-->
<Transaction code="statis">
<DynSentence name="query1">
<Sentence>
select MSG_NO from pubsndjnl where not exists (select MSG_NO
from pubsndjnl where STS in ('0','1','3')) group by MSG_NO
</Sentence>
</DynSentence>
<DynSentence name="query2">
<Sentence>
select message,publisher from pubmsgjnl where MSG_NO='%s'
</Sentence>
<Fields>MSG_NO|</Fields>
</DynSentence>
<DynSentence name="query3">
<Sentence>
select Response,RSP_TYP,addr from pubpuber where name='%s'
</Sentence>
<Fields>publisher|</Fields>
</DynSentence>
<DynSentence name="query4">
<Sentence>
select count(*) FalNum from pubsndjnl where MSG_NO='%s' and
STS='4'
</Sentence>
<Fields>MSG_NO|</Fields>
</DynSentence>
<DynSentence name="query5">
<Sentence>
select count(*) SucNum from pubsndjnl where MSG_NO='%s' and
STS='2'
</Sentence>
<Fields>MSG_NO|</Fields>
</DynSentence>
<FlowCtrl>
<Exec func="PUB:OpenCursor" error="IGNORE">
<Arg name="SqlCmd" value="query1" />
</Exec>
<If condition="~RetCod=-1">
<Set>RSP_CD=99004</Set>
<Set>MSG_TYP=E</Set>
<Return />
</If>
<While>
<Exec func="PUB:FetchCursor" error="IGNORE" />
<If condition="~RetCod=100">
<Break />
</If>
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="query2" />
</Exec>
<If condition="~RetCod=2">
<Continue />
</If>
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="query3" />
</Exec>
<If condition="~RetCod=2">
<Continue />
</If>
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="query4" />
</Exec>
<If condition="~RetCod=2">
<Continue />
</If>
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="query5" />
</Exec>
<If condition="~RetCod=2">
<Continue />
</If>
<If
condition="OR(IS_EQUAL_INT($Response,2),IS_EQUAL_INT($Response,3))=1">
<Exec func="PUB:InvokeService" error="IGNORE">
<Arg name="ServiceName" value="$Service" />
<Arg name='Mode' value='ASYNC' />
</Exec>
</If>
<Exec func="PUB:Sleep">
<Arg name="SleepTime" value="1" />
</Exec>
</While>
<Exec func="PUB:CloseCursor" />
</FlowCtrl>
</Transaction>
</Root>