Commit f6ca4161 by gechengyang

提交业务要素转ISO的测试程序

parent 04e2731d
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<exclude>**/swiftJson/**</exclude> <exclude>**/swiftJson/**</exclude>
<exclude>**/swiftTxt/**</exclude> <exclude>**/swiftTxt/**</exclude>
<exclude>**/swiftXml/**</exclude> <exclude>**/swiftXml/**</exclude>
<exclude>**/mxjson/**</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
......
...@@ -13,6 +13,7 @@ import java.text.SimpleDateFormat; ...@@ -13,6 +13,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import java.util.TimeZone;
public class DateUtil { public class DateUtil {
...@@ -198,6 +199,21 @@ public class DateUtil { ...@@ -198,6 +199,21 @@ public class DateUtil {
return xgc; return xgc;
} }
public static XMLGregorianCalendar parseXMLGregorianCalendarOfUTC(Date date) throws ParseException, DatatypeConfigurationException {
GregorianCalendar gc = new GregorianCalendar();
// 获取当前默认时区
TimeZone defaultTimezone = TimeZone.getDefault();
System.out.println("当前默认时区:" + defaultTimezone);
// 将时区设置为零(UTC)
gc.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));
gc.setTime(date);
XMLGregorianCalendar xgc = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);
return xgc;
}
/** /**
* 数据库Date类型转化为XML时间 * 数据库Date类型转化为XML时间
* *
......
...@@ -40,8 +40,9 @@ Change Log ...@@ -40,8 +40,9 @@ Change Log
<CreDtTm>2021-04-09T09:00:00+01:00</CreDtTm> <CreDtTm>2021-04-09T09:00:00+01:00</CreDtTm>
<NbOfTxs>1</NbOfTxs> <NbOfTxs>1</NbOfTxs>
<SttlmInf> <SttlmInf>
<SttlmMtd>INDA</SttlmMtd> <SttlmMtd>INDA</SttlmMtd>
</SttlmInf> </SttlmInf>
</GrpHdr> </GrpHdr>
<CdtTrfTxInf> <CdtTrfTxInf>
<PmtId> <PmtId>
......
...@@ -7,14 +7,15 @@ bizSvc=appHdr.bizSvc ...@@ -7,14 +7,15 @@ bizSvc=appHdr.bizSvc
creDt=fiToFICstmrCdtTrf.grpHdr.creDtTm?appHdr.creDt creDt=fiToFICstmrCdtTrf.grpHdr.creDtTm?appHdr.creDt
priority=appHdr.prty priority=appHdr.prty
#BODY #BODY
instrId=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.instrId
endToEndId=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.endToEndId endToEndId=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.endToEndId
uetr=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.uetr uetr=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.uetr
clrSysRef=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.clrSysRef clrSysRef=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.clrSysRef
clrChanl=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.clrChanl clrChanl=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.clrChanl
svcLvl=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.svcLvl svcLvl=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.svcLvl
lclInstrm=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.cd lclInstrmCd=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.cd
lclInstrmPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.prtry lclInstrmPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.prtry
ctgyPurp=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.cd ctgyPurpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.cd
ctgyPurpPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.prtry ctgyPurpPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.prtry
sttlmMtd=fiToFICstmrCdtTrf.grpHdr.sttlmInf.sttlmMtd sttlmMtd=fiToFICstmrCdtTrf.grpHdr.sttlmInf.sttlmMtd
sttlmAcctIdIban=fiToFICstmrCdtTrf.grpHdr.sttlmInf.sttlmAcct.id.iban sttlmAcctIdIban=fiToFICstmrCdtTrf.grpHdr.sttlmInf.sttlmAcct.id.iban
...@@ -429,6 +430,11 @@ prvsInstgAgt1BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1 ...@@ -429,6 +430,11 @@ prvsInstgAgt1BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1
prvsInstgAgt1BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.dstrctNm prvsInstgAgt1BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.dstrctNm
prvsInstgAgt1BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.twnLctnNm prvsInstgAgt1BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.twnLctnNm
prvsInstgAgt1BrnchAdrLines=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.adrLine prvsInstgAgt1BrnchAdrLines=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.adrLine
prvsInstgAgt1Acctiban=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1Acct.id.iban
prvsInstgAgt1AcctTpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1Acct.tp.cd
prvsInstgAgt1AcctCcy=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1Acct.ccy
prvsInstgAgt2Bicfi=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.bicfi prvsInstgAgt2Bicfi=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.bicfi
prvsInstgAgt2ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.clrSysMmbId.mmbId prvsInstgAgt2ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.clrSysMmbId.mmbId
prvsInstgAgt2ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.clrSysMmbId.clrSysId.cd prvsInstgAgt2ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.clrSysMmbId.clrSysId.cd
...@@ -473,6 +479,12 @@ prvsInstgAgt2BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2 ...@@ -473,6 +479,12 @@ prvsInstgAgt2BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2
prvsInstgAgt2BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.dstrctNm prvsInstgAgt2BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.dstrctNm
prvsInstgAgt2BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.twnLctnNm prvsInstgAgt2BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.twnLctnNm
prvsInstgAgt2BrnchAdrLines=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.adrLine prvsInstgAgt2BrnchAdrLines=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.adrLine
prvsInstgAgt2Acctiban=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2Acct.id.iban
prvsInstgAgt2AcctTpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2Acct.tp.cd
prvsInstgAgt2AcctCcy=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2Acct.ccy
prvsInstgAgt3Bicfi=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.bicfi prvsInstgAgt3Bicfi=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.bicfi
prvsInstgAgt3ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.clrSysMmbId.mmbId prvsInstgAgt3ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.clrSysMmbId.mmbId
prvsInstgAgt3ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.clrSysMmbId.clrSysId.cd prvsInstgAgt3ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.clrSysMmbId.clrSysId.cd
...@@ -517,6 +529,11 @@ prvsInstgAgt3BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3 ...@@ -517,6 +529,11 @@ prvsInstgAgt3BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3
prvsInstgAgt3BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.dstrctNm prvsInstgAgt3BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.dstrctNm
prvsInstgAgt3BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.twnLctnNm prvsInstgAgt3BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.twnLctnNm
prvsInstgAgt3BrnchAdrLines=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.adrLine prvsInstgAgt3BrnchAdrLines=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.adrLine
prvsInstgAgt3Acctiban=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3Acct.id.iban
prvsInstgAgt3AcctTpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3Acct.tp.cd
prvsInstgAgt3AcctCcy=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3Acct.ccy
intrmyAgt1Bicfi=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.bicfi intrmyAgt1Bicfi=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.bicfi
intrmyAgt1ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.clrSysMmbId.mmbId intrmyAgt1ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.clrSysMmbId.mmbId
intrmyAgt1ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.clrSysMmbId.clrSysId.cd intrmyAgt1ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.clrSysMmbId.clrSysId.cd
...@@ -719,7 +736,7 @@ ultmtCdtrFaxNb=fiToFICstmrCdtTrf.cdtTrfTxInf.ultmtCdtr.ctctDtls.faxNb ...@@ -719,7 +736,7 @@ ultmtCdtrFaxNb=fiToFICstmrCdtTrf.cdtTrfTxInf.ultmtCdtr.ctctDtls.faxNb
ultmtCdtrEmailAdr=fiToFICstmrCdtTrf.cdtTrfTxInf.ultmtCdtr.ctctDtls.emailAdr ultmtCdtrEmailAdr=fiToFICstmrCdtTrf.cdtTrfTxInf.ultmtCdtr.ctctDtls.emailAdr
instrForCdtrAgt=fiToFICstmrCdtTrf.cdtTrfTxInf.instrForCdtrAgt instrForCdtrAgt=fiToFICstmrCdtTrf.cdtTrfTxInf.instrForCdtrAgt
instrForNxtAgt=fiToFICstmrCdtTrf.cdtTrfTxInf.instrForNxtAgt instrForNxtAgt=fiToFICstmrCdtTrf.cdtTrfTxInf.instrForNxtAgt
purp=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.cd purpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.cd
purpPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.prtry purpPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.prtry
rgltryRptg=@buildRgltryRptg rgltryRptg=@buildRgltryRptg
rltdRmtInf=fiToFICstmrCdtTrf.cdtTrfTxInf.rltdRmtInf#rmtId rltdRmtInf=fiToFICstmrCdtTrf.cdtTrfTxInf.rltdRmtInf#rmtId
......
...@@ -7,6 +7,7 @@ bizSvc=appHdr.bizSvc ...@@ -7,6 +7,7 @@ bizSvc=appHdr.bizSvc
creDt=fiCdtTrf.grpHdr.creDtTm?appHdr.creDt creDt=fiCdtTrf.grpHdr.creDtTm?appHdr.creDt
priority=appHdr.prty priority=appHdr.prty
#BODY #BODY
instrId=fiCdtTrf.cdtTrfTxInf.pmtId.instrId
endToEndId=fiCdtTrf.cdtTrfTxInf.pmtId.endToEndId endToEndId=fiCdtTrf.cdtTrfTxInf.pmtId.endToEndId
uetr=fiCdtTrf.cdtTrfTxInf.pmtId.uetr uetr=fiCdtTrf.cdtTrfTxInf.pmtId.uetr
clrSysRef=fiCdtTrf.cdtTrfTxInf.pmtId.clrSysRef clrSysRef=fiCdtTrf.cdtTrfTxInf.pmtId.clrSysRef
...@@ -573,6 +574,7 @@ purpPrtry=fiCdtTrf.cdtTrfTxInf.purp.prtry ...@@ -573,6 +574,7 @@ purpPrtry=fiCdtTrf.cdtTrfTxInf.purp.prtry
rmtInfUstrd=fiCdtTrf.cdtTrfTxInf.rmtInf.ustrd rmtInfUstrd=fiCdtTrf.cdtTrfTxInf.rmtInf.ustrd
instrForCdtrAgt=fiCdtTrf.cdtTrfTxInf.instrForCdtrAgt instrForCdtrAgt=fiCdtTrf.cdtTrfTxInf.instrForCdtrAgt
instrForNxtAgt=fiCdtTrf.cdtTrfTxInf.instrForNxtAgt instrForNxtAgt=fiCdtTrf.cdtTrfTxInf.instrForNxtAgt
#??202COV??
undrlygCstmrCdtTrf=fiCdtTrf.cdtTrfTxInf.undrlygCstmrCdtTrf#undrlygCstmrCdtTrf undrlygCstmrCdtTrf=fiCdtTrf.cdtTrfTxInf.undrlygCstmrCdtTrf#undrlygCstmrCdtTrf
dbtrAgtBicfi=fiCdtTrf.cdtTrfTxInf.dbtrAgt.finInstnId.bicfi dbtrAgtBicfi=fiCdtTrf.cdtTrfTxInf.dbtrAgt.finInstnId.bicfi
dbtrAgtClrSysId=fiCdtTrf.cdtTrfTxInf.dbtrAgt.finInstnId.clrSysMmbId.mmbId dbtrAgtClrSysId=fiCdtTrf.cdtTrfTxInf.dbtrAgt.finInstnId.clrSysMmbId.mmbId
......
...@@ -18,8 +18,9 @@ public class Mx2ElementTest { ...@@ -18,8 +18,9 @@ public class Mx2ElementTest {
@Test @Test
public void testMx2Map() throws IOException { public void testMx2Map() throws IOException {
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/Pacs00800108.xml"));
// File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml")); // File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml")); // File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05300108_950.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05300108_950.xml"));
......
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