Commit dc3ef3b0 by miniphoto

202、202cov删除没用的类

parent c5980e2e
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置52 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与52A相同
* <CdtTrfTxInf>[1]<Dbtr><FinInstnId><Nm>
* <CdtTrfTxInf>[1]<Dbtr><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class Field52DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field52DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field52DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0){
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getDbtr() != null
&& cdtTrfTxInf.get(0).getDbtr().getFinInstnId() != null
&& cdtTrfTxInf.get(0).getDbtr().getFinInstnId().getNm() != null){
map.put("field52Key","D");
if (cdtTrfTxInf.get(0).getDbtr().getFinInstnId().getPstlAdr() != null
&& cdtTrfTxInf.get(0).getDbtr().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = cdtTrfTxInf.get(0).getDbtr().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("field52DAdr",adStr);
}
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getDbtrAcct() != null
&& cdtTrfTxInf.get(0).getDbtrAcct().getId() != null){
if (cdtTrfTxInf.get(0).getDbtrAcct().getId().getIBAN() != null){
map.put("field52Account",cdtTrfTxInf.get(0).getDbtrAcct().getId().getIBAN());
}else if (cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr().getSchmeNm() != null
&& cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr().getSchmeNm().getCd() != null){
if (cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr().getId() != null){
map.put("field52Account","//CH" + cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr().getId());
}
}else if (cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr().getId() != null){
map.put("field52Account",cdtTrfTxInf.get(0).getDbtrAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field52D error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import com.prowidesoftware.swift.model.mx.dic.GroupHeader35;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 如果<SttlmAcct><Id><IBAN>或<SttlmAcct><Id><Othr><Id>有值,则设置53 option为“B”:
* 1)若节点<IBAN>有值,则作为53B的账号;
* 2)若节点<Othr><Id>有值,则作为53B的账号;
* <GrpHdr><SttlmInf><SttlmAcct><Id><IBAN>
* <GrpHdr><SttlmInf><SttlmAcct><Id><Othr><Id>
* <GrpHdr><SttlmInf><SttlmAcct><Id><Othr><SchmeNm><Cd>
*/
public class Field53BGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field53BGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field53BGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
GroupHeader35 grpHdr = finInstnCdtTrf.getGrpHdr();
if (grpHdr != null){
if (grpHdr.getSttlmInf() != null
&& grpHdr.getSttlmInf().getSttlmAcct() != null
&& grpHdr.getSttlmInf().getSttlmAcct().getId() != null){
if (grpHdr.getSttlmInf().getSttlmAcct().getId().getIBAN() != null
|| (grpHdr.getSttlmInf().getSttlmAcct().getId().getOthr() != null
&& grpHdr.getSttlmInf().getSttlmAcct().getId().getOthr().getId() != null)){
map.put("field53BKey","B");
}
if (grpHdr.getSttlmInf().getSttlmAcct().getId().getIBAN() != null){
map.put("field53Account",grpHdr.getSttlmInf().getSttlmAcct().getId().getIBAN());
}else if (grpHdr.getSttlmInf().getSttlmAcct().getId().getOthr() != null
&& grpHdr.getSttlmInf().getSttlmAcct().getId().getOthr().getId() != null){
map.put("field53Account",grpHdr.getSttlmInf().getSttlmAcct().getId().getOthr().getId());
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field53B error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import com.prowidesoftware.swift.model.mx.dic.GroupHeader35;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置53 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与53A相同
* <GrpHdr><SttlmInf><InstgRmbrsmntAgt><FinInstnId><Nm>
* <GrpHdr><SttlmInf><InstgRmbrsmntAgt><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class Field53DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field53DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field53DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
GroupHeader35 grpHdr = finInstnCdtTrf.getGrpHdr();
if (grpHdr != null){
if (grpHdr.getSttlmInf() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgt() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgt().getFinInstnId() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgt().getFinInstnId().getNm() != null){
map.put("field53DKey","D");
if (grpHdr.getSttlmInf().getInstgRmbrsmntAgt().getFinInstnId().getPstlAdr() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgt().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = grpHdr.getSttlmInf().getInstgRmbrsmntAgt().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("field53Adr",adStr);
}
if (grpHdr.getSttlmInf() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct().getId() != null){
if (grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct().getId().getIBAN() != null){
map.put("field53Account",grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct().getId().getIBAN());
}else if (grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct().getId().getOthr() != null
&& grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct().getId().getOthr().getId() != null){
map.put("field53Account",grpHdr.getSttlmInf().getInstgRmbrsmntAgtAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field53D error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import com.prowidesoftware.swift.model.mx.dic.GroupHeader35;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置54 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与54A相同
* <GrpHdr><SttlmInf><InstdRmbrsmntAgt><FinInstnId><Nm>
* <GrpHdr><SttlmInf><InstdRmbrsmntAgt><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class Field54DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field54DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field54DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
GroupHeader35 grpHdr = finInstnCdtTrf.getGrpHdr();
if (grpHdr != null){
if (grpHdr.getSttlmInf() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgt() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgt().getFinInstnId() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgt().getFinInstnId().getNm() != null){
map.put("field54DKey","D");
if (grpHdr.getSttlmInf().getInstdRmbrsmntAgt().getFinInstnId().getPstlAdr() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgt().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = grpHdr.getSttlmInf().getInstdRmbrsmntAgt().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("field54Adr",adStr);
}
if (grpHdr.getSttlmInf() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct().getId() != null){
if (grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct().getId().getIBAN() != null){
map.put("field54Account",grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct().getId().getIBAN());
}else if (grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct().getId().getOthr() != null
&& grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct().getId().getOthr().getId() != null){
map.put("field54Account",grpHdr.getSttlmInf().getInstdRmbrsmntAgtAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field54D error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置56 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与56A相同
* <CdtTrfTxInf>[1]<IntrmyAgt1><FinInstnId><Nm>
* <CdtTrfTxInf>[1]<IntrmyAgt1><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class Field56DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field56DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field56DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0){
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1() != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1().getFinInstnId() != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1().getFinInstnId().getNm() != null){
map.put("field56DKey","D");
if (cdtTrfTxInf.get(0).getIntrmyAgt1().getFinInstnId().getPstlAdr() != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = cdtTrfTxInf.get(0).getIntrmyAgt1().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("field56Adr",adStr);
}
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1Acct() != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1Acct().getId() != null){
if (cdtTrfTxInf.get(0).getIntrmyAgt1Acct().getId().getIBAN() != null){
map.put("field56Account",cdtTrfTxInf.get(0).getIntrmyAgt1Acct().getId().getIBAN());
}else if (cdtTrfTxInf.get(0).getIntrmyAgt1Acct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getIntrmyAgt1Acct().getId().getOthr().getId() != null){
map.put("field56Account",cdtTrfTxInf.get(0).getIntrmyAgt1Acct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field56D error");
}
}
}
\ No newline at end of file
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置57 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与57A相同
* <CdtTrfTxInf>[1]<CdtrAgt><FinInstnId><Nm>
* <CdtTrfTxInf>[1]<CdtrAgt><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class Field57DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field57DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field57DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0){
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getCdtrAgt() != null
&& cdtTrfTxInf.get(0).getCdtrAgt().getFinInstnId() != null
&& cdtTrfTxInf.get(0).getCdtrAgt().getFinInstnId().getNm() != null){
map.put("field57DKey","D");
if (cdtTrfTxInf.get(0).getCdtrAgt().getFinInstnId().getPstlAdr() != null
&& cdtTrfTxInf.get(0).getCdtrAgt().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = cdtTrfTxInf.get(0).getCdtrAgt().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("field57Adr",adStr);
}
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getCdtrAgtAcct() != null
&& cdtTrfTxInf.get(0).getCdtrAgtAcct().getId() != null){
if (cdtTrfTxInf.get(0).getCdtrAgtAcct().getId().getIBAN() != null){
map.put("field57Account",cdtTrfTxInf.get(0).getCdtrAgtAcct().getId().getIBAN());
}else if (cdtTrfTxInf.get(0).getCdtrAgtAcct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getCdtrAgtAcct().getId().getOthr().getId() != null){
map.put("field57Account",cdtTrfTxInf.get(0).getCdtrAgtAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field57D error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置58 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与58A相同
* <CdtTrfTxInf>[1]<Cdtr><FinInstnId><Nm>
* <CdtTrfTxInf>[1]<Cdtr><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class Field58DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.Field58DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field58DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0){
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getCdtr() != null
&& cdtTrfTxInf.get(0).getCdtr().getFinInstnId() != null
&& cdtTrfTxInf.get(0).getCdtr().getFinInstnId().getNm() != null){
map.put("field58DKey","D");
if (cdtTrfTxInf.get(0).getCdtr().getFinInstnId().getPstlAdr() != null
&& cdtTrfTxInf.get(0).getCdtr().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = cdtTrfTxInf.get(0).getCdtr().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("field58Adr",adStr);
}
if (cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getCdtrAcct() != null
&& cdtTrfTxInf.get(0).getCdtrAcct().getId() != null){
if (cdtTrfTxInf.get(0).getCdtrAcct().getId().getIBAN() != null){
map.put("field58Account",cdtTrfTxInf.get(0).getCdtrAcct().getId().getIBAN());
}else if (cdtTrfTxInf.get(0).getCdtrAcct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getCdtrAcct().getId().getOthr().getId() != null){
map.put("field58Account",cdtTrfTxInf.get(0).getCdtrAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202 Field58D error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.cov;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,待补充???
* 2,账号取值规则与B\50A相同
*/
public class Field50FGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(Field50FGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field50FGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0
&& cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf() != null){
// TODO 50F取值待补充
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getId() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getId().getOrgId() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getId().getOrgId().getBICOrBEI() != null){
map.put("fieldB50Option","F");
map.put("fieldB50F",cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getId().getOrgId().getBICOrBEI());
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getIBAN() != null){
map.put("fieldB50Account","/"+cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getIBAN());
}
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getSchmeNm() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getSchmeNm().getCd() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId() != null) {
map.put("fieldB50Account", "//CH" + cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId());
}
}else if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId() != null){
map.put("fieldB50Account",cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202COV Field50F error");
}
}
}
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.cov;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若<Dbtr><Nm>有录入,则设置B\50 option为“K”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则与B\50A相同
* <CdtTrfTxInf>[1]<UndrlygCstmrCdtTrf><Dbtr><Nm>
* <CdtTrfTxInf>[1]<UndrlygCstmrCdtTrf><Dbtr><PstlAdr><AdrLine>
*/
public class Field50KGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(Field50KGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("Field50KGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0
&& cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getNm() != null){
map.put("fieldB50Option","K");
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getPstlAdr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getPstlAdr().getAdrLine() != null){
List<String> adrList = cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtr().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("fieldB50K",adStr);
}
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getIBAN() != null){
map.put("fieldB50Account","/"+cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getIBAN());
}
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getSchmeNm() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getSchmeNm().getCd() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId() != null) {
map.put("fieldB50Account", "//CH" + cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId());
}
}else if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId() != null){
map.put("fieldB50Account",cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getOthr().getId());
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202COV Field50K error");
}
}
}
\ No newline at end of file
package com.prowidesoftware.brilliance.mx2mt.mt202cov202.impl.cov;
import com.prowidesoftware.brilliance.exception.SwiftException;
import com.prowidesoftware.brilliance.mx2mt.AbstractMx2MtFieldsGenerate;
import com.prowidesoftware.swift.model.mx.MxPacs00900102;
import com.prowidesoftware.swift.model.mx.dic.CreditTransferTransactionInformation13;
import com.prowidesoftware.swift.model.mx.dic.FinancialInstitutionCreditTransferV02;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 1,若节点<Nm>有值,则设置B\52 option为“D”,且名称取自此节点,而地址需要合并截取???
* 2,账号取值规则和节点与B\52A相同
* <CdtTrfTxInf>[1]<UndrlygCstmrCdtTrf><DbtrAgt><FinInstnId><Nm>
* <CdtTrfTxInf>[1]<UndrlygCstmrCdtTrf><DbtrAgt><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
*/
public class FieldB52DGenerate extends AbstractMx2MtFieldsGenerate {
private static final Logger logger = LoggerFactory.getLogger(FieldB52DGenerate.class);
@Override
public void fieldsGenerate() throws SwiftException {
logger.info("FieldB52DGenerate start.");
try {
MxPacs00900102 obj = (MxPacs00900102)map.get("mxObj");
if (obj == null || obj.getFinInstnCdtTrf() == null) {
return;
}
FinancialInstitutionCreditTransferV02 finInstnCdtTrf = obj.getFinInstnCdtTrf();
List<CreditTransferTransactionInformation13> cdtTrfTxInf = finInstnCdtTrf.getCdtTrfTxInf();
if (cdtTrfTxInf != null && cdtTrfTxInf.size() > 0
&& cdtTrfTxInf.get(0) != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgt() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgt().getFinInstnId() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgt().getFinInstnId().getNm() != null){
map.put("fieldB52Option","D");
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgt().getFinInstnId().getPstlAdr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgt().getFinInstnId().getPstlAdr().getAdrLine() != null){
List<String> adrList = cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgt().getFinInstnId().getPstlAdr().getAdrLine();
String adStr = "";
for (int i = 0; i<adrList.size(); i++){
adStr = adStr + adrList.get(i);
}
map.put("fieldB52D",adStr);
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAcct().getId().getIBAN() != null){
map.put("fieldB52Account","/"+cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getIBAN());
}
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr().getSchmeNm() != null
&& cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr().getSchmeNm().getCd() != null){
if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr().getId() != null) {
map.put("fieldB52Account", "//CH" + cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr().getId());
}
}else if (cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr().getId() != null){
map.put("fieldB52Account",cdtTrfTxInf.get(0).getUndrlygCstmrCdtTrf().getDbtrAgtAcct().getId().getOthr().getId());
}
}
}
}
}
} catch(Exception e) {
logger.error(e.getMessage());
throw new SwiftException("ERROR", "Convert MT202COV Field52D error");
}
}
}
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