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
90ea8c07
Commit
90ea8c07
authored
Sep 16, 2022
by
chengzhuoshen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复转换代码bug
parent
5bf414c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
16 deletions
+36
-16
SwiftTransfer.java
...ore/src/main/java/com/brilliance/swift/SwiftTransfer.java
+8
-0
Mt2MxPacs009001Creator.java
...liance/swift/mt2mx/pacs009001/Mt2MxPacs009001Creator.java
+17
-15
Field50AGenerate.java
...ce/swift/mx2mt/mt202cov202/impl/cov/Field50AGenerate.java
+1
-1
Mx2MtTest.java
swiftCore/src/test/java/com/brilliance/Mx2MtTest.java
+10
-0
No files found.
swiftCore/src/main/java/com/brilliance/swift/SwiftTransfer.java
View file @
90ea8c07
...
...
@@ -140,6 +140,14 @@ public class SwiftTransfer {
if
(
StringUtil
.
isNotEmpty
(
endToEndId
))
{
maps
.
put
(
"endToEndId"
,
endToEndId
);
}
}
else
if
(
messageType
.
startsWith
(
"camt.054.001"
))
{
Document
document
=
DocumentHelper
.
parseText
(
xmlStr
);
Map
<
String
,
String
>
parentElementMaps
=
XmlUtil
.
getParentElementMaps
(
document
);
String
bodyParentElementName
=
parentElementMaps
.
get
(
"Ntfctn"
);
String
endToEndId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Ntfctn.Ntry.NtryDtls.TxDtls.Refs.EndToEndId"
);
if
(
StringUtil
.
isNotEmpty
(
endToEndId
))
{
maps
.
put
(
"endToEndId"
,
endToEndId
);
}
}
}
return
maps
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/pacs009001/Mt2MxPacs009001Creator.java
View file @
90ea8c07
...
...
@@ -58,21 +58,23 @@ public class Mt2MxPacs009001Creator extends AbstractMt2MxCreator {
}
//设置Service Level 取值从block3 {111:00[0-9]}
Tag
tag111
=
abstractMT
.
getSwiftMessage
().
getBlock3
().
getTagByName
(
"111"
);
if
(
tag111
!=
null
)
{
String
svcLvlCode
=
""
;
String
value
=
tag111
.
getValue
();
if
(
value
.
matches
(
"00[0-9]{1}"
))
{
svcLvlCode
=
value
;
}
if
(
StringUtil
.
isNotEmpty
(
svcLvlCode
))
{
Map
<
String
,
Object
>
pmtTpInfMaps
=
new
HashMap
<>();
cdtTrfTxInfMaps
.
put
(
"pmtTpInf"
,
pmtTpInfMaps
);
JSONArray
svcLvlJsonArray
=
new
JSONArray
();
pmtTpInfMaps
.
put
(
"svcLvl"
,
svcLvlJsonArray
);
Map
<
String
,
Object
>
svcLvlMaps
=
new
HashMap
<>();
svcLvlJsonArray
.
add
(
svcLvlMaps
);
svcLvlMaps
.
put
(
"cd"
,
"G"
+
svcLvlCode
);
if
(
abstractMT
.
getSwiftMessage
().
getBlock3
()
!=
null
)
{
Tag
tag111
=
abstractMT
.
getSwiftMessage
().
getBlock3
().
getTagByName
(
"111"
);
if
(
tag111
!=
null
)
{
String
svcLvlCode
=
""
;
String
value
=
tag111
.
getValue
();
if
(
value
.
matches
(
"00[0-9]{1}"
))
{
svcLvlCode
=
value
;
}
if
(
StringUtil
.
isNotEmpty
(
svcLvlCode
))
{
Map
<
String
,
Object
>
pmtTpInfMaps
=
new
HashMap
<>();
cdtTrfTxInfMaps
.
put
(
"pmtTpInf"
,
pmtTpInfMaps
);
JSONArray
svcLvlJsonArray
=
new
JSONArray
();
pmtTpInfMaps
.
put
(
"svcLvl"
,
svcLvlJsonArray
);
Map
<
String
,
Object
>
svcLvlMaps
=
new
HashMap
<>();
svcLvlJsonArray
.
add
(
svcLvlMaps
);
svcLvlMaps
.
put
(
"cd"
,
"G"
+
svcLvlCode
);
}
}
}
//如果是cov,初始化Underlying Customer Credit Transfer map
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt202cov202/impl/cov/Field50AGenerate.java
View file @
90ea8c07
...
...
@@ -83,7 +83,7 @@ public class Field50AGenerate extends AbstractMx2MtTagsGenerate {
tags
.
add
(
new
Tag
(
name_K
,
value
));
covFlag
=
true
;
}
}
else
/*if (StringUtil.isNotEmpty(name))*/
{
}
else
if
(
StringUtil
.
isNotEmpty
(
name
))
{
String
mtNameAddress
=
mx_to_mtPartyNameAndUnstructuredAddress
(
partyPath
);
if
(
StringUtil
.
isNotEmpty
(
account
))
{
value
=
account
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
;
...
...
swiftCore/src/test/java/com/brilliance/Mx2MtTest.java
View file @
90ea8c07
...
...
@@ -260,4 +260,14 @@ public class Mx2MtTest {
readXsd2Txt
(
xsdName
);
}
}
@Test
public
void
testMx2MtMap
()
throws
IOException
{
File
file
=
FileUtils
.
toFile
(
Mx2MtTest
.
class
.
getResource
(
"/swiftXml/MxCamt05400108_CREDIT.xml"
));
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2MtMap
(
xmlStr
,
null
);
for
(
String
key
:
maps
.
keySet
())
{
System
.
out
.
println
(
key
+
"="
+
maps
.
get
(
key
));
}
}
}
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