Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftMtMx
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
swiftMtMx
Commits
30d5ca3b
Commit
30d5ca3b
authored
Nov 10, 2022
by
yuanliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报文转要素功能
parent
2b903880
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
486 additions
and
3 deletions
+486
-3
Mx2ElementCreatorManager.java
...brilliance/swift/mx2element/Mx2ElementCreatorManager.java
+12
-3
Mx2ElementCamt057001Creator.java
...ft/mx2element/camt057001/Mx2ElementCamt057001Creator.java
+12
-0
Mx2ElementPacs002001Creator.java
...ft/mx2element/pacs002001/Mx2ElementPacs002001Creator.java
+12
-0
Mx2ElementPacs004001Creator.java
...ft/mx2element/pacs004001/Mx2ElementPacs004001Creator.java
+47
-0
AbstractMx2MapCreator.java
...va/com/brilliance/swift/mx2map/AbstractMx2MapCreator.java
+26
-0
Mx2MapCreatorManager.java
...ava/com/brilliance/swift/mx2map/Mx2MapCreatorManager.java
+15
-0
Mx2MapCamt029Creator.java
...brilliance/swift/mx2map/camt029/Mx2MapCamt029Creator.java
+74
-0
Mx2MapCamt056Creator.java
...brilliance/swift/mx2map/camt056/Mx2MapCamt056Creator.java
+77
-0
Mx2MapCamt057Creator.java
...brilliance/swift/mx2map/camt057/Mx2MapCamt057Creator.java
+54
-0
Mx2MapPacs002Creator.java
...brilliance/swift/mx2map/pacs002/Mx2MapPacs002Creator.java
+68
-0
Mx2MapPacs004Creator.java
...brilliance/swift/mx2map/pacs004/Mx2MapPacs004Creator.java
+89
-0
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2element/Mx2ElementCreatorManager.java
View file @
30d5ca3b
...
...
@@ -5,6 +5,9 @@ import com.brilliance.swift.mx2element.camt029001.Mx2ElementCamt029001Creator;
import
com.brilliance.swift.mx2element.camt053001.Mx2ElementCamt053001Creator
;
import
com.brilliance.swift.mx2element.camt054001.Mx2ElementCamt054001Creator
;
import
com.brilliance.swift.mx2element.camt056001.Mx2ElementCamt056001Creator
;
import
com.brilliance.swift.mx2element.camt057001.Mx2ElementCamt057001Creator
;
import
com.brilliance.swift.mx2element.pacs002001.Mx2ElementPacs002001Creator
;
import
com.brilliance.swift.mx2element.pacs004001.Mx2ElementPacs004001Creator
;
import
com.brilliance.swift.mx2element.pacs008001.Mx2ElementPacs008001Creator
;
import
com.brilliance.swift.mx2element.pacs009001.Mx2ElementPacs009001Creator
;
import
com.brilliance.swift.util.XmlUtil
;
...
...
@@ -28,9 +31,9 @@ public class Mx2ElementCreatorManager {
xmlStr
=
XmlUtil
.
handlingXml
(
xmlStr
);
MxId
mxId
=
XmlUtil
.
getMxMessageType
(
xmlStr
);
String
messageType
=
mxId
.
getBusinessProcess
().
name
()
+
mxId
.
getFunctionality
()
+
mxId
.
getVariant
()
+
mxId
.
getVersion
();
+
mxId
.
getFunctionality
()
+
mxId
.
getVariant
()
+
mxId
.
getVersion
();
if
(
mxId
==
null
)
{
throw
new
SwiftException
(
"找不到MX报文类型"
);
}
...
...
@@ -56,6 +59,12 @@ public class Mx2ElementCreatorManager {
return
new
Mx2ElementCamt029001Creator
();
}
else
if
(
messageType
.
matches
(
"camt056001[0-9]{2}"
))
{
return
new
Mx2ElementCamt056001Creator
();
}
else
if
(
messageType
.
matches
(
"pacs002001[0-9]{2}"
))
{
return
new
Mx2ElementPacs002001Creator
();
}
else
if
(
messageType
.
matches
(
"pacs004001[0-9]{2}"
))
{
return
new
Mx2ElementPacs004001Creator
();
}
else
if
(
messageType
.
matches
(
"camt057001[0-9]{2}"
))
{
return
new
Mx2ElementCamt057001Creator
();
}
else
{
throw
new
SwiftException
(
"无效的MX报文类型"
);
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2element/camt057001/Mx2ElementCamt057001Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2element
.
camt057001
;
import
com.brilliance.swift.mx2element.AbstractMx2ElementCreator
;
import
java.util.Map
;
public
class
Mx2ElementCamt057001Creator
extends
AbstractMx2ElementCreator
{
@Override
public
Map
<
String
,
Object
>
buildElement
()
{
return
super
.
buildElement
();
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2element/pacs002001/Mx2ElementPacs002001Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2element
.
pacs002001
;
import
com.brilliance.swift.mx2element.AbstractMx2ElementCreator
;
import
java.util.Map
;
public
class
Mx2ElementPacs002001Creator
extends
AbstractMx2ElementCreator
{
@Override
public
Map
<
String
,
Object
>
buildElement
()
{
return
super
.
buildElement
();
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2element/pacs004001/Mx2ElementPacs004001Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2element
.
pacs004001
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2element.AbstractMx2ElementCreator
;
import
com.brilliance.swift.util.XmlUtil
;
import
org.dom4j.Document
;
import
org.dom4j.DocumentException
;
import
org.dom4j.DocumentHelper
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
public
class
Mx2ElementPacs004001Creator
extends
AbstractMx2ElementCreator
{
@Override
public
Map
<
String
,
Object
>
buildElement
()
{
return
super
.
buildElement
();
}
public
Object
buildStrdAddtlRmtInf
()
{
try
{
Document
document
=
DocumentHelper
.
parseText
(
xmlStr
);
Map
<
String
,
String
>
parentElementMaps
=
XmlUtil
.
getParentElementMaps
(
document
);
String
bodyParentPath
=
parentElementMaps
.
get
(
"Strd"
);
List
<
String
>
list
=
new
ArrayList
<>();
int
strdCount
=
XmlUtil
.
getChildrenCount
(
document
,
bodyParentPath
+
".Strd"
,
null
);
if
(
strdCount
>
0
)
{
for
(
int
i
=
0
;
i
<
strdCount
;
i
++)
{
int
addtlRmtInfCount
=
XmlUtil
.
getChildrenCount
(
document
,
bodyParentPath
+
".Strd("
+
i
+
").AddtlRmtInf"
,
null
);
if
(
addtlRmtInfCount
>
0
)
{
for
(
int
j
=
0
;
j
<
addtlRmtInfCount
;
j
++)
{
String
inf
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentPath
+
".Strd("
+
i
+
").AddtlRmtInf("
+
j
+
")"
);
list
.
add
(
inf
);
}
}
}
}
if
(
list
.
size
()
>
0
)
{
return
list
;
}
else
{
return
null
;
}
}
catch
(
DocumentException
e
)
{
throw
new
SwiftException
(
e
.
getMessage
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2map/AbstractMx2MapCreator.java
View file @
30d5ca3b
...
...
@@ -92,6 +92,19 @@ public abstract class AbstractMx2MapCreator implements Mx2MapCreator{
}
}
}
}
else
if
(
elementMaps
.
containsKey
(
name
))
{
Object
vlu
=
elementMaps
.
get
(
name
);
if
(
vlu
instanceof
Map
)
{
Map
<
String
,
String
>
agentMap
=
(
Map
<
String
,
String
>)
vlu
;
Map
<
String
,
Object
>
newMaps
=
new
LinkedHashMap
<>();
targetMaps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
name
+
"Info"
),
newMaps
);
keys
=
new
String
[]{
"acctIdIban"
,
"acctId"
,
"nm"
,
"orgAnyBIC"
};
for
(
String
key
:
keys
)
{
if
(
agentMap
.
get
(
key
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
key
),
agentMap
.
get
(
key
));
}
}
}
}
}
...
...
@@ -137,6 +150,19 @@ public abstract class AbstractMx2MapCreator implements Mx2MapCreator{
}
}
}
}
else
if
(
elementMaps
.
containsKey
(
name
))
{
Object
vlu
=
elementMaps
.
get
(
name
);
if
(
vlu
instanceof
Map
)
{
Map
<
String
,
String
>
agentMap
=
(
Map
<
String
,
String
>)
vlu
;
Map
<
String
,
Object
>
newMaps
=
new
LinkedHashMap
<>();
targetMaps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
name
+
"Info"
),
newMaps
);
keys
=
new
String
[]{
"bicfi"
,
"nm"
};
for
(
String
key
:
keys
)
{
if
(
agentMap
.
get
(
key
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
key
),
agentMap
.
get
(
key
));
}
}
}
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2map/Mx2MapCreatorManager.java
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2map
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2map.camt029.Mx2MapCamt029Creator
;
import
com.brilliance.swift.mx2map.camt053.Mx2MapCamt053Creator
;
import
com.brilliance.swift.mx2map.camt054.Mx2MapCamt054Creator
;
import
com.brilliance.swift.mx2map.camt056.Mx2MapCamt056Creator
;
import
com.brilliance.swift.mx2map.camt057.Mx2MapCamt057Creator
;
import
com.brilliance.swift.mx2map.pacs002.Mx2MapPacs002Creator
;
import
com.brilliance.swift.mx2map.pacs004.Mx2MapPacs004Creator
;
import
com.brilliance.swift.mx2map.pacs008.Mx2MapPacs008Creator
;
import
com.brilliance.swift.mx2map.pacs009.Mx2MapPacs009Creator
;
import
com.brilliance.swift.util.XmlUtil
;
...
...
@@ -39,6 +44,16 @@ public class Mx2MapCreatorManager {
return
new
Mx2MapPacs009Creator
();
}
else
if
(
"camt054001"
.
equals
(
messageType
))
{
return
new
Mx2MapCamt054Creator
();
}
else
if
(
"camt056001"
.
equals
(
messageType
))
{
return
new
Mx2MapCamt056Creator
();
}
else
if
(
"camt029001"
.
equals
(
messageType
))
{
return
new
Mx2MapCamt029Creator
();
}
else
if
(
"pacs002001"
.
equals
(
messageType
))
{
return
new
Mx2MapPacs002Creator
();
}
else
if
(
"pacs004001"
.
equals
(
messageType
))
{
return
new
Mx2MapPacs004Creator
();
}
else
if
(
"camt057001"
.
equals
(
messageType
))
{
return
new
Mx2MapCamt057Creator
();
}
else
{
throw
new
SwiftException
(
"无效的报文类型"
);
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt029/Mx2MapCamt029Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2map
.
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.mx2map.AbstractMx2MapCreator
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
public
class
Mx2MapCamt029Creator
extends
AbstractMx2MapCreator
{
@Override
public
Map
<
String
,
Object
>
mx2Map
()
throws
SwiftException
{
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
if
(
elementMaps
.
get
(
"frBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.sendBic"
),
elementMaps
.
get
(
"frBic"
));
}
if
(
elementMaps
.
get
(
"toBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.receiverBic"
),
elementMaps
.
get
(
"toBic"
));
}
String
messageType
=
addSuffixWithMessageType
(
elementMaps
);
if
(
messageType
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.msgDefId"
),
messageType
);
}
if
(
elementMaps
.
get
(
"bizSvc"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
elementMaps
.
get
(
"bizSvc"
));
}
if
(
elementMaps
.
get
(
"creDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
elementMaps
.
get
(
"creDt"
));
}
if
(
elementMaps
.
get
(
"bizMsgIdr"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"message.id"
),
elementMaps
.
get
(
"bizMsgIdr"
));
}
buildAgentInfo
(
maps
,
"assgnr"
,
elementMaps
);
buildAgentInfo
(
maps
,
"assgne"
,
elementMaps
);
if
(
elementMaps
.
get
(
"stsConf"
)
!=
null
)
{
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"stsConf"
),
elementMaps
.
get
(
"stsConf"
));
}
if
(
elementMaps
.
get
(
"rsnCd"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"rsnCd"
),
elementMaps
.
get
(
"rsnCd"
));
}
if
(
elementMaps
.
get
(
"addtlInf"
)
!=
null
)
{
JSONArray
jsonArray
=
(
JSONArray
)
elementMaps
.
get
(
"addtlInf"
);
String
rsnCdAddtlInf
=
""
;
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
if
(
i
==
0
)
{
rsnCdAddtlInf
+=
jsonArray
.
get
(
i
);
}
else
{
rsnCdAddtlInf
+=
","
+
jsonArray
.
get
(
i
);
}
}
maps
.
put
(
getPropertyValue
(
"rsnCdAddtlInf"
),
rsnCdAddtlInf
);
}
Map
<
String
,
Object
>
orgCreditTransferMaps
=
new
LinkedHashMap
<>();
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"orgCreditTransferInfo"
),
orgCreditTransferMaps
);
if
(
elementMaps
.
get
(
"orgnlMsgId"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlMsgId"
),
elementMaps
.
get
(
"orgnlMsgId"
));
}
if
(
elementMaps
.
get
(
"orgnlMsgNmId"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlMsgNmId"
),
elementMaps
.
get
(
"orgnlMsgNmId"
));
}
if
(
elementMaps
.
get
(
"orgnlCreDtTm"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlCreDtTm"
),
elementMaps
.
get
(
"orgnlCreDtTm"
));
}
if
(
elementMaps
.
get
(
"orgnlEndToEndId"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlEndToEndId"
),
elementMaps
.
get
(
"orgnlEndToEndId"
));
}
if
(
elementMaps
.
get
(
"uetr"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"uetr"
),
elementMaps
.
get
(
"uetr"
));
}
return
maps
;
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt056/Mx2MapCamt056Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2map
.
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.mx2map.AbstractMx2MapCreator
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
public
class
Mx2MapCamt056Creator
extends
AbstractMx2MapCreator
{
@Override
public
Map
<
String
,
Object
>
mx2Map
()
throws
SwiftException
{
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
if
(
elementMaps
.
get
(
"frBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.sendBic"
),
elementMaps
.
get
(
"frBic"
));
}
if
(
elementMaps
.
get
(
"toBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.receiverBic"
),
elementMaps
.
get
(
"toBic"
));
}
String
messageType
=
addSuffixWithMessageType
(
elementMaps
);
if
(
messageType
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.msgDefId"
),
messageType
);
}
if
(
elementMaps
.
get
(
"bizSvc"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
elementMaps
.
get
(
"bizSvc"
));
}
if
(
elementMaps
.
get
(
"creDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
elementMaps
.
get
(
"creDt"
));
}
if
(
elementMaps
.
get
(
"bizMsgIdr"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"message.id"
),
elementMaps
.
get
(
"bizMsgIdr"
));
}
buildAgentInfo
(
maps
,
"assgnr"
,
elementMaps
);
buildAgentInfo
(
maps
,
"assgne"
,
elementMaps
);
if
(
elementMaps
.
get
(
"rsnCd"
)
!=
null
)
{
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"rsnCd"
),
elementMaps
.
get
(
"rsnCd"
));
}
if
(
elementMaps
.
get
(
"addtlInf"
)
!=
null
)
{
JSONArray
jsonArray
=
(
JSONArray
)
elementMaps
.
get
(
"addtlInf"
);
String
rsnCdAddtlInf
=
""
;
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
if
(
i
==
0
)
{
rsnCdAddtlInf
+=
jsonArray
.
get
(
i
);
}
else
{
rsnCdAddtlInf
+=
","
+
jsonArray
.
get
(
i
);
}
}
maps
.
put
(
getPropertyValue
(
"rsnCdAddtlInf"
),
rsnCdAddtlInf
);
}
Map
<
String
,
Object
>
orgCreditTransferMaps
=
new
LinkedHashMap
<>();
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"orgCreditTransferInfo"
),
orgCreditTransferMaps
);
if
(
elementMaps
.
get
(
"orgnlMsgId"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlMsgId"
),
elementMaps
.
get
(
"orgnlMsgId"
));
}
if
(
elementMaps
.
get
(
"orgnlMsgNmId"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlMsgNmId"
),
elementMaps
.
get
(
"orgnlMsgNmId"
));
}
if
(
elementMaps
.
get
(
"orgnlCreDtTm"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlCreDtTm"
),
elementMaps
.
get
(
"orgnlCreDtTm"
));
}
if
(
elementMaps
.
get
(
"orgnlEndToEndId"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlEndToEndId"
),
elementMaps
.
get
(
"orgnlEndToEndId"
));
}
if
(
elementMaps
.
get
(
"uetr"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"uetr"
),
elementMaps
.
get
(
"uetr"
));
}
if
(
elementMaps
.
get
(
"orgnlIntrBkSttlmCcy"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlIntrBkSttlmCcy"
),
elementMaps
.
get
(
"orgnlIntrBkSttlmCcy"
));
}
if
(
elementMaps
.
get
(
"orgnlIntrBkSttlmAmt"
)
!=
null
)
{
orgCreditTransferMaps
.
put
(
getPropertyValue
(
"orgnlIntrBkSttlmAmt"
),
elementMaps
.
get
(
"orgnlIntrBkSttlmAmt"
));
}
return
maps
;
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt057/Mx2MapCamt057Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2map
.
camt057
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2map.AbstractMx2MapCreator
;
import
java.util.Map
;
public
class
Mx2MapCamt057Creator
extends
AbstractMx2MapCreator
{
@Override
public
Map
<
String
,
Object
>
mx2Map
()
throws
SwiftException
{
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
if
(
elementMaps
.
get
(
"frBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.sendBic"
),
elementMaps
.
get
(
"frBic"
));
}
if
(
elementMaps
.
get
(
"toBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.receiverBic"
),
elementMaps
.
get
(
"toBic"
));
}
String
messageType
=
addSuffixWithMessageType
(
elementMaps
);
if
(
messageType
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.msgDefId"
),
messageType
);
}
if
(
elementMaps
.
get
(
"bizSvc"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
elementMaps
.
get
(
"bizSvc"
));
}
if
(
elementMaps
.
get
(
"creDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
elementMaps
.
get
(
"creDt"
));
}
if
(
elementMaps
.
get
(
"acctId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"acctId"
),
elementMaps
.
get
(
"acctId"
));
}
if
(
elementMaps
.
get
(
"itmId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"itmId"
),
elementMaps
.
get
(
"itmId"
));
}
if
(
elementMaps
.
get
(
"itmUetr"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"uetr"
),
elementMaps
.
get
(
"itmUetr"
));
}
if
(
elementMaps
.
get
(
"itmCcy"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"ccy"
),
elementMaps
.
get
(
"itmCcy"
));
}
if
(
elementMaps
.
get
(
"itmAmt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"amt"
),
elementMaps
.
get
(
"itmAmt"
));
}
if
(
elementMaps
.
get
(
"itmXpctdValDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"itmXpctdValDt"
),
elementMaps
.
get
(
"itmXpctdValDt"
));
}
buildAgentInfo
(
maps
,
"acctOwnrAgt"
,
elementMaps
);
buildAgentInfo
(
maps
,
"acctSvcr"
,
elementMaps
);
buildPartyInfo
(
maps
,
"dbtrPty"
,
elementMaps
);
buildAgentInfo
(
maps
,
"dbtrAgt"
,
elementMaps
);
buildAgentInfo
(
maps
,
"intrmyAgt"
,
elementMaps
);
return
maps
;
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2map/pacs002/Mx2MapPacs002Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2map
.
pacs002
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2map.AbstractMx2MapCreator
;
import
java.util.Map
;
public
class
Mx2MapPacs002Creator
extends
AbstractMx2MapCreator
{
@Override
public
Map
<
String
,
Object
>
mx2Map
()
throws
SwiftException
{
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
if
(
elementMaps
.
get
(
"frBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.sendBic"
),
elementMaps
.
get
(
"frBic"
));
}
if
(
elementMaps
.
get
(
"toBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.receiverBic"
),
elementMaps
.
get
(
"toBic"
));
}
String
messageType
=
addSuffixWithMessageType
(
elementMaps
);
if
(
messageType
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.msgDefId"
),
messageType
);
}
if
(
elementMaps
.
get
(
"bizSvc"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
elementMaps
.
get
(
"bizSvc"
));
}
if
(
elementMaps
.
get
(
"creDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
elementMaps
.
get
(
"creDt"
));
}
if
(
elementMaps
.
get
(
"endToEndId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"endToEnd.id"
),
elementMaps
.
get
(
"endToEndId"
));
}
if
(
elementMaps
.
get
(
"uetr"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"uetr"
),
elementMaps
.
get
(
"uetr"
));
}
if
(
elementMaps
.
get
(
"orgnlMsgId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlMsgId"
),
elementMaps
.
get
(
"orgnlMsgId"
));
}
if
(
elementMaps
.
get
(
"orgnlMsgNmId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlMsgNmId"
),
elementMaps
.
get
(
"orgnlMsgNmId"
));
}
if
(
elementMaps
.
get
(
"orgnlCreDtTm"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlCreDtTm"
),
elementMaps
.
get
(
"orgnlCreDtTm"
));
}
if
(
elementMaps
.
get
(
"orgnlEndToEndId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlEndToEndId"
),
elementMaps
.
get
(
"orgnlEndToEndId"
));
}
if
(
elementMaps
.
get
(
"orgnlUETR"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlUETR"
),
elementMaps
.
get
(
"orgnlUETR"
));
}
if
(
elementMaps
.
get
(
"orgtrNm"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgtrNm"
),
elementMaps
.
get
(
"orgtrNm"
));
}
if
(
elementMaps
.
get
(
"rsnCd"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"rsnCd"
),
elementMaps
.
get
(
"rsnCd"
));
}
if
(
elementMaps
.
get
(
"txSts"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"txSts"
),
elementMaps
.
get
(
"txSts"
));
}
if
(
elementMaps
.
get
(
"clrSysRef"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"clrSysRef"
),
elementMaps
.
get
(
"clrSysRef"
));
}
if
(
elementMaps
.
get
(
"fctvIntrBkSttlmDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"fctvIntrBkSttlmDt"
),
elementMaps
.
get
(
"fctvIntrBkSttlmDt"
));
}
return
maps
;
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2map/pacs004/Mx2MapPacs004Creator.java
0 → 100644
View file @
30d5ca3b
package
com
.
brilliance
.
swift
.
mx2map
.
pacs004
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2map.AbstractMx2MapCreator
;
import
java.util.Map
;
public
class
Mx2MapPacs004Creator
extends
AbstractMx2MapCreator
{
@Override
public
Map
<
String
,
Object
>
mx2Map
()
throws
SwiftException
{
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
if
(
elementMaps
.
get
(
"frBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.sendBic"
),
elementMaps
.
get
(
"frBic"
));
}
if
(
elementMaps
.
get
(
"toBic"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.receiverBic"
),
elementMaps
.
get
(
"toBic"
));
}
String
messageType
=
addSuffixWithMessageType
(
elementMaps
);
if
(
messageType
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.msgDefId"
),
messageType
);
}
if
(
elementMaps
.
get
(
"bizSvc"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
elementMaps
.
get
(
"bizSvc"
));
}
if
(
elementMaps
.
get
(
"creDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
elementMaps
.
get
(
"creDt"
));
}
if
(
elementMaps
.
get
(
"endToEndId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"endToEnd.id"
),
elementMaps
.
get
(
"endToEndId"
));
}
if
(
elementMaps
.
get
(
"uetr"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"uetr"
),
elementMaps
.
get
(
"uetr"
));
}
if
(
elementMaps
.
get
(
"nbOfTxs"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"nbOfTxs"
),
elementMaps
.
get
(
"nbOfTxs"
));
}
if
(
elementMaps
.
get
(
"sttlmMtd"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"statement.id"
),
elementMaps
.
get
(
"sttlmMtd"
));
}
if
(
elementMaps
.
get
(
"orgnlEndToEndId"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlEndToEndId"
),
elementMaps
.
get
(
"orgnlEndToEndId"
));
}
if
(
elementMaps
.
get
(
"orgnlUETR"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlUETR"
),
elementMaps
.
get
(
"orgnlUETR"
));
}
if
(
elementMaps
.
get
(
"orgnlIntrBkSttlmAmt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlIntrBkSttlmAmt"
),
elementMaps
.
get
(
"orgnlIntrBkSttlmAmt"
));
}
if
(
elementMaps
.
get
(
"orgnlIntrBkSttlmCcy"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"orgnlIntrBkSttlmCcy"
),
elementMaps
.
get
(
"orgnlIntrBkSttlmCcy"
));
}
if
(
elementMaps
.
get
(
"rtrdIntrBkSttlmAmt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"rtrdIntrBkSttlmAmt"
),
elementMaps
.
get
(
"rtrdIntrBkSttlmAmt"
));
}
if
(
elementMaps
.
get
(
"rtrdIntrBkSttlmCcy"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"rtrdIntrBkSttlmCcy"
),
elementMaps
.
get
(
"rtrdIntrBkSttlmCcy"
));
}
if
(
elementMaps
.
get
(
"intrBkSttlmDt"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"intrBkSttlmDt"
),
elementMaps
.
get
(
"intrBkSttlmDt"
));
}
if
(
elementMaps
.
get
(
"chrgBr"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"chrgBr"
),
elementMaps
.
get
(
"chrgBr"
));
}
if
(
elementMaps
.
get
(
"instgAgtBicfi"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"instgAgtBicfi"
),
elementMaps
.
get
(
"instgAgtBicfi"
));
}
if
(
elementMaps
.
get
(
"instdAgtBicfi"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"instdAgtBicfi"
),
elementMaps
.
get
(
"instdAgtBicfi"
));
}
Map
<
String
,
Object
>
dbtrPty
=
(
Map
)
elementMaps
.
get
(
"dbtrPty"
);
if
(
dbtrPty
!=
null
)
{
if
(
dbtrPty
.
get
(
"nm"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"dbtrNm"
),
dbtrPty
.
get
(
"nm"
));
}
}
Map
<
String
,
Object
>
cdtrPty
=
(
Map
)
elementMaps
.
get
(
"dbtrPty"
);
if
(
cdtrPty
!=
null
)
{
if
(
cdtrPty
.
get
(
"nm"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"cdtrNm"
),
cdtrPty
.
get
(
"nm"
));
}
}
if
(
elementMaps
.
get
(
"rsnCd"
)
!=
null
)
{
maps
.
put
(
getPropertyValue
(
"rsnCd"
),
elementMaps
.
get
(
"rsnCd"
));
}
return
maps
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment