Commit b6c0c138 by lixinyi

pace004、009cov、camt052、053检核调整

parent 3547c8a3
...@@ -30,7 +30,7 @@ public class MxTransfer { ...@@ -30,7 +30,7 @@ public class MxTransfer {
} }
} }
gsonMaps.remove("appHdr"); gsonMaps.remove("appHdr");
List<String> list = new ArrayList<>(Arrays.asList("cdtTrfTxInf", "txInfAndSts","cxlDtls","txInfAndSts","undrlyg","txInf","cxlRsnInf")); List<String> list = new ArrayList<>(Arrays.asList("cdtTrfTxInf", "txInfAndSts","cxlDtls","txInfAndSts","undrlyg","txInf","cxlRsnInf","rtrRsnInf","rpt","stmt"));
//最大数量大于1的节点需要读其子节点 //最大数量大于1的节点需要读其子节点
for(String s: list) { for(String s: list) {
if (gsonMaps.get(s) != null) { if (gsonMaps.get(s) != null) {
......
...@@ -22,7 +22,7 @@ bkToCstmrAcctRpt.grpHdr=grpHdr ...@@ -22,7 +22,7 @@ bkToCstmrAcctRpt.grpHdr=grpHdr
#appHdr.creDt=creDt@ISODATETIME #appHdr.creDt=creDt@ISODATETIME
#bkToCstmrAcctRpt.grpHdr.msgId=msgId #bkToCstmrAcctRpt.grpHdr.msgId=msgId
#bkToCstmrAcctRpt.grpHdr.creDtTm=creDtTm #bkToCstmrAcctRpt.grpHdr.creDtTm=creDtTm
bkToCstmrAcctRpt.rpt*.creDtTm=rptCreDtTm bkToCstmrAcctRpt.rpt*.creDtTm=creDtTm
bkToCstmrAcctRpt.rpt*.id=id bkToCstmrAcctRpt.rpt*.id=id
bkToCstmrAcctRpt.rpt*.lglSeqNb=lglSeqNb bkToCstmrAcctRpt.rpt*.lglSeqNb=lglSeqNb
bkToCstmrAcctRpt.rpt*.rptPgntn=rptPgntn bkToCstmrAcctRpt.rpt*.rptPgntn=rptPgntn
......
...@@ -11,7 +11,7 @@ appHdr.pssblDplct=pssblDplct ...@@ -11,7 +11,7 @@ appHdr.pssblDplct=pssblDplct
appHdr.prty=prty appHdr.prty=prty
appHdr.rltd=rltd appHdr.rltd=rltd
bkToCstmrStmt.grpHdr=grpHdr bkToCstmrStmt.grpHdr=grpHdr
bkToCstmrStmt.stmt=stmt #bkToCstmrStmt.stmt=stmt
#appHdr.fr.fiId.finInstnId.bicfi=senderBic #appHdr.fr.fiId.finInstnId.bicfi=senderBic
#appHdr.fr.fiId.finInstnId.nm=senderNm #appHdr.fr.fiId.finInstnId.nm=senderNm
#appHdr.to.fiId.finInstnId.bicfi=receiverBic #appHdr.to.fiId.finInstnId.bicfi=receiverBic
...@@ -22,10 +22,10 @@ bkToCstmrStmt.stmt=stmt ...@@ -22,10 +22,10 @@ bkToCstmrStmt.stmt=stmt
#appHdr.creDt=creDt #appHdr.creDt=creDt
#bkToCstmrStmt.grpHdr.msgId=msgId #bkToCstmrStmt.grpHdr.msgId=msgId
#bkToCstmrStmt.grpHdr.creDtTm=creDtTm #bkToCstmrStmt.grpHdr.creDtTm=creDtTm
#bkToCstmrStmt.stmt.id=id bkToCstmrStmt.stmt*.id=id
#bkToCstmrStmt.stmt.acct=acct bkToCstmrStmt.stmt*.acct=acct
#bkToCstmrStmt.stmt.lglSeqNb=lglSeqNb bkToCstmrStmt.stmt*.lglSeqNb=lglSeqNb
#bkToCstmrStmt.stmt.stmtPgntn=stmtPgntn bkToCstmrStmt.stmt*.stmtPgntn=stmtPgntn
#bkToCstmrStmt.stmt.bal=bal bkToCstmrStmt.stmt*.bal=bal
#bkToCstmrStmt.stmt.ntry=ntry bkToCstmrStmt.stmt*.ntry=ntry
#bkToCstmrStmt.stmt.addtlStmtInf=addtlStmtInf bkToCstmrStmt.stmt*.addtlStmtInf=addtlStmtInf
\ No newline at end of file \ No newline at end of file
...@@ -25,30 +25,31 @@ pmtRtr.grpHdr=grpHdr ...@@ -25,30 +25,31 @@ pmtRtr.grpHdr=grpHdr
#pmtRtr.grpHdr.nbOfTxs=nbOfTxs #pmtRtr.grpHdr.nbOfTxs=nbOfTxs
#pmtRtr.grpHdr.sttlmInf.sttlmMtd=sttlmMtd #pmtRtr.grpHdr.sttlmInf.sttlmMtd=sttlmMtd
#pmtRtr.grpHdr.sttlmInf.sttlmAcct=sttlmAcct #pmtRtr.grpHdr.sttlmInf.sttlmAcct=sttlmAcct
#pmtRtr.txInf*.rtrId=rtrId pmtRtr.txInf*.rtrId=rtrId
#pmtRtr.txInf*.orgnlGrpInf=orgnlGrpInf pmtRtr.txInf*.orgnlGrpInf=orgnlGrpInf
#pmtRtr.txInf*.orgnlInstrId=orgnlInstrId pmtRtr.txInf*.orgnlInstrId=orgnlInstrId
#pmtRtr.txInf*.orgnlEndToEndId=orgnlEndToEndId pmtRtr.txInf*.orgnlEndToEndId=orgnlEndToEndId
#pmtRtr.txInf*.orgnlTxId=orgnlTxId pmtRtr.txInf*.orgnlTxId=orgnlTxId
#pmtRtr.txInf*.orgnlUETR=orgnlUETR pmtRtr.txInf*.orgnlUETR=orgnlUETR
#pmtRtr.txInf*.orgnlClrSysRef=orgnlClrSysRef pmtRtr.txInf*.orgnlClrSysRef=orgnlClrSysRef
#pmtRtr.txInf*.orgnlIntrBkSttlmAmt=orgnlIntrBkSttlmAmt pmtRtr.txInf*.orgnlIntrBkSttlmAmt=orgnlIntrBkSttlmAmt
#pmtRtr.txInf*.orgnlIntrBkSttlmDt=orgnlIntrBkSttlmDt pmtRtr.txInf*.orgnlIntrBkSttlmDt=orgnlIntrBkSttlmDt
#pmtRtr.txInf*.rtrdIntrBkSttlmAmt=rtrdIntrBkSttlmAmt pmtRtr.txInf*.rtrdIntrBkSttlmAmt=rtrdIntrBkSttlmAmt
#pmtRtr.txInf*.intrBkSttlmDt=intrBkSttlmDt pmtRtr.txInf*.intrBkSttlmDt=intrBkSttlmDt
#pmtRtr.txInf*.sttlmPrty=sttlmPrty pmtRtr.txInf*.sttlmPrty=sttlmPrty
#pmtRtr.txInf*.sttlmTmIndctn=sttlmTmIndctn pmtRtr.txInf*.sttlmTmIndctn=sttlmTmIndctn
#pmtRtr.txInf*.rtrdInstdAmt=rtrdInstdAmt pmtRtr.txInf*.rtrdInstdAmt=rtrdInstdAmt
#pmtRtr.txInf*.exchgRate=exchgRate pmtRtr.txInf*.exchgRate=exchgRate
#pmtRtr.txInf*.chrgBr=chrgBr pmtRtr.txInf*.chrgBr=chrgBr
#pmtRtr.txInf*.chrgsInf=chrgsInf pmtRtr.txInf*.chrgsInf=chrgsInf
#pmtRtr.txInf*.clrSysRef=clrSysRef pmtRtr.txInf*.clrSysRef=clrSysRef
#pmtRtr.txInf*.instgAgt.finInstnId.bicfi=senderBic pmtRtr.txInf*.instgAgt=instgAgt
#pmtRtr.txInf*.instdAgt.finInstnId.bicfi=receiverBic pmtRtr.txInf*.instdAgt=instdAgt
#pmtRtr.txInf*.rtrRsnInf.rgtr=rgtr pmtRtr.txInf*.rtrRsnInf*.rgtr=rgtr
#pmtRtr.txInf*.rtrRsnInf.rsn.cd=rsnCd pmtRtr.txInf*.rtrRsnInf*.rsn=rsn
#pmtRtr.txInf*.rtrRsnInf.addtlInf=addtlInf pmtRtr.txInf*.rtrRsnInf*.addtlInf=addtlInf
#pmtRtr.txInf*.orgnlTxRef.pmtTpInf.svcLvl=svcLvl pmtRtr.txInf*.orgnlTxRef.pmtTpInf.svcLvl=svcLvl
pmtRtr.txInf*.rtrChain=rtrChain
#pmtRtr.txInf*.rtrChain.ultmtDbtr=ultmtDbtr #pmtRtr.txInf*.rtrChain.ultmtDbtr=ultmtDbtr
#pmtRtr.txInf*.rtrChain.dbtr=dbtr #pmtRtr.txInf*.rtrChain.dbtr=dbtr
#pmtRtr.txInf*.rtrChain.initgPty=initgPty #pmtRtr.txInf*.rtrChain.initgPty=initgPty
......
...@@ -11,7 +11,7 @@ appHdr.pssblDplct=pssblDplct ...@@ -11,7 +11,7 @@ appHdr.pssblDplct=pssblDplct
appHdr.prty=prty appHdr.prty=prty
appHdr.rltd=rltd appHdr.rltd=rltd
fiCdtTrf.grpHdr=grpHdr fiCdtTrf.grpHdr=grpHdr
fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf #fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf
#appHdr.fr.fiId.finInstnId.bicfi=senderBic #appHdr.fr.fiId.finInstnId.bicfi=senderBic
#appHdr.fr.fiId.finInstnId.nm=senderNm #appHdr.fr.fiId.finInstnId.nm=senderNm
#appHdr.to.fiId.finInstnId.bicfi=receiverBic #appHdr.to.fiId.finInstnId.bicfi=receiverBic
...@@ -24,39 +24,41 @@ fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf ...@@ -24,39 +24,41 @@ fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf
#fiCdtTrf.grpHdr.msgId=msgId #fiCdtTrf.grpHdr.msgId=msgId
#fiCdtTrf.grpHdr.nbOfTxs=nbOfTxs #fiCdtTrf.grpHdr.nbOfTxs=nbOfTxs
#fiCdtTrf.grpHdr.creDtTm=creDtTm #fiCdtTrf.grpHdr.creDtTm=creDtTm
#fiCdtTrf.cdtTrfTxInf.pmtId.uetr=uetr fiCdtTrf.cdtTrfTxInf*.pmtId=pmtId
#fiCdtTrf.cdtTrfTxInf.pmtId.instrId=instrId #fiCdtTrf.cdtTrfTxInf*.pmtId.uetr=uetr
#fiCdtTrf.cdtTrfTxInf.pmtId.endToEndId=endToEndId #fiCdtTrf.cdtTrfTxInf*.pmtId.instrId=instrId
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.clrChanl=clrChanl #fiCdtTrf.cdtTrfTxInf*.pmtId.endToEndId=endToEndId
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.svcLvl=svcLvl fiCdtTrf.cdtTrfTxInf*.pmtTpInf=pmtTpInf
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm=lclInstrm #fiCdtTrf.cdtTrfTxInf*.pmtTpInf.clrChanl=clrChanl
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp=ctgyPurp #fiCdtTrf.cdtTrfTxInf*.pmtTpInf.svcLvl=svcLvl
#fiCdtTrf.cdtTrfTxInf.intrBkSttlmAmt=intrBkSttlmAmt #fiCdtTrf.cdtTrfTxInf*.pmtTpInf.lclInstrm=lclInstrm
#fiCdtTrf.cdtTrfTxInf.intrBkSttlmDt=intrBkSttlmDt #fiCdtTrf.cdtTrfTxInf*.pmtTpInf.ctgyPurp=ctgyPurp
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt1=prvsInstgAgt1 fiCdtTrf.cdtTrfTxInf*.intrBkSttlmAmt=intrBkSttlmAmt
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt1Acct=prvsInstgAgt1Acct fiCdtTrf.cdtTrfTxInf*.intrBkSttlmDt=intrBkSttlmDt
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt2=prvsInstgAgt2 fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt1=prvsInstgAgt1
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt2Acct=prvsInstgAgt2Acct fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt1Acct=prvsInstgAgt1Acct
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt3=prvsInstgAgt3 fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt2=prvsInstgAgt2
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt3Acct=prvsInstgAgt3Acct fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt2Acct=prvsInstgAgt2Acct
#fiCdtTrf.cdtTrfTxInf.intrmyAgt1=intrmyAgt1 fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt3=prvsInstgAgt3
#fiCdtTrf.cdtTrfTxInf.intrmyAgt1Acct=intrmyAgt1Acct fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt3Acct=prvsInstgAgt3Acct
#fiCdtTrf.cdtTrfTxInf.intrmyAgt2=intrmyAgt2 fiCdtTrf.cdtTrfTxInf*.intrmyAgt1=intrmyAgt1
#fiCdtTrf.cdtTrfTxInf.intrmyAgt2Acct=intrmyAgt2Acct fiCdtTrf.cdtTrfTxInf*.intrmyAgt1Acct=intrmyAgt1Acct
#fiCdtTrf.cdtTrfTxInf.intrmyAgt3=intrmyAgt3 fiCdtTrf.cdtTrfTxInf*.intrmyAgt2=intrmyAgt2
#fiCdtTrf.cdtTrfTxInf.intrmyAgt3Acct=intrmyAgt3Acct fiCdtTrf.cdtTrfTxInf*.intrmyAgt2Acct=intrmyAgt2Acct
#fiCdtTrf.cdtTrfTxInf.dbtr=dbtr fiCdtTrf.cdtTrfTxInf*.intrmyAgt3=intrmyAgt3
#fiCdtTrf.cdtTrfTxInf.dbtrAcct=dbtrAcct fiCdtTrf.cdtTrfTxInf*.intrmyAgt3Acct=intrmyAgt3Acct
#fiCdtTrf.cdtTrfTxInf.dbtrAgt=dbtrAgt fiCdtTrf.cdtTrfTxInf*.dbtr=dbtr
#fiCdtTrf.cdtTrfTxInf.dbtrAgtAcct=dbtrAgtAcct fiCdtTrf.cdtTrfTxInf*.dbtrAcct=dbtrAcct
#fiCdtTrf.cdtTrfTxInf.cdtrAgt=cdtrAgt fiCdtTrf.cdtTrfTxInf*.dbtrAgt=dbtrAgt
#fiCdtTrf.cdtTrfTxInf.cdtrAgtAcct=cdtrAgtAcct fiCdtTrf.cdtTrfTxInf*.dbtrAgtAcct=dbtrAgtAcct
#fiCdtTrf.cdtTrfTxInf.cdtr=cdtr fiCdtTrf.cdtTrfTxInf*.cdtrAgt=cdtrAgt
#fiCdtTrf.cdtTrfTxInf.cdtrAcct=cdtrAcct fiCdtTrf.cdtTrfTxInf*.cdtrAgtAcct=cdtrAgtAcct
#fiCdtTrf.cdtTrfTxInf.instrForCdtrAgt=instrForCdtrAgt fiCdtTrf.cdtTrfTxInf*.cdtr=cdtr
#fiCdtTrf.cdtTrfTxInf.instrForNxtAgt=instrForNxtAgt fiCdtTrf.cdtTrfTxInf*.cdtrAcct=cdtrAcct
#fiCdtTrf.cdtTrfTxInf.purp=purp fiCdtTrf.cdtTrfTxInf*.instrForCdtrAgt=instrForCdtrAgt
#fiCdtTrf.cdtTrfTxInf.rmtInf.ustrd=ustrd fiCdtTrf.cdtTrfTxInf*.instrForNxtAgt=instrForNxtAgt
#fiCdtTrf.cdtTrfTxInf.undrlygCstmrCdtTrf=undrlygCstmrCdtTrf fiCdtTrf.cdtTrfTxInf*.purp=purp
#fiCdtTrf.cdtTrfTxInf.instgAgt.finInstnId.bicfi=senderBic fiCdtTrf.cdtTrfTxInf*.rmtInf.ustrd=ustrd
#fiCdtTrf.cdtTrfTxInf.instdAgt.finInstnId.bicfi=receiverBic fiCdtTrf.cdtTrfTxInf*.undrlygCstmrCdtTrf=undrlygCstmrCdtTrf
\ No newline at end of file fiCdtTrf.cdtTrfTxInf*.instgAgt=instgAgt
fiCdtTrf.cdtTrfTxInf*.instdAgt=instdAgt
\ No newline at end of file
...@@ -85,14 +85,15 @@ public class TestCIPS { ...@@ -85,14 +85,15 @@ public class TestCIPS {
gsonMaps.put("OrigReceiverSID","CIPS"); gsonMaps.put("OrigReceiverSID","CIPS");
String swiftGsonStr = new JSONObject(gsonMaps).toJSONString(); String swiftGsonStr = new JSONObject(gsonMaps).toJSONString();
System.out.println("CIPSGsonStr------>:::" + swiftGsonStr); String text = "{\"MesgPriority\":\"3\",\"MesgType\":\"cips.111.001.02\",\"OrigReceiver\":\"1111\",\"OrigSendDate\":\"20241208\",\"MesgDirection\":\"U\",\"MesgRefID\":\"00002024120800006578\",\"MesgID\":\"2024120800006578\",\"cipsMsgId\":\"2024120800006578\",\"OrigSendTime\":\"143740\",\"GrpHdr\":{\"CreDtTm\":\"2024-12-08T15:21:19\",\"SttlmInf\":{\"SttlmMtd\":\"CLRG\"},\"NbOfTxs\":\"1\",\"MsgId\":\"2024120800006578\"},\"OrigSender\":\"111\",\"CdtTrfTxInf\":{\"Cdtr\":{\"Nm\":\"11111\"},\"InstdAgt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"1111\"}}},\"CdtrAgt\":{\"FinInstnId\":{\"Nm\":\"11111\"}},\"IntrBkSttlmAmt\":{\"amount\":\"11.00\",\"Ccy\":\"CNY\"},\"SttlmPrty\":\"HIGH\",\"PmtId\":{\"TxId\":\"2024120800006578\",\"EndToEndId\":\"2024120800006578\"},\"DbtrAgt\":{\"FinInstnId\":{\"Nm\":\"11111\"}},\"ChrgBr\":\"CRED\",\"Dbtr\":{\"Id\":{\"OrgId\":{\"Othr\":{\"Id\":\"11111\"}}},\"Nm\":\"11111\"},\"SplmtryData\":{\"Envlp\":{\"Cnts\":{\"XpctdSttlmDt\":\"2024-12-08\",\"BizPhs\":\"DAYT\"}},\"PlcAndNm\":\"/Document/FIToFICstmrCdtTrf/CdtTrfTxInf\"},\"IntrBkSttlmDt\":\"2024-04-22\",\"InstgAgt\":{\"FinInstnId\":{\"ClrSysMmbId\":{\"MmbId\":\"111\"}}}},\"OrigSenderSID\":\"CIPS\",\"OrigReceiverSID\":\"CIPS\",\"cipsEndToEndId\":\"2024120800006578\"}";
Result result = MsgUtil.packMessage(swiftGsonStr,"UTF-8"); System.out.println("CIPSGsonStr------>:::" + text);
Result result = MsgUtil.packMessage(text,"UTF-8");
System.out.println(result.getMessage()); System.out.println(result.getMessage());
} }
@Test @Test
public void testcipsToMap()throws IOException { public void testcipsToMap()throws IOException {
File file = new File(System.getProperty("user.dir")+"\\src\\main\\resources\\json\\00871965.cps"); File file = new File(System.getProperty("user.dir")+"\\src\\main\\resources\\json\\cips.111.001.02.xml");
String gsonStr = FileUtils.readFileToString(file, "UTF-8"); String gsonStr = FileUtils.readFileToString(file, "UTF-8");
Map<String, Object> gsonMaps = MsgUtil.cips2Map(file); Map<String, Object> gsonMaps = MsgUtil.cips2Map(file);
String swiftGsonStr = new JSONObject(gsonMaps).toJSONString(); String swiftGsonStr = new JSONObject(gsonMaps).toJSONString();
......
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