Commit 392516f6 by zhanghou

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

parent 046bbaac
...@@ -99,8 +99,6 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator { ...@@ -99,8 +99,6 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
txDtls.setRltdPties(rltdPties); txDtls.setRltdPties(rltdPties);
Party40Choice dbtr = new Party40Choice(); Party40Choice dbtr = new Party40Choice();
rltdPties.setDbtr(dbtr); rltdPties.setDbtr(dbtr);
PartyIdentification135 pty = new PartyIdentification135();
dbtr.setPty(pty);
TransactionReferences6 refs =new TransactionReferences6(); TransactionReferences6 refs =new TransactionReferences6();
refs.setEndToEndId(endToEndId); refs.setEndToEndId(endToEndId);
refs.setUETR(bankToCustomerDebitCreditNotification.getUetr()); refs.setUETR(bankToCustomerDebitCreditNotification.getUetr());
...@@ -131,47 +129,37 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator { ...@@ -131,47 +129,37 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
ntry.setAmt(amt); ntry.setAmt(amt);
} }
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Nm> //<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Nm>
if(debitParty!=null){ if("CRDT".equals(cdtDbtCode)){
if(debitParty.getPartyBic()!=null){ if(debitParty!=null){
Party38Choice id = new Party38Choice(); PartyIdentification135 pty = partyDtoConvertTr(debitParty);
pty.setId(id); dbtr.setPty(pty);
OrganisationIdentification29 orgId = new OrganisationIdentification29(); CashAccount38 dbtrAcct = partyDtoConvertAgtAccount(debitParty.getPartyAcct());
orgId.setAnyBIC(bankToCustomerDebitCreditNotification.getDebitParty().getPartyBic()); rltdPties.setDbtrAcct(dbtrAcct);
id.setOrgId(orgId); }
CashAccount38 dbtrAcct = new CashAccount38(); //<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); 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){ if(addtlTxInf!=null){
txDtls.setAddtlTxInf(addtlTxInf); txDtls.setAddtlTxInf(addtlTxInf);
......
...@@ -10,16 +10,12 @@ ...@@ -10,16 +10,12 @@
"amt": 126 "amt": 126
}, },
"debitAgtParty": { "debitAgtParty": {
"partyName": "Creditor 2", "partyName": "Creditor 1",
"addressList": [ "addressList": [
"TEST111", "TEST1",
"TEST222", "TEST2",
"TEST333" "TEST3"
], ]
"clrSysMmb": {
"code": "ATBLZ",
"id": "FR7630588000010050000143176"
}
}, },
"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": "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", "messageType": "camt.054.001",
......
...@@ -49,31 +49,18 @@ ...@@ -49,31 +49,18 @@
</Refs> </Refs>
<RltdPties> <RltdPties>
<Dbtr> <Dbtr>
<Pty></Pty> <Pty>
<Nm>Creditor 1</Nm>
<PstlAdr>
<AdrLine>TEST1</AdrLine>
<AdrLine>TEST2</AdrLine>
<AdrLine>TEST3</AdrLine>
</PstlAdr>
</Pty>
</Dbtr> </Dbtr>
</RltdPties> </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> <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>
<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> </NtryDtls>
</Ntry> </Ntry>
</Ntfctn> </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