Commit 392516f6 by zhanghou

900和910mx和swift之间的转化进行了修改

parent 046bbaac
......@@ -99,8 +99,6 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
txDtls.setRltdPties(rltdPties);
Party40Choice dbtr = new Party40Choice();
rltdPties.setDbtr(dbtr);
PartyIdentification135 pty = new PartyIdentification135();
dbtr.setPty(pty);
TransactionReferences6 refs =new TransactionReferences6();
refs.setEndToEndId(endToEndId);
refs.setUETR(bankToCustomerDebitCreditNotification.getUetr());
......@@ -131,47 +129,37 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
ntry.setAmt(amt);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Nm>
if(debitParty!=null){
if(debitParty.getPartyBic()!=null){
Party38Choice id = new Party38Choice();
pty.setId(id);
OrganisationIdentification29 orgId = new OrganisationIdentification29();
orgId.setAnyBIC(bankToCustomerDebitCreditNotification.getDebitParty().getPartyBic());
id.setOrgId(orgId);
CashAccount38 dbtrAcct = new CashAccount38();
if("CRDT".equals(cdtDbtCode)){
if(debitParty!=null){
PartyIdentification135 pty = partyDtoConvertTr(debitParty);
dbtr.setPty(pty);
CashAccount38 dbtrAcct = partyDtoConvertAgtAccount(debitParty.getPartyAcct());
rltdPties.setDbtrAcct(dbtrAcct);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><DbtrAcct><FinInstnId><BICFI>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><DbtrAcct><FinInstnId><ClrSysMmbId><ClrSysId><Cd>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><DbtrAcct><FinInstnId><ClrSysMmbId><ClrSysId><Prtry>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><DbtrAcct><FinInstnId><ClrSysMmbId><MmbId>
if(debitAgtParty!=null){
TransactionAgents5 rltdAgts = new TransactionAgents5();
txDtls.setRltdAgts(rltdAgts);
BranchAndFinancialInstitutionIdentification6 dbtrAgt = partyDtoConvertAgt(debitAgtParty);
rltdAgts.setDbtrAgt(dbtrAgt);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><BICFI>
if(intrmyAgtParty!=null){
TransactionAgents5 rltdAgts = new TransactionAgents5();
txDtls.setRltdAgts(rltdAgts);
BranchAndFinancialInstitutionIdentification6 intrmyAgt1 = partyDtoConvertAgt(intrmyAgtParty);
rltdAgts.setIntrmyAgt1(intrmyAgt1);
}
}else if("DBIT".equals(cdtDbtCode)){
if(debitAgtParty!=null){
PartyIdentification135 pty = partyDtoConvertTr(debitAgtParty);
dbtr.setPty(pty);
CashAccount38 dbtrAcct = partyDtoConvertAgtAccount(debitAgtParty.getPartyAcct());
rltdPties.setDbtrAcct(dbtrAcct);
AccountIdentification4Choice aid = new AccountIdentification4Choice();
dbtrAcct.setId(aid);
aid.setIBAN(bankToCustomerDebitCreditNotification.getDebitParty().getPartyAcct().getIbanAcct());
GenericAccountIdentification1 othr = new GenericAccountIdentification1();
aid.setOthr(othr);
othr.setId(bankToCustomerDebitCreditNotification.getDebitParty().getPartyAcct().getAccount());
}else if(debitParty.getPartyName()!=null){
pty.setNm(debitParty.getPartyName());
PostalAddress24 pstlAdr = new PostalAddress24();
pty.setPstlAdr(pstlAdr);
List<String> addressList = bankToCustomerDebitCreditNotification.getDebitParty().getAddressList();
for (String addAdrLine : addressList) {
pstlAdr.addAdrLine(addAdrLine);
}
}
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Nm>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><DbtrAgt><FinInstnId><BICFI>
if(debitAgtParty!=null){
EntryTransaction10 txDtls2 = new EntryTransaction10();
ntryDtls.addTxDtls(txDtls2);
TransactionAgents5 rltdAgts = new TransactionAgents5();
txDtls2.setRltdAgts(rltdAgts);
BranchAndFinancialInstitutionIdentification6 dbtrAgt = partyDtoConvertAgt(debitAgtParty);
rltdAgts.setDbtrAgt(dbtrAgt);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><BICFI>
if(intrmyAgtParty!=null){
TransactionAgents5 rltdAgts = new TransactionAgents5();
txDtls.setRltdAgts(rltdAgts);
BranchAndFinancialInstitutionIdentification6 intrmyAgt1 = partyDtoConvertAgt(intrmyAgtParty);
rltdAgts.setIntrmyAgt1(intrmyAgt1);
}
if(addtlTxInf!=null){
txDtls.setAddtlTxInf(addtlTxInf);
......
......@@ -10,16 +10,12 @@
"amt": 126
},
"debitAgtParty": {
"partyName": "Creditor 2",
"partyName": "Creditor 1",
"addressList": [
"TEST111",
"TEST222",
"TEST333"
],
"clrSysMmb": {
"code": "ATBLZ",
"id": "FR7630588000010050000143176"
}
"TEST1",
"TEST2",
"TEST3"
]
},
"addtlTxInf": "ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSEENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METH",
"messageType": "camt.054.001",
......
......@@ -49,31 +49,18 @@
</Refs>
<RltdPties>
<Dbtr>
<Pty></Pty>
<Pty>
<Nm>Creditor 1</Nm>
<PstlAdr>
<AdrLine>TEST1</AdrLine>
<AdrLine>TEST2</AdrLine>
<AdrLine>TEST3</AdrLine>
</PstlAdr>
</Pty>
</Dbtr>
</RltdPties>
<AddtlTxInf>ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSEENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METH</AddtlTxInf>
</TxDtls>
<TxDtls>
<RltdAgts>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<ClrSysId>
<Cd>ATBLZ</Cd>
</ClrSysId>
<MmbId>FR7630588000010050000143176</MmbId>
</ClrSysMmbId>
<Nm>Creditor 2</Nm>
<PstlAdr>
<AdrLine>TEST111</AdrLine>
<AdrLine>TEST222</AdrLine>
<AdrLine>TEST333</AdrLine>
</PstlAdr>
</FinInstnId>
</DbtrAgt>
</RltdAgts>
</TxDtls>
</NtryDtls>
</Ntry>
</Ntfctn>
......
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