Commit 88e77e97 by chengzhuoshen

提交MT202 MT202cov测试代码

parent c0a02b71
......@@ -107,10 +107,4 @@ public class Mx2MtCreateManager {
throw new SwiftException("Invalid message type");
}
}
public static void main(String[] args) throws Exception {
Mx2MtCreateManager mx2MtCreateManager = new Mx2MtCreateManager();
String mt950 = mx2MtCreateManager.mx2mt(new File("f:/test/MxPacs00900102.xml"),
"f:/test/MT202.txt");
System.out.println(mt950);
}
}
......@@ -14,7 +14,7 @@
</InstgRmbrsmntAgt>
<InstdRmbrsmntAgt>
<FinInstnId>
<BIC>BJWHS12X</BIC>
<BIC>QWERASDF</BIC>
<Nm>NUM123</Nm>
</FinInstnId>
</InstdRmbrsmntAgt>
......@@ -44,7 +44,7 @@
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BIC>77777777777</BIC>
<BIC>88888888</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
......@@ -56,108 +56,6 @@
</InstdAgt>
</GrpHdr>
<CdtTrfTxInf>
<UndrlygCstmrCdtTrf>
<Dbtr>
<Nm>nm01</Nm>
<PstlAdr>
<AdrLine>ade456</AdrLine>
</PstlAdr>
<Id>
<OrgId>
<AnyBIC>anybic01</AnyBIC>
</OrgId>
</Id>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>adr789</AdrLine>
</PstlAdr>
<Nm>nm333333</Nm>
</FinInstnId>
</DbtrAgt>
<IntrmyAgt1>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
<Nm>nm333333</Nm>
<ClrSysMmbId>
<MmbId>mmbid01</MmbId>
<ClrSysId>
<Cd>cd02</Cd>
<Prtry>prtry01</Prtry>
</ClrSysId>
</ClrSysMmbId>
</FinInstnId>
</IntrmyAgt1>
<CdtrAgtAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</CdtrAgtAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>mmbid01</MmbId>
<ClrSysId>
<Cd>cd02</Cd>
<Prtry>prtry01</Prtry>
</ClrSysId>
</ClrSysMmbId>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
<BIC>88888888</BIC>
<Nm>uiopp</Nm>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm>33333333</Nm>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
</PstlAdr>
<Id>
<OrgId>
<AnyBIC>anybic01</AnyBIC>
</OrgId>
</Id>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</CdtrAcct>
<RmtInf>
<Ustrd>1111</Ustrd>
</RmtInf>
<InstdAmt Ccy="USD">393.17</InstdAmt>
</UndrlygCstmrCdtTrf>
<PrvsInstgAgt>
<FinInstnId>
<BIC>5555555</BIC>
......@@ -197,14 +95,14 @@
<PmtId>
<EndToEndId>end456</EndToEndId>
</PmtId>
<IntrBkSttlmAmt Ccy="USD">120274.34</IntrBkSttlmAmt>
<IntrBkSttlmAmt Ccy="USD">120274</IntrBkSttlmAmt>
<IntrBkSttlmDt>2022-04-02+08:00</IntrBkSttlmDt>
<SttlmTmIndctn>
<DbtDtTm>2022-04-02T13:35:04.807+08:00</DbtDtTm>
<CdtDtTm>2022-04-02T13:35:04.807+08:00</CdtDtTm>
<CdtDtTm>2022-04-04T17:15:04.807+08:00</CdtDtTm>
</SttlmTmIndctn>
<SttlmTmReq>
<CLSTm>13:35:04.807+08:00</CLSTm>
<CLSTm>09:27:09.707+08:00</CLSTm>
</SttlmTmReq>
<IntrmyAgt1>
<FinInstnId>
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.02">
<FinInstnCdtTrf>
<GrpHdr>
<MsgId>00010013800002001234</MsgId>
<CreDtTm>2022-04-02T13:35:04.807+08:00</CreDtTm>
<NbOfTxs>EODY</NbOfTxs>
<SttlmInf>
<InstgRmbrsmntAgt>
<FinInstnId>
<BIC>BJWHS12X</BIC>
<Nm>NUM123</Nm>
</FinInstnId>
</InstgRmbrsmntAgt>
<InstdRmbrsmntAgt>
<FinInstnId>
<BIC>BJWHS12X</BIC>
<Nm>NUM123</Nm>
</FinInstnId>
</InstdRmbrsmntAgt>
<InstdRmbrsmntAgtAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</InstdRmbrsmntAgtAcct>
</SttlmInf>
<InstgAgt>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
</FinInstnId>
</InstdAgt>
</GrpHdr>
<CdtTrfTxInf>
<UndrlygCstmrCdtTrf>
<Dbtr>
<Nm>nm01</Nm>
<PstlAdr>
<AdrLine>ade456</AdrLine>
</PstlAdr>
<Id>
<OrgId>
<AnyBIC>anybic01</AnyBIC>
</OrgId>
</Id>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>adr789</AdrLine>
</PstlAdr>
<Nm>nm333333</Nm>
</FinInstnId>
</DbtrAgt>
<IntrmyAgt1>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
<Nm>nm333333</Nm>
<ClrSysMmbId>
<MmbId>mmbid01</MmbId>
<ClrSysId>
<Cd>cd02</Cd>
<Prtry>prtry01</Prtry>
</ClrSysId>
</ClrSysMmbId>
</FinInstnId>
</IntrmyAgt1>
<CdtrAgtAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</CdtrAgtAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>mmbid01</MmbId>
<ClrSysId>
<Cd>cd02</Cd>
<Prtry>prtry01</Prtry>
</ClrSysId>
</ClrSysMmbId>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
<BIC>88888888</BIC>
<Nm>uiopp</Nm>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm>33333333</Nm>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
</PstlAdr>
<Id>
<OrgId>
<AnyBIC>anybic01</AnyBIC>
</OrgId>
</Id>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</CdtrAcct>
<RmtInf>
<Ustrd>1111</Ustrd>
</RmtInf>
<InstdAmt Ccy="USD">393.17</InstdAmt>
</UndrlygCstmrCdtTrf>
<PrvsInstgAgt>
<FinInstnId>
<BIC>5555555</BIC>
<Nm>33333333</Nm>
</FinInstnId>
</PrvsInstgAgt>
<Cdtr>
<FinInstnId>
<BIC>9999999</BIC>
</FinInstnId>
<Nm>33333333</Nm>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
</PstlAdr>
<Id>
<OrgId>
<AnyBIC>anybic01</AnyBIC>
</OrgId>
</Id>
</Cdtr>
<CdtrAgt>
<FinInstnId>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
<BIC>88888888</BIC>
<Nm>uiopp</Nm>
</FinInstnId>
</CdtrAgt>
<PmtId>
<EndToEndId>end456</EndToEndId>
</PmtId>
<IntrBkSttlmAmt Ccy="USD">120274.34</IntrBkSttlmAmt>
<IntrBkSttlmDt>2022-04-02+08:00</IntrBkSttlmDt>
<SttlmTmIndctn>
<DbtDtTm>2022-04-02T13:35:04.807+08:00</DbtDtTm>
<CdtDtTm>2022-04-02T13:35:04.807+08:00</CdtDtTm>
</SttlmTmIndctn>
<SttlmTmReq>
<CLSTm>13:35:04.807+08:00</CLSTm>
</SttlmTmReq>
<IntrmyAgt1>
<FinInstnId>
<BIC>77777777777</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
</FinInstnId>
<ClrSysMmbId>
<MmbId>mmbid01</MmbId>
<ClrSysId>
<Cd>cd02</Cd>
<Prtry>prtry01</Prtry>
</ClrSysId>
</ClrSysMmbId>
</IntrmyAgt1>
<IntrmyAgt1Acct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</IntrmyAgt1Acct>
<Dbtr>
<FinInstnId>
<BIC>789456</BIC>
<Nm>uiopp</Nm>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
</FinInstnId>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<BIC>7777777777777777777</BIC>
<PstlAdr>
<AdrLine>11</AdrLine>
<AdrLine>22</AdrLine>
<AdrLine>33</AdrLine>
<AdrLine>44</AdrLine>
<AdrLine>55</AdrLine>
</PstlAdr>
</FinInstnId>
</DbtrAgt>
<DbtrAgtAcct>
<Id>
<IBAN>S15612345678012345</IBAN>
<Othr>
<Id>789465123132165</Id>
<SchmeNm>
<Cd>741852</Cd>
</SchmeNm>
</Othr>
</Id>
</DbtrAgtAcct>
<InstrForCdtrAgt>
<Cd>PHOB</Cd>
<InstrInf>456</InstrInf>
</InstrForCdtrAgt>
<InstrForNxtAgt>
<Cd>TELA</Cd>
<InstrInf>ins123</InstrInf>
</InstrForNxtAgt>
<RmtInf>
<Ustrd>1111</Ustrd>
</RmtInf>
</CdtTrfTxInf>
</FinInstnCdtTrf>
</Document>
......@@ -9,7 +9,7 @@ public class TestMx2MtFor202 {
Mx2MtCreateManager mx2MtCreateManager = new Mx2MtCreateManager();
String mt202 = mx2MtCreateManager.mx2mt(
new File(System.getProperty("user.dir")+"\\src\\main\\resources\\swiftXml\\MxPacs00900102.xml"),
"f:/test/MT202.txt");
"d:/test/MT202.txt");
System.out.println(mt202);
}
}
package com.brilliance.mt202;
import com.prowidesoftware.brilliance.mx2mt.Mx2MtCreateManager;
import java.io.File;
public class TestMx2MtFor202COV {
public static void main(String[] args) throws Exception {
Mx2MtCreateManager mx2MtCreateManager = new Mx2MtCreateManager();
String mt202 = mx2MtCreateManager.mx2mt(
new File(System.getProperty("user.dir")+"\\src\\main\\resources\\swiftXml\\MxPacs00900102_COV.xml"),
"d:/test/MT202_COV.txt");
System.out.println(mt202);
}
}
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