Commit fb14b1af by chengzhuoshen

修改mx转mt biccode的逻辑

parent 904a5834
......@@ -2,9 +2,9 @@ package com.brilliance.swift.constants;
public class Mx2MtConstants {
public static final String BICSUFFIX = "AXXX";
public static final String BICSUFFIX = "XXXX";
public static final String BICMIDDLE = "A";
public static final String BICMIDDLE = "X";
public static final String DRCRMARK_C = "C";
......
......@@ -52,11 +52,9 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
String processedBicCode = "";
if (!StringUtil.isEmpty(bicCode)) {
if (bicCode.length() == 8) {
//processedBicCode = bicCode + Mx2MtConstants.BICSUFFIX;
processedBicCode = bicCode + "XXXX";
processedBicCode = bicCode + Mx2MtConstants.BICSUFFIX;
} else if (bicCode.length() == 11) {
//processedBicCode = bicCode.substring(0, 8) + Mx2MtConstants.BICMIDDLE + bicCode.substring(8);
processedBicCode = bicCode.substring(0, 8) + "X" + bicCode.substring(8);
processedBicCode = bicCode.substring(0, 8) + Mx2MtConstants.BICMIDDLE + bicCode.substring(8);
} else {
throw new SwiftException("ERROR", "BicCode length is invalid.");
}
......
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