Commit b6c0c138 by lixinyi

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

parent 3547c8a3
......@@ -30,7 +30,7 @@ public class MxTransfer {
}
}
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的节点需要读其子节点
for(String s: list) {
if (gsonMaps.get(s) != null) {
......
......@@ -22,7 +22,7 @@ bkToCstmrAcctRpt.grpHdr=grpHdr
#appHdr.creDt=creDt@ISODATETIME
#bkToCstmrAcctRpt.grpHdr.msgId=msgId
#bkToCstmrAcctRpt.grpHdr.creDtTm=creDtTm
bkToCstmrAcctRpt.rpt*.creDtTm=rptCreDtTm
bkToCstmrAcctRpt.rpt*.creDtTm=creDtTm
bkToCstmrAcctRpt.rpt*.id=id
bkToCstmrAcctRpt.rpt*.lglSeqNb=lglSeqNb
bkToCstmrAcctRpt.rpt*.rptPgntn=rptPgntn
......
......@@ -11,7 +11,7 @@ appHdr.pssblDplct=pssblDplct
appHdr.prty=prty
appHdr.rltd=rltd
bkToCstmrStmt.grpHdr=grpHdr
bkToCstmrStmt.stmt=stmt
#bkToCstmrStmt.stmt=stmt
#appHdr.fr.fiId.finInstnId.bicfi=senderBic
#appHdr.fr.fiId.finInstnId.nm=senderNm
#appHdr.to.fiId.finInstnId.bicfi=receiverBic
......@@ -22,10 +22,10 @@ bkToCstmrStmt.stmt=stmt
#appHdr.creDt=creDt
#bkToCstmrStmt.grpHdr.msgId=msgId
#bkToCstmrStmt.grpHdr.creDtTm=creDtTm
#bkToCstmrStmt.stmt.id=id
#bkToCstmrStmt.stmt.acct=acct
#bkToCstmrStmt.stmt.lglSeqNb=lglSeqNb
#bkToCstmrStmt.stmt.stmtPgntn=stmtPgntn
#bkToCstmrStmt.stmt.bal=bal
#bkToCstmrStmt.stmt.ntry=ntry
#bkToCstmrStmt.stmt.addtlStmtInf=addtlStmtInf
\ No newline at end of file
bkToCstmrStmt.stmt*.id=id
bkToCstmrStmt.stmt*.acct=acct
bkToCstmrStmt.stmt*.lglSeqNb=lglSeqNb
bkToCstmrStmt.stmt*.stmtPgntn=stmtPgntn
bkToCstmrStmt.stmt*.bal=bal
bkToCstmrStmt.stmt*.ntry=ntry
bkToCstmrStmt.stmt*.addtlStmtInf=addtlStmtInf
\ No newline at end of file
......@@ -25,30 +25,31 @@ pmtRtr.grpHdr=grpHdr
#pmtRtr.grpHdr.nbOfTxs=nbOfTxs
#pmtRtr.grpHdr.sttlmInf.sttlmMtd=sttlmMtd
#pmtRtr.grpHdr.sttlmInf.sttlmAcct=sttlmAcct
#pmtRtr.txInf*.rtrId=rtrId
#pmtRtr.txInf*.orgnlGrpInf=orgnlGrpInf
#pmtRtr.txInf*.orgnlInstrId=orgnlInstrId
#pmtRtr.txInf*.orgnlEndToEndId=orgnlEndToEndId
#pmtRtr.txInf*.orgnlTxId=orgnlTxId
#pmtRtr.txInf*.orgnlUETR=orgnlUETR
#pmtRtr.txInf*.orgnlClrSysRef=orgnlClrSysRef
#pmtRtr.txInf*.orgnlIntrBkSttlmAmt=orgnlIntrBkSttlmAmt
#pmtRtr.txInf*.orgnlIntrBkSttlmDt=orgnlIntrBkSttlmDt
#pmtRtr.txInf*.rtrdIntrBkSttlmAmt=rtrdIntrBkSttlmAmt
#pmtRtr.txInf*.intrBkSttlmDt=intrBkSttlmDt
#pmtRtr.txInf*.sttlmPrty=sttlmPrty
#pmtRtr.txInf*.sttlmTmIndctn=sttlmTmIndctn
#pmtRtr.txInf*.rtrdInstdAmt=rtrdInstdAmt
#pmtRtr.txInf*.exchgRate=exchgRate
#pmtRtr.txInf*.chrgBr=chrgBr
#pmtRtr.txInf*.chrgsInf=chrgsInf
#pmtRtr.txInf*.clrSysRef=clrSysRef
#pmtRtr.txInf*.instgAgt.finInstnId.bicfi=senderBic
#pmtRtr.txInf*.instdAgt.finInstnId.bicfi=receiverBic
#pmtRtr.txInf*.rtrRsnInf.rgtr=rgtr
#pmtRtr.txInf*.rtrRsnInf.rsn.cd=rsnCd
#pmtRtr.txInf*.rtrRsnInf.addtlInf=addtlInf
#pmtRtr.txInf*.orgnlTxRef.pmtTpInf.svcLvl=svcLvl
pmtRtr.txInf*.rtrId=rtrId
pmtRtr.txInf*.orgnlGrpInf=orgnlGrpInf
pmtRtr.txInf*.orgnlInstrId=orgnlInstrId
pmtRtr.txInf*.orgnlEndToEndId=orgnlEndToEndId
pmtRtr.txInf*.orgnlTxId=orgnlTxId
pmtRtr.txInf*.orgnlUETR=orgnlUETR
pmtRtr.txInf*.orgnlClrSysRef=orgnlClrSysRef
pmtRtr.txInf*.orgnlIntrBkSttlmAmt=orgnlIntrBkSttlmAmt
pmtRtr.txInf*.orgnlIntrBkSttlmDt=orgnlIntrBkSttlmDt
pmtRtr.txInf*.rtrdIntrBkSttlmAmt=rtrdIntrBkSttlmAmt
pmtRtr.txInf*.intrBkSttlmDt=intrBkSttlmDt
pmtRtr.txInf*.sttlmPrty=sttlmPrty
pmtRtr.txInf*.sttlmTmIndctn=sttlmTmIndctn
pmtRtr.txInf*.rtrdInstdAmt=rtrdInstdAmt
pmtRtr.txInf*.exchgRate=exchgRate
pmtRtr.txInf*.chrgBr=chrgBr
pmtRtr.txInf*.chrgsInf=chrgsInf
pmtRtr.txInf*.clrSysRef=clrSysRef
pmtRtr.txInf*.instgAgt=instgAgt
pmtRtr.txInf*.instdAgt=instdAgt
pmtRtr.txInf*.rtrRsnInf*.rgtr=rgtr
pmtRtr.txInf*.rtrRsnInf*.rsn=rsn
pmtRtr.txInf*.rtrRsnInf*.addtlInf=addtlInf
pmtRtr.txInf*.orgnlTxRef.pmtTpInf.svcLvl=svcLvl
pmtRtr.txInf*.rtrChain=rtrChain
#pmtRtr.txInf*.rtrChain.ultmtDbtr=ultmtDbtr
#pmtRtr.txInf*.rtrChain.dbtr=dbtr
#pmtRtr.txInf*.rtrChain.initgPty=initgPty
......
......@@ -11,7 +11,7 @@ appHdr.pssblDplct=pssblDplct
appHdr.prty=prty
appHdr.rltd=rltd
fiCdtTrf.grpHdr=grpHdr
fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf
#fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf
#appHdr.fr.fiId.finInstnId.bicfi=senderBic
#appHdr.fr.fiId.finInstnId.nm=senderNm
#appHdr.to.fiId.finInstnId.bicfi=receiverBic
......@@ -24,39 +24,41 @@ fiCdtTrf.cdtTrfTxInf=cdtTrfTxInf
#fiCdtTrf.grpHdr.msgId=msgId
#fiCdtTrf.grpHdr.nbOfTxs=nbOfTxs
#fiCdtTrf.grpHdr.creDtTm=creDtTm
#fiCdtTrf.cdtTrfTxInf.pmtId.uetr=uetr
#fiCdtTrf.cdtTrfTxInf.pmtId.instrId=instrId
#fiCdtTrf.cdtTrfTxInf.pmtId.endToEndId=endToEndId
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.clrChanl=clrChanl
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.svcLvl=svcLvl
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.lclInstrm=lclInstrm
#fiCdtTrf.cdtTrfTxInf.pmtTpInf.ctgyPurp=ctgyPurp
#fiCdtTrf.cdtTrfTxInf.intrBkSttlmAmt=intrBkSttlmAmt
#fiCdtTrf.cdtTrfTxInf.intrBkSttlmDt=intrBkSttlmDt
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt1=prvsInstgAgt1
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt1Acct=prvsInstgAgt1Acct
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt2=prvsInstgAgt2
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt2Acct=prvsInstgAgt2Acct
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt3=prvsInstgAgt3
#fiCdtTrf.cdtTrfTxInf.prvsInstgAgt3Acct=prvsInstgAgt3Acct
#fiCdtTrf.cdtTrfTxInf.intrmyAgt1=intrmyAgt1
#fiCdtTrf.cdtTrfTxInf.intrmyAgt1Acct=intrmyAgt1Acct
#fiCdtTrf.cdtTrfTxInf.intrmyAgt2=intrmyAgt2
#fiCdtTrf.cdtTrfTxInf.intrmyAgt2Acct=intrmyAgt2Acct
#fiCdtTrf.cdtTrfTxInf.intrmyAgt3=intrmyAgt3
#fiCdtTrf.cdtTrfTxInf.intrmyAgt3Acct=intrmyAgt3Acct
#fiCdtTrf.cdtTrfTxInf.dbtr=dbtr
#fiCdtTrf.cdtTrfTxInf.dbtrAcct=dbtrAcct
#fiCdtTrf.cdtTrfTxInf.dbtrAgt=dbtrAgt
#fiCdtTrf.cdtTrfTxInf.dbtrAgtAcct=dbtrAgtAcct
#fiCdtTrf.cdtTrfTxInf.cdtrAgt=cdtrAgt
#fiCdtTrf.cdtTrfTxInf.cdtrAgtAcct=cdtrAgtAcct
#fiCdtTrf.cdtTrfTxInf.cdtr=cdtr
#fiCdtTrf.cdtTrfTxInf.cdtrAcct=cdtrAcct
#fiCdtTrf.cdtTrfTxInf.instrForCdtrAgt=instrForCdtrAgt
#fiCdtTrf.cdtTrfTxInf.instrForNxtAgt=instrForNxtAgt
#fiCdtTrf.cdtTrfTxInf.purp=purp
#fiCdtTrf.cdtTrfTxInf.rmtInf.ustrd=ustrd
#fiCdtTrf.cdtTrfTxInf.undrlygCstmrCdtTrf=undrlygCstmrCdtTrf
#fiCdtTrf.cdtTrfTxInf.instgAgt.finInstnId.bicfi=senderBic
#fiCdtTrf.cdtTrfTxInf.instdAgt.finInstnId.bicfi=receiverBic
\ No newline at end of file
fiCdtTrf.cdtTrfTxInf*.pmtId=pmtId
#fiCdtTrf.cdtTrfTxInf*.pmtId.uetr=uetr
#fiCdtTrf.cdtTrfTxInf*.pmtId.instrId=instrId
#fiCdtTrf.cdtTrfTxInf*.pmtId.endToEndId=endToEndId
fiCdtTrf.cdtTrfTxInf*.pmtTpInf=pmtTpInf
#fiCdtTrf.cdtTrfTxInf*.pmtTpInf.clrChanl=clrChanl
#fiCdtTrf.cdtTrfTxInf*.pmtTpInf.svcLvl=svcLvl
#fiCdtTrf.cdtTrfTxInf*.pmtTpInf.lclInstrm=lclInstrm
#fiCdtTrf.cdtTrfTxInf*.pmtTpInf.ctgyPurp=ctgyPurp
fiCdtTrf.cdtTrfTxInf*.intrBkSttlmAmt=intrBkSttlmAmt
fiCdtTrf.cdtTrfTxInf*.intrBkSttlmDt=intrBkSttlmDt
fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt1=prvsInstgAgt1
fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt1Acct=prvsInstgAgt1Acct
fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt2=prvsInstgAgt2
fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt2Acct=prvsInstgAgt2Acct
fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt3=prvsInstgAgt3
fiCdtTrf.cdtTrfTxInf*.prvsInstgAgt3Acct=prvsInstgAgt3Acct
fiCdtTrf.cdtTrfTxInf*.intrmyAgt1=intrmyAgt1
fiCdtTrf.cdtTrfTxInf*.intrmyAgt1Acct=intrmyAgt1Acct
fiCdtTrf.cdtTrfTxInf*.intrmyAgt2=intrmyAgt2
fiCdtTrf.cdtTrfTxInf*.intrmyAgt2Acct=intrmyAgt2Acct
fiCdtTrf.cdtTrfTxInf*.intrmyAgt3=intrmyAgt3
fiCdtTrf.cdtTrfTxInf*.intrmyAgt3Acct=intrmyAgt3Acct
fiCdtTrf.cdtTrfTxInf*.dbtr=dbtr
fiCdtTrf.cdtTrfTxInf*.dbtrAcct=dbtrAcct
fiCdtTrf.cdtTrfTxInf*.dbtrAgt=dbtrAgt
fiCdtTrf.cdtTrfTxInf*.dbtrAgtAcct=dbtrAgtAcct
fiCdtTrf.cdtTrfTxInf*.cdtrAgt=cdtrAgt
fiCdtTrf.cdtTrfTxInf*.cdtrAgtAcct=cdtrAgtAcct
fiCdtTrf.cdtTrfTxInf*.cdtr=cdtr
fiCdtTrf.cdtTrfTxInf*.cdtrAcct=cdtrAcct
fiCdtTrf.cdtTrfTxInf*.instrForCdtrAgt=instrForCdtrAgt
fiCdtTrf.cdtTrfTxInf*.instrForNxtAgt=instrForNxtAgt
fiCdtTrf.cdtTrfTxInf*.purp=purp
fiCdtTrf.cdtTrfTxInf*.rmtInf.ustrd=ustrd
fiCdtTrf.cdtTrfTxInf*.undrlygCstmrCdtTrf=undrlygCstmrCdtTrf
fiCdtTrf.cdtTrfTxInf*.instgAgt=instgAgt
fiCdtTrf.cdtTrfTxInf*.instdAgt=instdAgt
\ No newline at end of file
......@@ -85,14 +85,15 @@ public class TestCIPS {
gsonMaps.put("OrigReceiverSID","CIPS");
String swiftGsonStr = new JSONObject(gsonMaps).toJSONString();
System.out.println("CIPSGsonStr------>:::" + swiftGsonStr);
Result result = MsgUtil.packMessage(swiftGsonStr,"UTF-8");
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\"}";
System.out.println("CIPSGsonStr------>:::" + text);
Result result = MsgUtil.packMessage(text,"UTF-8");
System.out.println(result.getMessage());
}
@Test
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");
Map<String, Object> gsonMaps = MsgUtil.cips2Map(file);
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