Commit e5f79972 by zhanghou

将mt2-20221121分支的代码合并到psbc分支

parent d893a087
package com.brilliance.swift.context;
import java.io.Serializable;
import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ContextImpl implements Context, Serializable {
......
......@@ -13,7 +13,7 @@ import java.util.*;
public abstract class AbstractElement2MxCreator implements Element2MxCreator{
protected Map<String, Object> jsonMaps = new HashMap<>();
protected Map<String, Object> jsonMaps = new HashMap<String, Object>();
/**
* 目标xml
......@@ -30,7 +30,7 @@ public abstract class AbstractElement2MxCreator implements Element2MxCreator{
this.xmlStr = xmlStr;
}
protected Map<String, Object> elementMaps = new HashMap<>();
protected Map<String, Object> elementMaps = new HashMap<String, Object>();
public Map<String, Object> getElementMaps() {
return elementMaps;
......@@ -108,7 +108,7 @@ public abstract class AbstractElement2MxCreator implements Element2MxCreator{
if (keyPath.startsWith("@")) {
String methodName = keyPath.substring(1);
String[] methodNames = methodName.split("&");
List<Object> obj = new ArrayList<>();
List<Object> obj = new ArrayList<Object>();
obj.add(targetMap.get(key));
if (methodNames.length > 1) {
for (int i=1; i<methodNames.length; i++) {
......@@ -157,14 +157,14 @@ public abstract class AbstractElement2MxCreator implements Element2MxCreator{
JSONArray jsonArray = new JSONArray();
JSONArray keyVJsonArray = (JSONArray)keyV;
for (int i=0; i<keyVJsonArray.size(); i++) {
Map<String, Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<String, Object>();
Map<String, Object> keyVMap = (Map<String, Object>)keyVJsonArray.get(i);
buildMap(map, keyVMap, subProperties);
jsonArray.add(map);
}
return jsonArray;
} else /*if (keyV instanceof JSONObject)*/ {
Map<String, Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<String, Object>();
Map<String, Object> keyVMap = (Map<String, Object>)keyV;
buildMap(map, keyVMap, subProperties);
return map;
......@@ -199,11 +199,11 @@ public abstract class AbstractElement2MxCreator implements Element2MxCreator{
if (isArray(path)|| isArray(parentPath+"."+path)) {
JSONArray jsonArray = new JSONArray();
map.put(path, jsonArray);
Map<String, Object> subMap = new HashMap<>();
Map<String, Object> subMap = new HashMap<String, Object>();
jsonArray.add(subMap);
map = subMap;
} else {
Map<String, Object> subMap = new HashMap<>();
Map<String, Object> subMap = new HashMap<String, Object>();
map.put(path, subMap);
map = subMap;
}
......@@ -236,11 +236,11 @@ public abstract class AbstractElement2MxCreator implements Element2MxCreator{
if (isArray(path)|| isArray(parentPath+"."+path)) {
JSONArray jsonArray = new JSONArray();
map.put(path, jsonArray);
Map<String, Object> subMap = new HashMap<>();
Map<String, Object> subMap = new HashMap<String, Object>();
jsonArray.add(subMap);
map = subMap;
} else {
Map<String, Object> subMap = new HashMap<>();
Map<String, Object> subMap = new HashMap<String, Object>();
map.put(path, subMap);
map = subMap;
}
......
package com.brilliance.swift.element2mx.camt052001;
import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.element2mx.AbstractElement2MxCreator;
import com.brilliance.swift.util.StringUtil;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Element2MxCamt052001Creator extends AbstractElement2MxCreator {
......
......@@ -64,7 +64,7 @@ public class Element2MxCamt053001Creator extends AbstractElement2MxCreator {
}
}
if (balMap == null) {
balMap = new HashMap<>();
balMap = new HashMap<String, Object>();
putObj(balMap, "tp.cdOrPrtry.cd", balanceType);
jsonArray.add(balMap);
}
......
......@@ -4,7 +4,10 @@ import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.element2mx.AbstractElement2MxCreator;
import com.brilliance.swift.util.StringUtil;
import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Element2MxCamt060001Creator extends AbstractElement2MxCreator {
......@@ -78,7 +81,7 @@ public class Element2MxCamt060001Creator extends AbstractElement2MxCreator {
}
}
if (rptMap == null) {
rptMap = new HashMap<>();
rptMap = new HashMap<String, Object>();
putObj(rptMap, "acctRptgReq.rptgReq.reqdMsgNmId", msgNameId);
jsonArray.add(rptMap);
}
......@@ -103,7 +106,7 @@ public class Element2MxCamt060001Creator extends AbstractElement2MxCreator {
}
}
if (flrMap == null) {
flrMap = new HashMap<>();
flrMap = new HashMap<String, Object>();
putObj(flrMap, "cdtDbtInd", type2);
jsonArray2.add(flrMap);
}
......
......@@ -29,8 +29,8 @@ public class Element2MxPacs004001Creator extends AbstractElement2MxCreator {
List<String> list1 = null;
for (int i=0; i<jsonArray.size(); i++) {
if (i % 3 == 0) {
list1 = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
list1 = new ArrayList<String>();
Map<String, Object> map = new HashMap<String, Object>();
map.put("addtlRmtInf", list1);
sourceJsonArray.add(map);
}
......
......@@ -27,16 +27,16 @@ public class Element2MxPacs008001Creator extends AbstractElement2MxCreator {
public void buildRgltryRptg(HashMap<String,Object> maps, Object obj) {
List<Object> objList = (List<Object>)obj;
JSONArray jsonArray = (JSONArray)objList.get(0);
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
for (int i=0; i<jsonArray.size(); i++) {
list.add((String) jsonArray.get(i));
}
JSONArray rgltryRptgJsonArray = new JSONArray();
Map<String, Object> rgltryRptgMap = new HashMap<>();
Map<String, Object> rgltryRptgMap = new HashMap<String, Object>();
rgltryRptgJsonArray.add(rgltryRptgMap);
JSONArray dtlsJsonArray = new JSONArray();
rgltryRptgMap.put("dtls", dtlsJsonArray);
Map<String, Object> dtlsRptgMap = new HashMap<>();
Map<String, Object> dtlsRptgMap = new HashMap<String, Object>();
dtlsJsonArray.add(dtlsRptgMap);
dtlsRptgMap.put("inf", list);
putObj(maps, "fiToFICstmrCdtTrf.cdtTrfTxInf.rgltryRptg", rgltryRptgJsonArray);
......@@ -49,8 +49,8 @@ public class Element2MxPacs008001Creator extends AbstractElement2MxCreator {
List<String> list1 = null;
for (int i=0; i<jsonArray.size(); i++) {
if (i % 3 == 0) {
list1 = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
list1 = new ArrayList<String>();
Map<String, Object> map = new HashMap<String, Object>();
map.put("addtlRmtInf", list1);
sourceJsonArray.add(map);
}
......@@ -64,7 +64,7 @@ public class Element2MxPacs008001Creator extends AbstractElement2MxCreator {
JSONArray rltdRmtInfJsonArray = new JSONArray();
JSONArray jsonArray = (JSONArray)objList.get(0);
for (int i=0; i<jsonArray.size(); i++) {
Map<String, Object> rltdRmtInfMap = new HashMap<>();
Map<String, Object> rltdRmtInfMap = new HashMap<String, Object>();
rltdRmtInfMap.put("rmtId", jsonArray.get(i));
rltdRmtInfJsonArray.add(rltdRmtInfMap);
}
......
......@@ -26,8 +26,8 @@ public class Element2MxPacs009001Creator extends AbstractElement2MxCreator {
List<String> list1 = null;
for (int i=0; i<jsonArray.size(); i++) {
if (i % 3 == 0) {
list1 = new ArrayList<>();
Map<String, Object> map = new HashMap<>();
list1 = new ArrayList<String>();
Map<String, Object> map = new HashMap<String, Object>();
map.put("addtlRmtInf", list1);
sourceJsonArray.add(map);
}
......
......@@ -12,7 +12,6 @@ import com.prowidesoftware.swift.model.field.Field50F;
import com.prowidesoftware.swift.model.field.Field50K;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
//汇款人信息
......
......@@ -9,7 +9,6 @@ import com.prowidesoftware.swift.model.field.Field52A;
import com.prowidesoftware.swift.model.field.Field52D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//指示行信息
public class Camt054001Parse52For900Field extends AbstractMt2MxCamt054001ParseField {
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field52A;
import com.prowidesoftware.swift.model.field.Field52D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//指示行信息
public class Camt054001Parse52For910Field extends AbstractMt2MxCamt054001ParseField {
......
......@@ -9,7 +9,6 @@ import com.prowidesoftware.swift.model.field.Field56A;
import com.prowidesoftware.swift.model.field.Field56D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//中间行信息
public class Camt054001Parse56Field extends AbstractMt2MxCamt054001ParseField {
......
......@@ -7,7 +7,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field21;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//这个域是将业务编号存入map集合中
public class Camt057001Parse21Field extends AbstractMt2MxCamt057001ParseField {
......
......@@ -7,7 +7,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field25;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//账号信息
public class Camt057001Parse25Field extends AbstractMt2MxCamt057001ParseField {
......
......@@ -8,7 +8,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field32B;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//货币和金额
public class Camt057001Parse32BField extends AbstractMt2MxCamt057001ParseField {
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field50C;
import com.prowidesoftware.swift.model.field.Field50F;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
//汇款人
......
......@@ -8,7 +8,6 @@ import com.prowidesoftware.swift.model.field.Field52A;
import com.prowidesoftware.swift.model.field.Field52D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//指示行
public class Camt057001Parse52Field extends AbstractMt2MxCamt057001ParseField {
......
......@@ -8,7 +8,6 @@ import com.prowidesoftware.swift.model.field.Field56A;
import com.prowidesoftware.swift.model.field.Field56D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
//中间行
public class Camt057001Parse56Field extends AbstractMt2MxCamt057001ParseField {
......
package com.brilliance.swift.mt2mx.pacs004001.mt103retn;
import com.brilliance.swift.constants.ERROR;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mt2mx.pacs004001.AbstractMt2MxPacs004001ParseField;
......
package com.brilliance.swift.mt2mx.pacs004001.mt103retn;
import com.brilliance.swift.constants.ERROR;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mt2mx.pacs004001.AbstractMt2MxPacs004001ParseField;
import com.brilliance.swift.vo.VoSettlementMethodHelper;
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field52A;
import com.prowidesoftware.swift.model.field.Field52D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs00801Parse52Field extends AbstractMt2MxPacs008001ParseField {
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field53A;
import com.prowidesoftware.swift.model.field.Field53D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs00801Parse53Field extends AbstractMt2MxPacs008001ParseField {
......
......@@ -12,7 +12,6 @@ import com.prowidesoftware.swift.model.field.Field54B;
import com.prowidesoftware.swift.model.field.Field54D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs00801Parse54Field extends AbstractMt2MxPacs008001ParseField {
......
......@@ -12,7 +12,6 @@ import com.prowidesoftware.swift.model.field.Field55B;
import com.prowidesoftware.swift.model.field.Field55D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
/**
......
......@@ -11,7 +11,6 @@ import com.prowidesoftware.swift.model.field.Field56C;
import com.prowidesoftware.swift.model.field.Field56D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs00801Parse56Field extends AbstractMt2MxPacs008001ParseField {
......
......@@ -13,7 +13,6 @@ import com.prowidesoftware.swift.model.field.Field57C;
import com.prowidesoftware.swift.model.field.Field57D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs00801Parse57Field extends AbstractMt2MxPacs008001ParseField {
......
......@@ -9,7 +9,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field70;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs00801Parse70Field extends AbstractMt2MxPacs008001ParseField {
......
......@@ -11,7 +11,6 @@ import com.prowidesoftware.swift.model.field.Field53B;
import com.prowidesoftware.swift.model.field.Field53D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
/**
......
......@@ -9,7 +9,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field52A;
import com.prowidesoftware.swift.model.field.Field52D;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001Parse52Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field53A;
import com.prowidesoftware.swift.model.field.Field53D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001Parse53Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -12,7 +12,6 @@ import com.prowidesoftware.swift.model.field.Field54B;
import com.prowidesoftware.swift.model.field.Field54D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001Parse54Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -8,7 +8,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field56A;
import com.prowidesoftware.swift.model.field.Field56D;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001Parse56Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field57A;
import com.prowidesoftware.swift.model.field.Field57B;
import com.prowidesoftware.swift.model.field.Field57D;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001Parse57Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -9,7 +9,6 @@ import com.prowidesoftware.swift.model.field.Field58A;
import com.prowidesoftware.swift.model.field.Field58D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001Parse58Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -10,7 +10,6 @@ import com.prowidesoftware.swift.model.field.Field52A;
import com.prowidesoftware.swift.model.field.Field52D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001ParseSeqB52Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -11,7 +11,6 @@ import com.prowidesoftware.swift.model.field.Field56C;
import com.prowidesoftware.swift.model.field.Field56D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001ParseSeqB56Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -9,7 +9,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.*;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001ParseSeqB57Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -7,7 +7,6 @@ import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field70;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
public class Pacs009001ParseSeqB70Field extends AbstractMt2MxPacs009001ParseField {
......
......@@ -11,7 +11,6 @@ import com.prowidesoftware.swift.model.field.Field53B;
import com.prowidesoftware.swift.model.field.Field53D;
import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.util.HashMap;
import java.util.Map;
/**
......
......@@ -10,7 +10,10 @@ import com.prowidesoftware.swift.model.mx.AbstractMX;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -21,7 +24,7 @@ public abstract class AbstractMx2ElementCreator implements Mx2ElementCreator{
protected String xmlStr;
protected Map<String, Object> maps = new LinkedHashMap<>();
protected Map<String, Object> maps = new LinkedHashMap<String, Object>();
protected String messageType;
......@@ -133,10 +136,10 @@ public abstract class AbstractMx2ElementCreator implements Mx2ElementCreator{
if (i == paths.length - 1) {
return jsonArray;
} else { //不是最后一层
if (Objects.nonNull(condition)) {
if (condition != null && condition.length > 0) {
for (int j = 0; j < jsonArray.size(); j++) {
Object xmlValue = getXmlValue((Map<String, Object>) jsonArray.get(j), condition[0].replaceAll("-", "."));
if (Objects.equals(condition[1], xmlValue)) {
if (StringUtil.isNotEmpty(condition[1]) && condition[1].equals(xmlValue)) {
obj = jsonArray.get(j); break;
}
if (j == jsonArray.size() - 1) {
......@@ -153,9 +156,9 @@ public abstract class AbstractMx2ElementCreator implements Mx2ElementCreator{
}
}
} else if (obj instanceof JSONObject) {
if (Objects.nonNull(condition)) {
if (condition != null && condition.length > 0) {
Object xmlValue = getXmlValue((Map<String, Object>) obj, condition[0].replaceAll("-", "."));
if (!Objects.equals(condition[1], xmlValue)) {
if (StringUtil.isNotEmpty(condition[1]) && !condition[1].equals(xmlValue)) {
return null;
}
}
......@@ -188,7 +191,7 @@ public abstract class AbstractMx2ElementCreator implements Mx2ElementCreator{
//找不到子配置文件 默认取subPropName节点的值
if (obj instanceof JSONArray) { //当前obj是JSONARRAY,需要循环获取subPropName节点值
JSONArray jsonArray = (JSONArray)obj;
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
for (int i=0; i<jsonArray.size(); i++) {
Object jsonObj = jsonArray.get(i);
if (jsonObj instanceof JSONObject) {
......@@ -205,11 +208,11 @@ public abstract class AbstractMx2ElementCreator implements Mx2ElementCreator{
List<String> properties = StringUtil.inputStreamToLines(resourceAsStream);
if (obj instanceof JSONArray) { //当前obj是JSONARRAY,需要循环获取子配置文件
JSONArray jsonArray = (JSONArray)obj;
List<Map<String, Object>> subMapList = new ArrayList<>();
List<Map<String, Object>> subMapList = new ArrayList<Map<String, Object>>();
for (int i=0; i<jsonArray.size(); i++) {
Object jsonObj = jsonArray.get(i);
if (jsonObj instanceof JSONObject) {
Map<String, Object> subMaps = new LinkedHashMap<>();
Map<String, Object> subMaps = new LinkedHashMap<String, Object>();
readPropertyFile((Map<String, Object>)jsonObj, subMaps, properties);
if (subMaps.size() > 0) {
subMapList.add(subMaps);
......@@ -218,7 +221,7 @@ public abstract class AbstractMx2ElementCreator implements Mx2ElementCreator{
}
return subMapList;
} else if (obj instanceof JSONObject) { //当前对象是JSONOBJECT
Map<String, Object> subMaps = new LinkedHashMap<>();
Map<String, Object> subMaps = new LinkedHashMap<String, Object>();
readPropertyFile((Map<String, Object>)obj, subMaps, properties);
return subMaps;
}
......
......@@ -104,9 +104,9 @@ public class Mx2ElementCamt053001Creator extends AbstractMx2ElementCreator {
String fileName = "/template/"+p.split("#")[1]+".properties";
InputStream resourceAsStream = AbstractMx2ElementCreator.class.getResourceAsStream(fileName);
List<String> properties = StringUtil.inputStreamToLines(resourceAsStream);
List<Map<String,Object>> list = new ArrayList<>();
List<String> keyList = new ArrayList<>();
List<String> valueList = new ArrayList<>();
List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
List<String> keyList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
if (properties.size() > 0) {
for (String property : properties) {
if (property.startsWith("#")) {
......@@ -125,7 +125,7 @@ public class Mx2ElementCamt053001Creator extends AbstractMx2ElementCreator {
}
}
for (int i1 = 0; i1 < array.size(); i1++) {
Map<String,Object> entryMaps = new LinkedHashMap<>();
Map<String,Object> entryMaps = new LinkedHashMap<String,Object>();
for (int j1 = 0; j1 < valueList.size(); j1++) {
Object xmlValue = getXmlValue((Map<String, Object>) array.get(i1), valueList.get(j1), 0);
if(xmlValue!=null){
......@@ -206,10 +206,10 @@ public class Mx2ElementCamt053001Creator extends AbstractMx2ElementCreator {
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
String bodyParentPath = parentElementMaps.get("Stmt");
int entryCount = XmlUtil.getChildrenCount(document, bodyParentPath+".Stmt.Ntry", null);
List<Map<String, Object>> list = new ArrayList<>();
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
if(entryCount>0){
for (int i = 0; i < entryCount; i++) {
Map<String, Object> entryMaps = new LinkedHashMap<>();
Map<String, Object> entryMaps = new LinkedHashMap<String, Object>();
String ntryRef = XmlUtil.getXmlNodeValue(document, bodyParentPath+".Stmt.Ntry("+i+").NtryRef");
if (StringUtil.isNotEmpty(ntryRef)) {
entryMaps.put("ntryRef", ntryRef);
......
......@@ -123,7 +123,7 @@ public class Mx2ElementCamt054001Creator extends AbstractMx2ElementCreator {
int adrLineCount = XmlUtil.getChildrenCount(document, bodyParentPath+".Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.PstlAdr.AdrLine", null);
if (adrLineCount > 0) {
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
for (int i=0; i<adrLineCount; i++) {
String adrLine = XmlUtil.getXmlNodeValue(document, bodyParentPath+".Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.PstlAdr.AdrLine("+i+")");
list.add(adrLine);
......@@ -221,7 +221,7 @@ public class Mx2ElementCamt054001Creator extends AbstractMx2ElementCreator {
}
int adrLineCount = XmlUtil.getChildrenCount(document, bodyParentPath+".Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Agt.FinInstnId.PstlAdr.AdrLine", null);
if (adrLineCount > 0) {
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
for (int i=0; i<adrLineCount; i++) {
String adrLine = XmlUtil.getXmlNodeValue(document, bodyParentPath+".Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Agt.FinInstnId.PstlAdr.AdrLine("+i+")");
list.add(adrLine);
......@@ -348,7 +348,7 @@ public class Mx2ElementCamt054001Creator extends AbstractMx2ElementCreator {
}
int adrLineCount = XmlUtil.getChildrenCount(document, path+".FinInstnId.PstlAdr.AdrLine", null);
if (adrLineCount > 0) {
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
for (int i=0; i<adrLineCount; i++) {
String adrLine = XmlUtil.getXmlNodeValue(document, path+".FinInstnId.PstlAdr.AdrLine("+i+")");
list.add(adrLine);
......
package com.brilliance.swift.mx2element.camt060001;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2element.AbstractMx2ElementCreator;
import com.brilliance.swift.util.XmlUtil;
import com.brilliance.swift.vo.common.CdtDbtCode;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import java.util.Map;
......
......@@ -22,7 +22,7 @@ public class Mx2ElementPacs004001Creator extends AbstractMx2ElementCreator {
Document document = DocumentHelper.parseText(xmlStr);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
String bodyParentPath = parentElementMaps.get("Strd");
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
int strdCount = XmlUtil.getChildrenCount(document, bodyParentPath + ".Strd", null);
if (strdCount > 0) {
for (int i = 0; i < strdCount; i++) {
......
......@@ -27,12 +27,12 @@ public class Mx2ElementPacs008001Creator extends AbstractMx2ElementCreator {
String bodyParentPath = parentElementMaps.get("CdtTrfTxInf");
int chrgsInfCount = XmlUtil.getChildrenCount(document, bodyParentPath+".CdtTrfTxInf.ChrgsInf", null);
if (chrgsInfCount > 0) {
List<Map<String, Object>> list = new ArrayList<>();
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
for (int i=0; i<chrgsInfCount; i++) {
String amt = XmlUtil.getXmlNodeValue(document, bodyParentPath+".CdtTrfTxInf.ChrgsInf("+i+").Amt");
String ccy = XmlUtil.getXmlNodeValue(document, bodyParentPath+".CdtTrfTxInf.ChrgsInf("+i+").Amt@Ccy");
if (StringUtil.isNotEmpty(ccy) && StringUtil.isNotEmpty(amt)) {
Map<String, Object> maps = new LinkedHashMap<>();
Map<String, Object> maps = new LinkedHashMap<String, Object>();
maps.put("ccy", ccy);
maps.put("amt", new BigDecimal(amt));
list.add(maps);
......@@ -52,7 +52,7 @@ public class Mx2ElementPacs008001Creator extends AbstractMx2ElementCreator {
Document document = DocumentHelper.parseText(xmlStr);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
String bodyParentPath = parentElementMaps.get("CdtTrfTxInf");
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
int mxRegulatoryReportingCount = XmlUtil.getChildrenCount(document, bodyParentPath+".CdtTrfTxInf.RgltryRptg", null);
if (mxRegulatoryReportingCount > 0) {
for (int i=0; i<mxRegulatoryReportingCount; i++) {
......@@ -86,7 +86,7 @@ public class Mx2ElementPacs008001Creator extends AbstractMx2ElementCreator {
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
String bodyParentPath = parentElementMaps.get("CdtTrfTxInf");
int rltdRmtInfCount = XmlUtil.getChildrenCount(document, bodyParentPath+".CdtTrfTxInf.RltdRmtInf", null);
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
if (rltdRmtInfCount > 0) {
for (int i=0; i<rltdRmtInfCount; i++) {
String rmtId = XmlUtil.getXmlNodeValue(document, bodyParentPath+".CdtTrfTxInf.RltdRmtInf("+i+").RmtId");
......@@ -110,7 +110,7 @@ public class Mx2ElementPacs008001Creator extends AbstractMx2ElementCreator {
Document document = DocumentHelper.parseText(xmlStr);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
String bodyParentPath = parentElementMaps.get("CdtTrfTxInf");
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
int strdCount = XmlUtil.getChildrenCount(document, bodyParentPath+".CdtTrfTxInf.RmtInf.Strd", null);
if (strdCount > 0) {
for (int i=0; i<strdCount; i++) {
......
......@@ -22,7 +22,7 @@ public class Mx2ElementPacs009001Creator extends AbstractMx2ElementCreator {
Document document = DocumentHelper.parseText(xmlStr);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
String bodyParentPath = parentElementMaps.get("CdtTrfTxInf");
List<String> list = new ArrayList<>();
List<String> list = new ArrayList<String>();
int strdCount = XmlUtil.getChildrenCount(document, bodyParentPath+".CdtTrfTxInf.UndrlygCstmrCdtTrf.RmtInf.Strd", null);
if (strdCount > 0) {
for (int i=0; i<strdCount; i++) {
......
......@@ -12,7 +12,6 @@ import com.brilliance.swift.mx2map.pacs008.Mx2MapPacs008Creator;
import com.brilliance.swift.mx2map.pacs009.Mx2MapPacs009Creator;
import com.brilliance.swift.util.XmlUtil;
import com.prowidesoftware.swift.model.MxId;
import com.prowidesoftware.swift.model.mx.AbstractMX;
import java.util.Map;
......
package com.brilliance.swift.mx2message;
import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.util.MessageUtil;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.common.CdtDbtCode;
......@@ -25,7 +22,7 @@ public abstract class AbstractMx2MessageCreator implements Mx2MessageCreator {
protected Template template;
protected Map<String, Object> maps = new LinkedHashMap<>();
protected Map<String, Object> maps = new LinkedHashMap<String, Object>();
public String getXmlStr() {
return xmlStr;
......@@ -56,13 +53,17 @@ public abstract class AbstractMx2MessageCreator implements Mx2MessageCreator {
}
protected String process() {
try (StringWriter stringWriter = new StringWriter()) {
try{
StringWriter stringWriter = new StringWriter();
maps.put("I18NHelper", new I18NHelper(localCode));
template.process(maps, stringWriter);
return stringWriter.toString();
} catch (IOException | TemplateException e) {
throw new SwiftException("template process error", e);
} catch (TemplateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
protected String addSuffixWithMessageType(Map<String, Object> elementMaps) {
......
......@@ -8,9 +8,9 @@ import com.brilliance.swift.mx2message.camt054.Mx2MessageCamt054Creator;
import com.brilliance.swift.mx2message.camt056.Mx2MessageCamt056Creator;
import com.brilliance.swift.mx2message.camt057.Mx2MessageCamt057Creator;
import com.brilliance.swift.mx2message.camt060.Mx2MessageCamt060Creator;
import com.brilliance.swift.mx2message.pacs008.Mx2MessagePacs008Creator;
import com.brilliance.swift.mx2message.pacs002.Mx2MessagePacs002Creator;
import com.brilliance.swift.mx2message.pacs004.Mx2MessagePacs004Creator;
import com.brilliance.swift.mx2message.pacs008.Mx2MessagePacs008Creator;
import com.brilliance.swift.mx2message.pacs009.Mx2MessagePacs009Creator;
import com.brilliance.swift.util.XmlUtil;
import com.prowidesoftware.swift.model.MxId;
......
......@@ -2,11 +2,9 @@ package com.brilliance.swift.mx2message.camt029;
import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import java.util.LinkedHashMap;
import java.util.Map;
public class Mx2MessageCamt029Creator extends AbstractMx2MessageCreator {
......
package com.brilliance.swift.mx2message.camt052;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import com.brilliance.swift.vo.common.CdtDbtCode;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
public class Mx2MessageCamt052Creator extends AbstractMx2MessageCreator {
......
package com.brilliance.swift.mx2message.camt053;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import com.brilliance.swift.vo.common.CdtDbtCode;
import java.math.BigDecimal;
import java.util.Map;
......
package com.brilliance.swift.mx2message.camt054;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import com.brilliance.swift.vo.common.CdtDbtCode;
import java.math.BigDecimal;
import java.util.Map;
......
......@@ -2,10 +2,8 @@ package com.brilliance.swift.mx2message.camt056;
import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import com.prowidesoftware.swift.model.mx.dic.Value;
import java.util.Map;
......
package com.brilliance.swift.mx2message.camt060;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
......
package com.brilliance.swift.mx2message.pacs008;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import com.brilliance.swift.vo.common.SettlementMethodCode;
......@@ -10,7 +9,6 @@ import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
public class Mx2MessagePacs008Creator extends AbstractMx2MessageCreator {
......
package com.brilliance.swift.mx2message.pacs009;
import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2message.AbstractMx2MessageCreator;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.common.CdtDbtCode;
import com.brilliance.swift.vo.common.SettlementMethodCode;
import com.prowidesoftware.swift.model.SwiftTagListBlock;
import com.prowidesoftware.swift.model.Tag;
......@@ -16,7 +13,6 @@ import com.prowidesoftware.swift.model.mt.AbstractMT;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -41,7 +37,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
if (elementMaps.get("sttlmAcctId") != null) {
maps.put("sttlmAcctId", elementMaps.get("sttlmAcctId"));
}
Map<String, Object> creditTransferMaps = new LinkedHashMap<>();
Map<String, Object> creditTransferMaps = new LinkedHashMap<String, Object>();
maps.put("creditTransferInfo", creditTransferMaps);
if (elementMaps.get("bizMsgIdr") != null) {
creditTransferMaps.put("bizMsgIdr", elementMaps.get("bizMsgIdr"));
......@@ -84,7 +80,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
//子交易信息
if (elementMaps.get("undrlygCstmrCdtTrf") != null) {
Map<String, Object> undrlygCstmrCdtTrfMaps = (Map<String, Object>)elementMaps.get("undrlygCstmrCdtTrf");
Map<String, Object> undrlyTxnMaps = new LinkedHashMap<>();
Map<String, Object> undrlyTxnMaps = new LinkedHashMap<String, Object>();
maps.put("undrlygCstmrCdtTrfInfo", undrlyTxnMaps);
buildPartyInfo(undrlyTxnMaps, "dbtr", undrlygCstmrCdtTrfMaps);
buildAgentInfo(undrlyTxnMaps, "dbtrAgt", undrlygCstmrCdtTrfMaps);
......@@ -147,7 +143,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
}
}
if (existFlag) {
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put(name+"Info", newMaps);
for (String key : keys) {
if (elementMaps.get(key) != null) {
......@@ -165,7 +161,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
Object vlu = elementMaps.get(name);
if (vlu instanceof Map) {
Map<String, String> agentMap = (Map<String, String>) vlu;
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put(name + "Info", newMaps);
keys = new String[]{"acctIdIban", "acctId", "nm", "orgAnyBIC"};
for (String key : keys) {
......@@ -201,7 +197,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
}
}
if (existFlag) {
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put(name + "Info", newMaps);
for (String key : keys) {
if (elementMaps.get(key) != null) {
......@@ -219,7 +215,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
Object vlu = elementMaps.get(name);
if (vlu instanceof Map) {
Map<String, String> agentMap = (Map<String, String>) vlu;
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put(name + "Info", newMaps);
keys = new String[]{"bicfi", "nm"};
for (String key : keys) {
......@@ -249,7 +245,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
}
}
if (existFlag) {
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put(subMapName, newMaps);
for (String key : keys) {
if (elementMaps.get(key) != null) {
......@@ -274,7 +270,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
private void buildInstgRmbrsmntAgtInfo(Map<String, Object> targetMaps, AbstractMT abstractMT) {
Tag tag = abstractMT.getSwiftMessage().getBlock4().getTagByName("53A");
if (tag != null) {
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put("instgRmbrsmntAgtInfo", newMaps);
Field53A field53A = (Field53A)tag.asField();
String bicCode = field53A.getBIC();
......@@ -288,7 +284,7 @@ public class Mx2MessagePacs009Creator extends AbstractMx2MessageCreator {
}
tag = abstractMT.getSwiftMessage().getBlock4().getTagByName("53B");
if (tag != null) {
Map<String, Object> newMaps = new LinkedHashMap<>();
Map<String, Object> newMaps = new LinkedHashMap<String, Object>();
targetMaps.put("instgRmbrsmntAgtInfo", newMaps);
Field53B field53B = (Field53B)tag.asField();
String account = field53B.getComponent2();
......
......@@ -10,7 +10,9 @@ import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class DateUtil {
......
package com.brilliance.swift.vo;
import com.brilliance.swift.vo.common.*;
import com.brilliance.swift.vo.common.CashBalance;
import com.brilliance.swift.vo.common.PartyAccount;
import com.brilliance.swift.vo.common.ReportEntry;
import com.brilliance.swift.vo.common.TransactionReference;
import java.util.ArrayList;
import java.util.List;
......
package com.brilliance.swift.vo;
import com.brilliance.swift.vo.common.CcyFormatAmount;
import com.brilliance.swift.vo.common.TransactionReference;
import java.util.Date;
......
<?xml version="1.0" encoding="UTF-8" ?><Saa:DataPDU xmlns:Saa="urn:swift:saa:xsd:saa.2.0" xmlns:Sw="urn:swift:snl:ns.Sw" xmlns:SwInt="urn:swift:snl:ns.SwInt" xmlns:SwGbl="urn:swift:snl:ns.SwGbl" xmlns:SwSec="urn:swift:snl:ns.SwSec"><Saa:Revision>2.0.14</Saa:Revision><Saa:Header><Saa:Message><Saa:SenderReference>OCITIUS33XXX008$22101426</Saa:SenderReference><Saa:MessageIdentifier>camt.054.001.08</Saa:MessageIdentifier><Saa:Format>MX</Saa:Format><Saa:SubFormat>Output</Saa:SubFormat><Saa:Sender><Saa:DN>ou=xxx,o=citius33,o=swift</Saa:DN><Saa:FullName><Saa:X1>CITIUS33XXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Sender><Saa:Receiver><Saa:DN>ou=xxx,o=psbccnbj,o=swift</Saa:DN><Saa:FullName><Saa:X1>PSBCCNBJXXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Receiver><Saa:InterfaceInfo><Saa:MessageCreator>SWIFTNetInterface</Saa:MessageCreator><Saa:MessageContext>Copy</Saa:MessageContext><Saa:MessageNature>Financial</Saa:MessageNature><Saa:Sumid>1CB73876FFFFFFE5</Saa:Sumid><Saa:ServiceURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw</Saa:ServiceURI><Saa:MessageTypeURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw/_XC3TFV9CEeyfdsiuljUhuQ</Saa:MessageTypeURI></Saa:InterfaceInfo><Saa:NetworkInfo><Saa:Priority>Normal</Saa:Priority><Saa:IsPossibleDuplicate>false</Saa:IsPossibleDuplicate><Saa:Service>swift.finplus!pf</Saa:Service><Saa:Network>SWIFTNet</Saa:Network><Saa:SessionNr>000002</Saa:SessionNr><Saa:SeqNr>000000020</Saa:SeqNr><Saa:TransactionData><Saa:TransactionDataResult>Success</Saa:TransactionDataResult></Saa:TransactionData><Saa:TranslatedResult>Partial</Saa:TranslatedResult><Saa:SWIFTNetNetworkInfo><Saa:RequestType>camt.054.001.08</Saa:RequestType><Saa:RequestSubtype>swift.cbprplus.02</Saa:RequestSubtype><Saa:SWIFTRef>swi99998-2022-10-14T02:16:39.0012.081324Z</Saa:SWIFTRef><Saa:SNLRef>SNL99998-2022-10-14T02:16:39.1.038631Z</Saa:SNLRef><Saa:Reference>c1185596-c910-4ed4-9aa8-6bc17400cabb</Saa:Reference><Saa:SnFQueueName>psbccnbj_finplusfut!p</Saa:SnFQueueName><Saa:SnFInputTime>0301:2022-10-14T02:16:39</Saa:SnFInputTime><Saa:SnFDeliveryTime>2022-10-14T02:16:39Z</Saa:SnFDeliveryTime><Saa:ValidationDescriptor><SwInt:ValResult>Success</SwInt:ValResult></Saa:ValidationDescriptor></Saa:SWIFTNetNetworkInfo></Saa:NetworkInfo><Saa:SecurityInfo><Saa:TransactionDataSecurityResult>Success</Saa:TransactionDataSecurityResult><Saa:SWIFTNetSecurityInfo><Saa:SignatureResult>Success</Saa:SignatureResult><Saa:SignatureValue><SwSec:Signature><SwSec:SignedInfo><Sw:Reference><Sw:DigestValue>RR8RZSDO6H2ebW2oLULEyoLP+W6XbZAkyNAsNO6xgrU=</Sw:DigestValue></Sw:Reference></SwSec:SignedInfo><SwSec:SignatureValue>PEMF@Proc-Type: 4,MIC-ONLY
<?xml version="1.0" encoding="UTF-8" ?>
<Saa:DataPDU xmlns:Saa="urn:swift:saa:xsd:saa.2.0" xmlns:Sw="urn:swift:snl:ns.Sw" xmlns:SwInt="urn:swift:snl:ns.SwInt"
xmlns:SwSec="urn:swift:snl:ns.SwSec"><Saa:Revision>2.0.14</Saa:Revision><Saa:Header><Saa:Message><Saa:SenderReference>OCITIUS33XXX008$22101426</Saa:SenderReference><Saa:MessageIdentifier>camt.054.001.08</Saa:MessageIdentifier><Saa:Format>MX</Saa:Format><Saa:SubFormat>Output</Saa:SubFormat><Saa:Sender><Saa:DN>ou=xxx,o=citius33,o=swift</Saa:DN><Saa:FullName><Saa:X1>CITIUS33XXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Sender><Saa:Receiver><Saa:DN>ou=xxx,o=psbccnbj,o=swift</Saa:DN><Saa:FullName><Saa:X1>PSBCCNBJXXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Receiver><Saa:InterfaceInfo><Saa:MessageCreator>SWIFTNetInterface</Saa:MessageCreator><Saa:MessageContext>Copy</Saa:MessageContext><Saa:MessageNature>Financial</Saa:MessageNature><Saa:Sumid>1CB73876FFFFFFE5</Saa:Sumid><Saa:ServiceURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw</Saa:ServiceURI><Saa:MessageTypeURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw/_XC3TFV9CEeyfdsiuljUhuQ</Saa:MessageTypeURI></Saa:InterfaceInfo><Saa:NetworkInfo><Saa:Priority>Normal</Saa:Priority><Saa:IsPossibleDuplicate>false</Saa:IsPossibleDuplicate><Saa:Service>swift.finplus!pf</Saa:Service><Saa:Network>SWIFTNet</Saa:Network><Saa:SessionNr>000002</Saa:SessionNr><Saa:SeqNr>000000020</Saa:SeqNr><Saa:TransactionData><Saa:TransactionDataResult>Success</Saa:TransactionDataResult></Saa:TransactionData><Saa:TranslatedResult>Partial</Saa:TranslatedResult><Saa:SWIFTNetNetworkInfo><Saa:RequestType>camt.054.001.08</Saa:RequestType><Saa:RequestSubtype>swift.cbprplus.02</Saa:RequestSubtype><Saa:SWIFTRef>swi99998-2022-10-14T02:16:39.0012.081324Z</Saa:SWIFTRef><Saa:SNLRef>SNL99998-2022-10-14T02:16:39.1.038631Z</Saa:SNLRef><Saa:Reference>c1185596-c910-4ed4-9aa8-6bc17400cabb</Saa:Reference><Saa:SnFQueueName>psbccnbj_finplusfut!p</Saa:SnFQueueName><Saa:SnFInputTime>0301:2022-10-14T02:16:39</Saa:SnFInputTime><Saa:SnFDeliveryTime>2022-10-14T02:16:39Z</Saa:SnFDeliveryTime><Saa:ValidationDescriptor><SwInt:ValResult>Success</SwInt:ValResult></Saa:ValidationDescriptor></Saa:SWIFTNetNetworkInfo></Saa:NetworkInfo><Saa:SecurityInfo><Saa:TransactionDataSecurityResult>Success</Saa:TransactionDataSecurityResult><Saa:SWIFTNetSecurityInfo><Saa:SignatureResult>Success</Saa:SignatureResult><Saa:SignatureValue><SwSec:Signature><SwSec:SignedInfo><Sw:Reference><Sw:DigestValue>RR8RZSDO6H2ebW2oLULEyoLP+W6XbZAkyNAsNO6xgrU=</Sw:DigestValue></Sw:Reference></SwSec:SignedInfo><SwSec:SignatureValue>PEMF@Proc-Type: 4,MIC-ONLY
Content-Domain: RFC822
EntrustFile-Version: 2.0
Originator-DN: cn=%52,cn=test,ou=transaction-signing,ou=transactionmanager,o=swift,o=swift
......
<?xml version="1.0" encoding="UTF-8" ?><Saa:DataPDU xmlns:Saa="urn:swift:saa:xsd:saa.2.0" xmlns:Sw="urn:swift:snl:ns.Sw" xmlns:SwInt="urn:swift:snl:ns.SwInt" xmlns:SwGbl="urn:swift:snl:ns.SwGbl" xmlns:SwSec="urn:swift:snl:ns.SwSec"><Saa:Revision>2.0.14</Saa:Revision><Saa:Header><Saa:Message><Saa:SenderReference>OCITIUS33XXX008$22101426</Saa:SenderReference><Saa:MessageIdentifier>camt.054.001.08</Saa:MessageIdentifier><Saa:Format>MX</Saa:Format><Saa:SubFormat>Output</Saa:SubFormat><Saa:Sender><Saa:DN>ou=xxx,o=citius33,o=swift</Saa:DN><Saa:FullName><Saa:X1>CITIUS33XXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Sender><Saa:Receiver><Saa:DN>ou=xxx,o=psbccnbj,o=swift</Saa:DN><Saa:FullName><Saa:X1>PSBCCNBJXXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Receiver><Saa:InterfaceInfo><Saa:MessageCreator>SWIFTNetInterface</Saa:MessageCreator><Saa:MessageContext>Copy</Saa:MessageContext><Saa:MessageNature>Financial</Saa:MessageNature><Saa:Sumid>1CB73876FFFFFFE5</Saa:Sumid><Saa:ServiceURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw</Saa:ServiceURI><Saa:MessageTypeURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw/_XC3TFV9CEeyfdsiuljUhuQ</Saa:MessageTypeURI></Saa:InterfaceInfo><Saa:NetworkInfo><Saa:Priority>Normal</Saa:Priority><Saa:IsPossibleDuplicate>false</Saa:IsPossibleDuplicate><Saa:Service>swift.finplus!pf</Saa:Service><Saa:Network>SWIFTNet</Saa:Network><Saa:SessionNr>000002</Saa:SessionNr><Saa:SeqNr>000000020</Saa:SeqNr><Saa:TransactionData><Saa:TransactionDataResult>Success</Saa:TransactionDataResult></Saa:TransactionData><Saa:TranslatedResult>Partial</Saa:TranslatedResult><Saa:SWIFTNetNetworkInfo><Saa:RequestType>camt.054.001.08</Saa:RequestType><Saa:RequestSubtype>swift.cbprplus.02</Saa:RequestSubtype><Saa:SWIFTRef>swi99998-2022-10-14T02:16:39.0012.081324Z</Saa:SWIFTRef><Saa:SNLRef>SNL99998-2022-10-14T02:16:39.1.038631Z</Saa:SNLRef><Saa:Reference>c1185596-c910-4ed4-9aa8-6bc17400cabb</Saa:Reference><Saa:SnFQueueName>psbccnbj_finplusfut!p</Saa:SnFQueueName><Saa:SnFInputTime>0301:2022-10-14T02:16:39</Saa:SnFInputTime><Saa:SnFDeliveryTime>2022-10-14T02:16:39Z</Saa:SnFDeliveryTime><Saa:ValidationDescriptor><SwInt:ValResult>Success</SwInt:ValResult></Saa:ValidationDescriptor></Saa:SWIFTNetNetworkInfo></Saa:NetworkInfo><Saa:SecurityInfo><Saa:TransactionDataSecurityResult>Success</Saa:TransactionDataSecurityResult><Saa:SWIFTNetSecurityInfo><Saa:SignatureResult>Success</Saa:SignatureResult><Saa:SignatureValue><SwSec:Signature><SwSec:SignedInfo><Sw:Reference><Sw:DigestValue>RR8RZSDO6H2ebW2oLULEyoLP+W6XbZAkyNAsNO6xgrU=</Sw:DigestValue></Sw:Reference></SwSec:SignedInfo><SwSec:SignatureValue>PEMF@Proc-Type: 4,MIC-ONLY
<?xml version="1.0" encoding="UTF-8" ?>
<Saa:DataPDU xmlns:Saa="urn:swift:saa:xsd:saa.2.0" xmlns:Sw="urn:swift:snl:ns.Sw" xmlns:SwInt="urn:swift:snl:ns.SwInt"
xmlns:SwSec="urn:swift:snl:ns.SwSec"><Saa:Revision>2.0.14</Saa:Revision><Saa:Header><Saa:Message><Saa:SenderReference>OCITIUS33XXX008$22101426</Saa:SenderReference><Saa:MessageIdentifier>camt.054.001.08</Saa:MessageIdentifier><Saa:Format>MX</Saa:Format><Saa:SubFormat>Output</Saa:SubFormat><Saa:Sender><Saa:DN>ou=xxx,o=citius33,o=swift</Saa:DN><Saa:FullName><Saa:X1>CITIUS33XXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Sender><Saa:Receiver><Saa:DN>ou=xxx,o=psbccnbj,o=swift</Saa:DN><Saa:FullName><Saa:X1>PSBCCNBJXXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Receiver><Saa:InterfaceInfo><Saa:MessageCreator>SWIFTNetInterface</Saa:MessageCreator><Saa:MessageContext>Copy</Saa:MessageContext><Saa:MessageNature>Financial</Saa:MessageNature><Saa:Sumid>1CB73876FFFFFFE5</Saa:Sumid><Saa:ServiceURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw</Saa:ServiceURI><Saa:MessageTypeURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw/_XC3TFV9CEeyfdsiuljUhuQ</Saa:MessageTypeURI></Saa:InterfaceInfo><Saa:NetworkInfo><Saa:Priority>Normal</Saa:Priority><Saa:IsPossibleDuplicate>false</Saa:IsPossibleDuplicate><Saa:Service>swift.finplus!pf</Saa:Service><Saa:Network>SWIFTNet</Saa:Network><Saa:SessionNr>000002</Saa:SessionNr><Saa:SeqNr>000000020</Saa:SeqNr><Saa:TransactionData><Saa:TransactionDataResult>Success</Saa:TransactionDataResult></Saa:TransactionData><Saa:TranslatedResult>Partial</Saa:TranslatedResult><Saa:SWIFTNetNetworkInfo><Saa:RequestType>camt.054.001.08</Saa:RequestType><Saa:RequestSubtype>swift.cbprplus.02</Saa:RequestSubtype><Saa:SWIFTRef>swi99998-2022-10-14T02:16:39.0012.081324Z</Saa:SWIFTRef><Saa:SNLRef>SNL99998-2022-10-14T02:16:39.1.038631Z</Saa:SNLRef><Saa:Reference>c1185596-c910-4ed4-9aa8-6bc17400cabb</Saa:Reference><Saa:SnFQueueName>psbccnbj_finplusfut!p</Saa:SnFQueueName><Saa:SnFInputTime>0301:2022-10-14T02:16:39</Saa:SnFInputTime><Saa:SnFDeliveryTime>2022-10-14T02:16:39Z</Saa:SnFDeliveryTime><Saa:ValidationDescriptor><SwInt:ValResult>Success</SwInt:ValResult></Saa:ValidationDescriptor></Saa:SWIFTNetNetworkInfo></Saa:NetworkInfo><Saa:SecurityInfo><Saa:TransactionDataSecurityResult>Success</Saa:TransactionDataSecurityResult><Saa:SWIFTNetSecurityInfo><Saa:SignatureResult>Success</Saa:SignatureResult><Saa:SignatureValue><SwSec:Signature><SwSec:SignedInfo><Sw:Reference><Sw:DigestValue>RR8RZSDO6H2ebW2oLULEyoLP+W6XbZAkyNAsNO6xgrU=</Sw:DigestValue></Sw:Reference></SwSec:SignedInfo><SwSec:SignatureValue>PEMF@Proc-Type: 4,MIC-ONLY
Content-Domain: RFC822
EntrustFile-Version: 2.0
Originator-DN: cn=%52,cn=test,ou=transaction-signing,ou=transactionmanager,o=swift,o=swift
......
package com.brilliance;
import com.alibaba.fastjson.JSONArray;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
......
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