Commit 1bae9923 by qianyuheng

功能迁移代码整理

parent d3da9046
<?xml version="1.0" encoding="UTF-8"?>
<eibs:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:eibs="http://eibs.brilliance.com"
name="mdtp" table="mdtp" transient="true" i18nSequence="151" ruleSequence="22">
name="mdtp" table="mdtp" transient="true" i18nSequence="154" ruleSequence="22">
<datafields name="rtnbtn" column="rtnbtn" description="返回" datatype="control" viewtype="Button"/>
<datafields name="resend" column="resend" description="重新发送" datatype="control"
viewtype="Button"/>
......@@ -8,6 +8,14 @@
length="1"/>
<datafields name="presmhinr" column="presmhinr" description="转发前原报文smhinr"/>
<datafields name="test" column="test" datatype="control" viewtype="Button"/>
<datafields name="newmsg" column="newmsg" description="转换的报文信息" datatype="block"
viewtype="Block"/>
<datafields name="mt2mx" column="mt2mx" description="MT\MX Exchange" datatype="control"
viewtype="Button"/>
<datafields name="mx2cips" column="mx2cips" description="MX\CIPS Exchange" datatype="control"
viewtype="Button"/>
<datafields name="mt2cips" column="mt2cips" description="MT\CIPS Exchange" datatype="control"
viewtype="Button"/>
<modules name="msggrp" type="msggrp" argument="true"/>
<modules name="mdtmod" type="mdtmod"/>
<panels name="msgdtlp" description="PD000000" width="1200" height="600" layout="BorderLayout">
......@@ -52,24 +60,38 @@
<components path="mdtmod\hisbtn" viewType="Button" width="75" text="BT000058"
left="34" top="243" height="21" rowHeight="0"/>
<components path="mdtmod\rtnbtn" viewType="Button" width="75" text="BT000059"
left="34" top="362" height="21" rowHeight="0"/>
left="34" top="442" height="21" rowHeight="0"/>
<components path="shwpremsg" viewType="Checkbox" width="126" text="FD000146" left="20"
top="420" height="21"/>
top="480" height="21"/>
<components path="mdtmod\lodpdf" viewType="Download" width="75" text="FD000148"
left="34" top="303" height="21" rowHeight="0"/>
left="34" top="283" height="21" rowHeight="0"/>
<components path="mdtmod\translate" viewType="Button" width="75" text="BT000149"
left="34" top="140" height="21" rowHeight="0"/>
<components path="mdtmod\handle" viewType="Button" width="75" text="BT000150"
left="34" top="220" height="21" rowHeight="0"/>
<components path="mt2mx" viewType="Button" width="75" text="BT000151" left="40"
top="320" height="21"/>
<components path="mx2cips" viewType="Button" width="75" text="BT000152" left="40"
top="360" height="21"/>
<components path="mt2cips" viewType="Button" width="75" text="BT000153" left="40"
top="400" height="21"/>
</panels>
<panels name="newmsgdtl" description="PD000149" width="800" height="600" popup="true">
<components path="newmsg" viewType="Label" widthUnit="%" enabled="false" left="0"
leftUnit="%" top="4" topUnit="%" height="100" heightUnit="%" rowHeight="0"/>
</panels>
<localMethods name="expansion" type="local" codeText="@0007" moduleName="mdtp"/>
<localMethods name="getTagLst" type="local" codeText="@0008" moduleName="mdtp"/>
<localMethods name="getSwfMsg" type="local" codeText="@0009" moduleName="mdtp"/>
<localMethods name="setrPresmhinr" type="local" codeText="@0021" moduleName="mdtp"/>
<localMethods name="msgConvert" type="local" codeText="@0025" moduleName="mdtp"/>
<initRules name="\" type="init" codeText="@0016" order="300" moduleName="mdtp"/>
<initRules name="\" type="init" codeText="@0019" order="400" moduleName="mdtp"/>
<eventRules name="rtnbtn" type="event" codeText="@0000" moduleName="mdtp"/>
<eventRules name="resend" type="event" codeText="@0018" moduleName="mdtp"/>
<eventRules name="shwpremsg" type="event" eventType="onChange" codeText="@0020"
moduleName="mdtp"/>
<eventRules name="mt2mx" type="event" codeText="@0023" moduleName="mdtp"/>
<eventRules name="mx2cips" type="event" codeText="@0024" moduleName="mdtp"/>
<eventRules name="mt2cips" type="event" codeText="@0026" moduleName="mdtp"/>
</eibs:Module>
#Thu Feb 09 14:27:56 CST 2023
#Thu Mar 28 10:18:20 CST 2024
PD000040=\u7FFB\u8BD1\u7535\u62A5\u7801\u5F39\u51FA\u9875\u9762
TT000012=
TT000011=
......@@ -80,6 +80,7 @@ FD000146=\u663E\u793A\u8F6C\u53D1\u524D\u539F\u62A5
CT000113=\u72B6\u6001\u4E0D\u4E3A\u5F02\u5E38,\u4E0D\u53EF\u91CD\u65B0\u53D1\u9001.
CT000112=\u63D0\u793A
CT000111=\u4FEE\u6539\u8BB0\u5F55\u72B6\u6001\u5F02\u5E38,\u91CD\u65B0\u53D1\u9001\u5931\u8D25.
PD000149=Message Transverter page
CT000079=\u72B6\u6001\u4E0D\u4E3A\u5F02\u5E38,\u4E0D\u53EF\u91CD\u65B0\u53D1\u9001.
CT000110=\u63D0\u793A
CT000078=\u63D0\u793A
......@@ -138,6 +139,9 @@ TT000048=
CT000031=\u7535\u62A5\u7801\u683C\u5F0F\u9519\u8BEF
CT000030=\u8B66\u544A
TT000046=
BT000153=MT<->CIPS
BT000152=MX<->CIPS
BT000151=MT<->MX
BT000150=\u786E\u8BA4\u5904\u7406
CT000029=\u7535\u62A5\u7801\u683C\u5F0F\u9519\u8BEF
CT000028=\u8B66\u544A
......
<?xml version="1.0" encoding="UTF-8"?>
<eibs:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:eibs="http://eibs.brilliance.com"
name="qfgzgl" table="qfgzgl" title="清分规则管理" i18nSequence="1" ruleSequence="1">
<datafields name="eurl" column="eurl" description="链接" viewtype="HTML"/>
<modules name="sysmod" type="sysmod"/>
<panels name="mainp" description="PD000000" width="800" height="600">
<components path="eurl" viewType="HTML" widthUnit="%" left="0" top="0" height="100"
heightUnit="%" rowHeight="0"/>
</panels>
<initRules name="\" type="init" codeText="@0000" moduleName="qfgzgl"/>
<mainPanels>\mainp</mainPanels>
</eibs:Module>
#rootpath=/NAS_IPS/NAS_MSG
rootpath=D:/Users/19025/weiwenqiang/NAS_IPS
rootpath=/home/ips/Be_Dea_QZ/cfg/mnbw/
datapath=data/rcvmsg
elcsdatapath=data/rcvmsg
\ No newline at end of file
......@@ -525,3 +525,4 @@ menu.emebnk=\u91D1\u878D\u673A\u6784\u6C47\u6B3E\u62A5\u6587\u53D1\u9001
menu.cpschksel=\u5BF9\u8D26\u7ED3\u679C\u67E5\u8BE2
menu.ccssel=CIPS\u9519\u8D26\u67E5\u8BE2
menu.chssel=\u6838\u5FC3\u9519\u8D26\u67E5\u8BE2
menu.qfgzgl=\u0053\u006f\u0072\u0074\u0069\u006e\u0067\u0020\u0072\u0075\u006c\u0065\u0020\u006d\u0061\u006e\u0061\u0067\u0065\u006d\u0065\u006e\u0074
......@@ -523,3 +523,4 @@ menu.emebnk=\u91D1\u878D\u673A\u6784\u6C47\u6B3E\u62A5\u6587\u53D1\u9001
menu.cpschksel=\u5BF9\u8D26\u7ED3\u679C\u67E5\u8BE2
menu.ccssel=CIPS\u9519\u8D26\u67E5\u8BE2
menu.chssel=\u6838\u5FC3\u9519\u8D26\u67E5\u8BE2
menu.qfgzgl=\u0053\u006f\u0072\u0074\u0069\u006e\u0067\u0020\u0072\u0075\u006c\u0065\u0020\u006d\u0061\u006e\u0061\u0067\u0065\u006d\u0065\u006e\u0074
......@@ -523,3 +523,4 @@ menu.emebnk=\u91D1\u878D\u673A\u6784\u6C47\u6B3E\u62A5\u6587\u53D1\u9001
menu.cpschksel=\u5BF9\u8D26\u7ED3\u679C\u67E5\u8BE2
menu.ccssel=CIPS\u9519\u8D26\u67E5\u8BE2
menu.chssel=\u6838\u5FC3\u9519\u8D26\u67E5\u8BE2
menu.qfgzgl=\u0053\u006f\u0072\u0074\u0069\u006e\u0067\u0020\u0072\u0075\u006c\u0065\u0020\u006d\u0061\u006e\u0061\u0067\u0065\u006d\u0065\u006e\u0074
......@@ -13,8 +13,8 @@ event $mtabut\sel
if(Platform.isEmpty($recp\extkey) || $recp\extkey.getValue().length() <4)
{
Platform.message(#CT000174,#CT000175);
return;
//Platform.message(#CT000174,#CT000175);
//return;
}
else
{
......
......@@ -26,7 +26,7 @@ void initMdt(String smhinr)
{
log.debug("path is not null..");
String msg = getSwfMsg(path);
if("cps".contains($smh\docfxt.getValue()) && (!"mx".equals($smpmod\mpi\msgtyp.getValue())))
if("cps|xml".contains($smh\docfxt.getValue()) && (!"mx".equals($smpmod\mpi\msgtyp.getValue())))
{
msg = null;
msg = getCipsMsg(path);
......
init $\ order 300
{
$mdtmod.initMdt($msggrp\smh\inr.getValue());
if("xml".equals($mdtmod\smh\docfxt.getValue()))
{
Platform.visible($mt2cips);
Platform.visible($mx2cips);
Platform.invisible($mt2mx);
Platform.disable($mt2mx);
}
if("sf2".equals($mdtmod\smh\docfxt.getValue()))
{
Platform.visible($mt2cips);
Platform.invisible($mx2cips);
Platform.disable($mx2cips);
Platform.visible($mt2mx);
}
if("iso".equals($mdtmod\smh\docfxt.getValue()))
{
Platform.invisible($mt2cips);
Platform.disable($mt2cips);
Platform.visible($mx2cips);
Platform.visible($mt2mx);
}
}
\ No newline at end of file
event $transform
{
log.info("Starting transform message......");
log.info("文件类型:" + $mdtmod\smh\docfxt.getValue());
if(!"xml".equals($mdtmod\smh\docfxt.getValue()) && !"sf2".equals($mdtmod\smh\docfxt.getValue()))
{
log.error("非法报文类型!");
Platform.message("E0010","只支持MT,CIPS报文转换");
return ;
}
Platform.clear($newmsg);
String message = $mdtmod\msgdtl.getValue();
log.info("message="+message+"...");
String errinf = "报文为空,转换失败!";
com.brilliance.constant.TranslationReport translationReport = null;
if(!Platform.isEmpty($mdtmod\smh\docfil) )
{
try
{
if("cips|xml".contains($mdtmod\smh\docfxt.getValue().toLowerCase() ))
{
log.info("开始处理cips xml报文");
translationReport = com.brilliance.util.TransferUtil.cips2Mt(message,"", new HashMap());
}
else if("mt|sf2".contains($mdtmod\smh\docfxt.getValue().toLowerCase() ))
{
log.info("开始处理mt sf2报文");
Map<String, Object> map = new HashMap<String, Object>();
map.put(com.brilliance.mt2cips.Mt2CipsContextIdentifier.CIPS_MSG_ID, "msgid");
translationReport = com.brilliance.util.TransferUtil.mt2Cips(message,null,map);
}
if(!translationReport.isSuccess())
{
log.error("transError="+translationReport.getTranslationResult());
errinf =translationReport.getTranslationResult();
}
log.debug("mt message="+translationReport.getMessage());
}
catch(org.dom4j.DocumentException docexp)
{
log.error("解析失败!");
errinf =#CT000169;
}
$newmsg = translationReport.getMessage();
Platform.setModified($newmsg);
}
if(!Platform.isEmpty($newmsg))
{
log.info("正常处理报文转换");
Platform.visible($newmsg);
Platform.setModified($newmsg);
//Platform.invisible($mdtmod\msgdtl);
Platform.popup($newmsgdtl);
}
else
{
Platform.message("E0011",errinf);
}
log.info("end transform message nomorly!");
}
\ No newline at end of file
event $mt2mx
{
log.info("Starting transform message......");
log.info("文件类型:" + $mdtmod\smh\docfxt.getValue());
Platform.clear($newmsg);
String targetType = "mx";
String sourceType = "mt";
if("iso".equals($mdtmod\smh\docfxt.getValue()))
{
sourceType = "mx";
targetType = "mt";
}
String errinf = $this.msgConvert($mdtmod\msgdtl.getValue(),sourceType,targetType);
if(!Platform.isEmpty($newmsg))
{
log.info("正常处理报文转换");
Platform.visible($newmsg);
Platform.popup($newmsgdtl);
}
else
{
if("00000".equals(errinf))
Platform.message("E0011","Convert Fail.");
else
Platform.message(#CT000183,errinf);
}
log.info("end transform message nomorly!");
}
\ No newline at end of file
event $mx2cips
{
log.info("Starting transform message......");
log.info("文件类型:" + $mdtmod\smh\docfxt.getValue());
Platform.clear($newmsg);
String targetType = "mx";
String sourceType = "xml";
if("iso".equals($mdtmod\smh\docfxt.getValue()))
{
sourceType = "mx";
targetType = "xml";
}
String errinf = $this.msgConvert($mdtmod\msgdtl.getValue(),sourceType,targetType);
if(!Platform.isEmpty($newmsg))
{
log.info("正常处理报文转换");
Platform.visible($newmsg);
Platform.popup($newmsgdtl);
}
else
{
if("00000".equals(errinf))
Platform.message("E0011","Convert Fail.");
else
Platform.message(#CT000182,errinf);
}
log.info("end transform message nomorly!");
}
\ No newline at end of file
String msgConvert(String content,String sourceType,String targetType)
{
if(Platform.isEmpty(content) || Platform.isEmpty(sourceType) || Platform.isEmpty(targetType))
{
log.error("报文转换参数非法!");
return "E0001";
}
String errinf = "00000";
com.brilliance.constant.TranslationReport translationReport = null;
com.brilliance.swift.vo.SwiftTranslationReport swiftTranslationReport = null;
Map<String, Object> map = new HashMap<String, Object>();
String type = sourceType.toLowerCase() + "2" + targetType.toLowerCase();
log.debug("convert type:" + type);
log.debug("Message Content ->[" + content + "].");
try
{
switch(type)
{
//MT转CIPS
case "mt2xml":
map.put(com.brilliance.mt2cips.Mt2CipsContextIdentifier.CIPS_MSG_ID, "msgid");
translationReport = com.brilliance.util.TransferUtil.mt2Cips(content,null,map);
$newmsg = translationReport.getMessage();
errinf = translationReport.getTranslationResult();
break;
//CIPS转MT
case "xml2mt":
translationReport = com.brilliance.util.TransferUtil.cips2Mt(content,"", new HashMap());
$newmsg = translationReport.getMessage();
log.debug("mt message="+translationReport.getMessage());
errinf = translationReport.getTranslationResult();
break;
//MX转MT
case "mx2mt":
swiftTranslationReport = com.brilliance.swift.SwiftTransfer.mx2MtPlus(content, "", new HashMap());
$newmsg = swiftTranslationReport.getMessage();
errinf = swiftTranslationReport.getTranslationResult();
break;
//MT转MX
case "mt2mx":
swiftTranslationReport = com.brilliance.swift.SwiftTransfer.mt2MxPlus(content, "", new HashMap());
$newmsg = swiftTranslationReport.getMessage();
errinf = swiftTranslationReport.getTranslationResult();
break;
//CIPS转MX
case "xml2mx":
translationReport = com.brilliance.util.TransferUtil.cips2Mt(content,"", new HashMap());
content = translationReport.getMessage();
swiftTranslationReport = com.brilliance.swift.SwiftTransfer.mt2MxPlus(content, "", new HashMap());
$newmsg = swiftTranslationReport.getMessage();
errinf = swiftTranslationReport.getTranslationResult();
break;
//MX转CIPS
case "mx2xml":
swiftTranslationReport = com.brilliance.swift.SwiftTransfer.mx2MtPlus(content, "", new HashMap());
content = swiftTranslationReport.getMessage();
map.put(com.brilliance.mt2cips.Mt2CipsContextIdentifier.CIPS_MSG_ID, "msgid");
translationReport = com.brilliance.util.TransferUtil.mt2Cips(content,null,map);
$newmsg = translationReport.getMessage();
errinf = translationReport.getTranslationResult();
break;
}
log.debug("error information:" + errinf);
log.debug("Convert Message Content ->[" + $newmsg.getValue() + "].");
Platform.setModified($newmsg);
}
catch(org.dom4j.DocumentException docexp)
{
log.error("解析失败!");
errinf =#CT000178;
}
return errinf;
}
\ No newline at end of file
event $mt2cips
{
log.info("Starting transform message......");
log.info("文件类型:" + $mdtmod\smh\docfxt.getValue());
Platform.clear($newmsg);
String targetType = "xml";
String sourceType = "mt";
if("xml".equals($mdtmod\smh\docfxt.getValue()))
{
sourceType = "xml";
targetType = "mt";
}
String errinf = $this.msgConvert($mdtmod\msgdtl.getValue(),sourceType,targetType);
if(!Platform.isEmpty($newmsg))
{
log.info("正常处理报文转换");
Platform.visible($newmsg);
Platform.popup($newmsgdtl);
}
else
{
if("00000".equals(errinf))
Platform.message("E0011","Convert Fail.");
else
Platform.message(#CT000185,errinf);
}
log.info("end transform message nomorly!");
}
\ No newline at end of file
......@@ -13,5 +13,6 @@ init $\
return;
}
$eurl ="../swifteditor#/home/"+Platform.getLoginUser();
// $eurl ="../swifteditor#/home/"+Platform.getLoginUser();
$eurl ="../swifteditor#/entry/"+Platform.getLoginUser();
}
\ No newline at end of file
init $\
{
$eurl ="../rules/index.html";
}
\ No newline at end of file
......@@ -97,8 +97,9 @@ init $\
//$msgtyp = "sf2";//L改动
List<CodetableItem> lst = new ArrayList<CodetableItem>();
lst.add(new CodetableItem("MT","sf2"));
lst.add(new CodetableItem("MX","iso"));
//lst.add(new CodetableItem("FMT","txt"));
lst.add(new CodetableItem("CIPS","cps"));
lst.add(new CodetableItem("CIPS","xml"));
Platform.setValues($msgtyp,lst);
$msgtyp = "sf2";
//Platform.disable($msgtyp);
......
......@@ -22,7 +22,7 @@ check $msgtyp
Platform.clear($gpi);
Platform.setModified($gpi);
}
else if("cps".equals($msgtyp.getValue()))
else if("xml".equals($msgtyp.getValue()))
{
Platform.setValues($subtyp,getCipsList());
Platform.setModified($subtyp);
......@@ -34,7 +34,7 @@ check $msgtyp
Platform.clear($gpi);
Platform.setModified($gpi);
}
else if("mx".equals($msgtyp.getValue()))
else if("iso".equals($msgtyp.getValue()))
{
Platform.disable($subtyp);
Platform.clear($subtyp);
......
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