Commit f6619b49 by chenhuihui

添加拦截条件

parent f1043f0c
String do_reply191(String reference)
{
//接受从国结发起全额到账103报文返回191报文挡板
log.info("mps record:" + $mps\dir.getValue() + " " + $mps\srcchncod.getValue());
if("<".equals($mps\dir.getValue()))
{
log.info("接收一笔从国结来的103报文.");
log.info("do_reply191 mps record:" + $smpmod\mps\dir.getValue() + " " + $smpmod\mps\srcchncod.getValue());
}
String fileName = Platform.catPath(Platform.getRootPath(), "cfg");
fileName = Platform.catPath(fileName,"rcvsndmsg.properties");
String rootpath = Platform.getPropertyValue(fileName,"rootpath");
String msgFilename = $smpmod\smh\docfil.getValue() + "." + $smpmod\smh\docfxt.getValue();
String bwpath = rootpath + $smpmod\smh\docpth.getValue() + $smpmod\smh\docfil.getValue().substring(0,4) + "/" + msgFilename;
String bwcontent = Platform.loadContent(bwpath, "UTF-8");//读取报文内容
log.info("bwpath:" + bwpath + " " + !Platform.isEmpty(bwcontent) + " " + bwcontent.contains("71A:OUR")+ " " + "<".equals($smpmod\mps\dir.getValue()) );
if(!Platform.isEmpty(bwcontent) && bwcontent.contains("71A:OUR") && "<".equals($smpmod\mps\dir.getValue()))
{
log.info("接收一笔从国结来的103报文.");
String tmp191Path = rootpath + "data/rcvmsg/template/toiss191.sf2";
String targetfilepath = rootpath + "data/rcvmsg/template/";
String targetfilename = "iss191.sf2";
......@@ -18,7 +21,7 @@ String do_reply191(String reference)
log.debug("报文目标路径:" + targetfile);
String content = Platform.loadContent(tmp191Path, "UTF-8");
String ownref = "BW" + Platform.format(Platform.dbCounter("MT191OriginRef"),"00000000");
String ownref = "GJZFQZ" + Platform.format(Platform.dbCounter("MT191OriginRef"),"00000000");
content = content.replace("MT191OriginRef",ownref);
content = content.replace("MT103OriginRef",reference);
log.info("发送国结191报文20场: " + ownref );
......@@ -35,12 +38,11 @@ String do_reply191(String reference)
if(!"ISS0000000".equals(result.get("retcode")))
{
log.info("自动回复191失败! " + reference );
}
else
{
log.info("自动回复191失败! " + reference );
log.info("自动回复191成功 " + reference );
}
}
return "";
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment