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
5d4d064e
Commit
5d4d064e
authored
Oct 21, 2022
by
chengzhuoshen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug,移除SwiftTransfer多余的方法
parent
e687a878
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
79 deletions
+2
-79
SwiftTransfer.java
...ore/src/main/java/com/brilliance/swift/SwiftTransfer.java
+0
-77
MxMessageReader.java
.../main/java/com/brilliance/swift/util/MxMessageReader.java
+2
-2
No files found.
swiftCore/src/main/java/com/brilliance/swift/SwiftTransfer.java
View file @
5d4d064e
...
...
@@ -423,81 +423,4 @@ public class SwiftTransfer {
return
fetchFinFromMixMessage
(
mixFilePath
);
}
}
/**
* 特殊处理mt报文
* 50F 去掉 1/ 2/ 3/
* 59F 去掉 1/ 2/ 3/
* 保证给新核心系统的报文要素名称地址的正确性
*/
public
static
String
clearFin5059FPrefix
(
String
mtMsg
)
{
try
{
AbstractMT
abstractMT
=
AbstractMT
.
parse
(
mtMsg
);
if
(
abstractMT
==
null
||
abstractMT
.
getSwiftMessage
()
==
null
||
abstractMT
.
getSwiftMessage
().
getBlock4
()
==
null
)
{
return
mtMsg
;
}
SwiftBlock4
swiftBlock4
=
abstractMT
.
getSwiftMessage
().
getBlock4
();
Tag
tag
=
swiftBlock4
.
getTagByName
(
"50F"
);
if
(
tag
!=
null
)
{
Field50F
field50F
=
(
Field50F
)
tag
.
asField
();
String
value
=
field50F
.
getPartyIdentifier
();
if
(
StringUtil
.
isNotEmpty
(
field50F
.
getNameAndAddress1
()))
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field50F
.
getNameAndAddress1
();
}
if
(
StringUtil
.
isNotEmpty
(
field50F
.
getNameAndAddress2
()))
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field50F
.
getNameAndAddress2
();
}
if
(
StringUtil
.
isNotEmpty
(
field50F
.
getNameAndAddress3
()))
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field50F
.
getNameAndAddress3
();
}
if
(
StringUtil
.
isNotEmpty
(
field50F
.
getNameAndAddress4
()))
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field50F
.
getNameAndAddress4
();
}
tag
.
setValue
(
value
);
}
tag
=
swiftBlock4
.
getTagByName
(
"59F"
);
if
(
tag
!=
null
)
{
Field59F
field59F
=
(
Field59F
)
tag
.
asField
();
String
value
=
""
;
if
(
StringUtil
.
isNotEmpty
(
field59F
.
getComponent1
()))
{
value
+=
"/"
+
field59F
.
getComponent1
();
}
if
(
StringUtil
.
isNotEmpty
(
field59F
.
getNameAndAddress1
()))
{
if
(
StringUtil
.
isEmpty
(
value
))
{
value
+=
field59F
.
getNameAndAddress1
();
}
else
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field59F
.
getNameAndAddress1
();
}
}
if
(
StringUtil
.
isNotEmpty
(
field59F
.
getNameAndAddress2
()))
{
if
(
StringUtil
.
isEmpty
(
value
))
{
value
+=
field59F
.
getNameAndAddress2
();
}
else
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field59F
.
getNameAndAddress2
();
}
}
if
(
StringUtil
.
isNotEmpty
(
field59F
.
getNameAndAddress3
()))
{
if
(
StringUtil
.
isEmpty
(
value
))
{
value
+=
field59F
.
getNameAndAddress3
();
}
else
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field59F
.
getNameAndAddress3
();
}
}
if
(
StringUtil
.
isNotEmpty
(
field59F
.
getNameAndAddress4
()))
{
if
(
StringUtil
.
isEmpty
(
value
))
{
value
+=
field59F
.
getNameAndAddress4
();
}
else
{
value
+=
Mx2MtConstants
.
NEW_LINE
+
field59F
.
getNameAndAddress4
();
}
}
tag
.
setValue
(
value
);
}
IConversionService
srv
=
new
ConversionService
();
return
srv
.
getFIN
(
abstractMT
.
getSwiftMessage
());
}
catch
(
Exception
e
)
{
throw
new
SwiftException
(
e
.
getMessage
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/util/MxMessageReader.java
View file @
5d4d064e
...
...
@@ -139,7 +139,7 @@ public class MxMessageReader {
infMap
.
put
(
"ref"
,
tag
.
getValue
());
if
(
errorInfos
!=
null
&&
errorInfos
.
size
()
>
0
)
{
for
(
SwiftTranslationErrorInfo
errorInfo
:
errorInfos
)
{
if
(
ERROR
.
T0000T
.
equals
(
errorInfo
.
get
Error
Code
())
if
(
ERROR
.
T0000T
.
equals
(
errorInfo
.
getCode
())
&&
"Block4/:20:"
.
equals
(
errorInfo
.
getLocation
())
&&
StringUtil
.
isNotEmpty
(
errorInfo
.
getOriginalValue
()))
{
infMap
.
put
(
"ref"
,
errorInfo
.
getOriginalValue
());
...
...
@@ -152,7 +152,7 @@ public class MxMessageReader {
infMap
.
put
(
"tscref"
,
tag
.
getValue
());
if
(
errorInfos
!=
null
&&
errorInfos
.
size
()
>
0
)
{
for
(
SwiftTranslationErrorInfo
errorInfo
:
errorInfos
)
{
if
(
ERROR
.
T0000T
.
equals
(
errorInfo
.
get
Error
Code
())
if
(
ERROR
.
T0000T
.
equals
(
errorInfo
.
getCode
())
&&
"Block4/:21:"
.
equals
(
errorInfo
.
getLocation
())
&&
StringUtil
.
isNotEmpty
(
errorInfo
.
getOriginalValue
()))
{
infMap
.
put
(
"tscref"
,
errorInfo
.
getOriginalValue
());
...
...
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