Commit f6ca4161 by gechengyang

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

parent 04e2731d
......@@ -40,6 +40,7 @@
<exclude>**/swiftJson/**</exclude>
<exclude>**/swiftTxt/**</exclude>
<exclude>**/swiftXml/**</exclude>
<exclude>**/mxjson/**</exclude>
</excludes>
</configuration>
</plugin>
......
......@@ -13,6 +13,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class DateUtil {
......@@ -198,6 +199,21 @@ public class DateUtil {
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时间
*
......
......@@ -42,6 +42,7 @@ Change Log
<SttlmInf>
<SttlmMtd>INDA</SttlmMtd>
</SttlmInf>
</GrpHdr>
<CdtTrfTxInf>
<PmtId>
......
......@@ -7,14 +7,15 @@ bizSvc=appHdr.bizSvc
creDt=fiToFICstmrCdtTrf.grpHdr.creDtTm?appHdr.creDt
priority=appHdr.prty
#BODY
instrId=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.instrId
endToEndId=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.endToEndId
uetr=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.uetr
clrSysRef=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.clrSysRef
clrChanl=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.clrChanl
svcLvl=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.svcLvl
lclInstrm=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.cd
lclInstrmCd=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.cd
lclInstrmPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm.prtry
ctgyPurp=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.cd
ctgyPurpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.cd
ctgyPurpPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp.prtry
sttlmMtd=fiToFICstmrCdtTrf.grpHdr.sttlmInf.sttlmMtd
sttlmAcctIdIban=fiToFICstmrCdtTrf.grpHdr.sttlmInf.sttlmAcct.id.iban
......@@ -429,6 +430,11 @@ prvsInstgAgt1BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1
prvsInstgAgt1BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.dstrctNm
prvsInstgAgt1BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt1.brnchId.pstlAdr.twnLctnNm
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
prvsInstgAgt2ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.clrSysMmbId.mmbId
prvsInstgAgt2ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.finInstnId.clrSysMmbId.clrSysId.cd
......@@ -473,6 +479,12 @@ prvsInstgAgt2BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2
prvsInstgAgt2BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.dstrctNm
prvsInstgAgt2BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt2.brnchId.pstlAdr.twnLctnNm
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
prvsInstgAgt3ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.clrSysMmbId.mmbId
prvsInstgAgt3ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.finInstnId.clrSysMmbId.clrSysId.cd
......@@ -517,6 +529,11 @@ prvsInstgAgt3BrnchPstlAdrCtrySubDvsn=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3
prvsInstgAgt3BrnchPstlAdrDstrctNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.dstrctNm
prvsInstgAgt3BrnchPstlAdrTwnLctnNm=fiToFICstmrCdtTrf.cdtTrfTxInf.prvsInstgAgt3.brnchId.pstlAdr.twnLctnNm
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
intrmyAgt1ClrSysId=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.clrSysMmbId.mmbId
intrmyAgt1ClrSysIdType=fiToFICstmrCdtTrf.cdtTrfTxInf.intrmyAgt1.finInstnId.clrSysMmbId.clrSysId.cd
......@@ -719,7 +736,7 @@ ultmtCdtrFaxNb=fiToFICstmrCdtTrf.cdtTrfTxInf.ultmtCdtr.ctctDtls.faxNb
ultmtCdtrEmailAdr=fiToFICstmrCdtTrf.cdtTrfTxInf.ultmtCdtr.ctctDtls.emailAdr
instrForCdtrAgt=fiToFICstmrCdtTrf.cdtTrfTxInf.instrForCdtrAgt
instrForNxtAgt=fiToFICstmrCdtTrf.cdtTrfTxInf.instrForNxtAgt
purp=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.cd
purpCd=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.cd
purpPrtry=fiToFICstmrCdtTrf.cdtTrfTxInf.purp.prtry
rgltryRptg=@buildRgltryRptg
rltdRmtInf=fiToFICstmrCdtTrf.cdtTrfTxInf.rltdRmtInf#rmtId
......
......@@ -7,6 +7,7 @@ bizSvc=appHdr.bizSvc
creDt=fiCdtTrf.grpHdr.creDtTm?appHdr.creDt
priority=appHdr.prty
#BODY
instrId=fiCdtTrf.cdtTrfTxInf.pmtId.instrId
endToEndId=fiCdtTrf.cdtTrfTxInf.pmtId.endToEndId
uetr=fiCdtTrf.cdtTrfTxInf.pmtId.uetr
clrSysRef=fiCdtTrf.cdtTrfTxInf.pmtId.clrSysRef
......@@ -573,6 +574,7 @@ purpPrtry=fiCdtTrf.cdtTrfTxInf.purp.prtry
rmtInfUstrd=fiCdtTrf.cdtTrfTxInf.rmtInf.ustrd
instrForCdtrAgt=fiCdtTrf.cdtTrfTxInf.instrForCdtrAgt
instrForNxtAgt=fiCdtTrf.cdtTrfTxInf.instrForNxtAgt
#??202COV??
undrlygCstmrCdtTrf=fiCdtTrf.cdtTrfTxInf.undrlygCstmrCdtTrf#undrlygCstmrCdtTrf
dbtrAgtBicfi=fiCdtTrf.cdtTrfTxInf.dbtrAgt.finInstnId.bicfi
dbtrAgtClrSysId=fiCdtTrf.cdtTrfTxInf.dbtrAgt.finInstnId.clrSysMmbId.mmbId
......
......@@ -18,8 +18,9 @@ public class Mx2ElementTest {
@Test
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/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_COV.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