Commit f6619b49 by chenhuihui

添加拦截条件

parent f1043f0c
String do_reply191(String reference) String do_reply191(String reference)
{ {
//接受从国结发起全额到账103报文返回191报文挡板 //接受从国结发起全额到账103报文返回191报文挡板
log.info("mps record:" + $mps\dir.getValue() + " " + $mps\srcchncod.getValue()); log.info("do_reply191 mps record:" + $smpmod\mps\dir.getValue() + " " + $smpmod\mps\srcchncod.getValue());
if("<".equals($mps\dir.getValue()))
{
log.info("接收一笔从国结来的103报文.");
}
String fileName = Platform.catPath(Platform.getRootPath(), "cfg"); String fileName = Platform.catPath(Platform.getRootPath(), "cfg");
fileName = Platform.catPath(fileName,"rcvsndmsg.properties"); fileName = Platform.catPath(fileName,"rcvsndmsg.properties");
String rootpath = Platform.getPropertyValue(fileName,"rootpath"); String rootpath = Platform.getPropertyValue(fileName,"rootpath");
String tmp191Path = rootpath + "data/rcvmsg/template/toiss191.sf2"; String msgFilename = $smpmod\smh\docfil.getValue() + "." + $smpmod\smh\docfxt.getValue();
String targetfilepath = rootpath + "data/rcvmsg/template/"; String bwpath = rootpath + $smpmod\smh\docpth.getValue() + $smpmod\smh\docfil.getValue().substring(0,4) + "/" + msgFilename;
String targetfilename = "iss191.sf2"; String bwcontent = Platform.loadContent(bwpath, "UTF-8");//读取报文内容
String targetfile = targetfilepath + targetfilename; log.info("bwpath:" + bwpath + " " + !Platform.isEmpty(bwcontent) + " " + bwcontent.contains("71A:OUR")+ " " + "<".equals($smpmod\mps\dir.getValue()) );
log.debug("报文模板路径:" + tmp191Path); if(!Platform.isEmpty(bwcontent) && bwcontent.contains("71A:OUR") && "<".equals($smpmod\mps\dir.getValue()))
log.debug("报文目标路径:" + targetfile);
String content = Platform.loadContent(tmp191Path, "UTF-8");
String ownref = "BW" + Platform.format(Platform.dbCounter("MT191OriginRef"),"00000000");
content = content.replace("MT191OriginRef",ownref);
content = content.replace("MT103OriginRef",reference);
log.info("发送国结191报文20场: " + ownref );
log.info("接收国结103报文20场: " + reference );
Platform.saveContent(content, targetfile, "UTF-8");
Map data = new HashMap();
data.put("path",targetfilepath);
data.put("filenam",targetfilename);
data.put("interface","replyiss");
data.put("transaction","send");
log.debug("send data:" + data);
Map result = Platform.commonSendDEA(data);
if(!"ISS0000000".equals(result.get("retcode")))
{ {
log.info("自动回复191失败! " + reference ); log.info("接收一笔从国结来的103报文.");
String tmp191Path = rootpath + "data/rcvmsg/template/toiss191.sf2";
String targetfilepath = rootpath + "data/rcvmsg/template/";
String targetfilename = "iss191.sf2";
String targetfile = targetfilepath + targetfilename;
log.debug("报文模板路径:" + tmp191Path);
log.debug("报文目标路径:" + targetfile);
String content = Platform.loadContent(tmp191Path, "UTF-8");
} String ownref = "GJZFQZ" + Platform.format(Platform.dbCounter("MT191OriginRef"),"00000000");
else content = content.replace("MT191OriginRef",ownref);
{ content = content.replace("MT103OriginRef",reference);
log.info("发送国结191报文20场: " + ownref );
log.info("接收国结103报文20场: " + reference );
Platform.saveContent(content, targetfile, "UTF-8");
log.info("自动回复191失败! " + reference ); Map data = new HashMap();
data.put("path",targetfilepath);
data.put("filenam",targetfilename);
data.put("interface","replyiss");
data.put("transaction","send");
log.debug("send data:" + data);
Map result = Platform.commonSendDEA(data);
if(!"ISS0000000".equals(result.get("retcode")))
{
log.info("自动回复191失败! " + reference );
}
else
{
log.info("自动回复191成功 " + reference );
}
} }
return ""; 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