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
991c3a50
Commit
991c3a50
authored
Sep 14, 2022
by
chengzhuoshen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0822swift官网MX2MT更新-3
parent
915882ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
2 deletions
+37
-2
AbstractMx2MtCreator.java
...java/com/brilliance/swift/mx2mt/AbstractMx2MtCreator.java
+9
-0
Field60Generate.java
...brilliance/swift/mx2mt/mt940950/impl/Field60Generate.java
+3
-0
Field62Generate.java
...brilliance/swift/mx2mt/mt940950/impl/Field62Generate.java
+3
-0
SwiftTransferUtil.java
...ain/java/com/brilliance/swift/util/SwiftTransferUtil.java
+2
-2
SwiftTranslationReport.java
.../java/com/brilliance/swift/vo/SwiftTranslationReport.java
+20
-0
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2mt/AbstractMx2MtCreator.java
View file @
991c3a50
...
@@ -14,6 +14,7 @@ import com.prowidesoftware.swift.io.IConversionService;
...
@@ -14,6 +14,7 @@ import com.prowidesoftware.swift.io.IConversionService;
import
com.prowidesoftware.swift.io.writer.SwiftWriter
;
import
com.prowidesoftware.swift.io.writer.SwiftWriter
;
import
com.prowidesoftware.swift.model.*
;
import
com.prowidesoftware.swift.model.*
;
import
com.prowidesoftware.swift.model.field.*
;
import
com.prowidesoftware.swift.model.field.*
;
import
com.prowidesoftware.swift.model.mx.AbstractMX
;
import
com.prowidesoftware.swift.model.mx.NamespaceReader
;
import
com.prowidesoftware.swift.model.mx.NamespaceReader
;
import
org.apache.commons.lang3.Validate
;
import
org.apache.commons.lang3.Validate
;
import
org.dom4j.*
;
import
org.dom4j.*
;
...
@@ -512,6 +513,14 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -512,6 +513,14 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
IConversionService
srv
=
new
ConversionService
();
IConversionService
srv
=
new
ConversionService
();
String
mtStr
=
srv
.
getFIN
(
swiftMessage
);
String
mtStr
=
srv
.
getFIN
(
swiftMessage
);
SwiftTranslationReport
str
=
context
.
get
(
SwiftTranslationReport
.
class
);
SwiftTranslationReport
str
=
context
.
get
(
SwiftTranslationReport
.
class
);
AbstractMX
abstractMX
=
(
AbstractMX
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_OBJ
,
true
);
if
(
abstractMX
!=
null
&&
abstractMX
.
getMxId
()
!=
null
)
{
str
.
setMxType
(
abstractMX
.
getMxId
().
getBusinessProcess
().
name
()
+
abstractMX
.
getMxId
().
getFunctionality
()
+
abstractMX
.
getMxId
().
getVariant
()
+
abstractMX
.
getMxId
().
getVersion
());
}
str
.
setMtType
(
getMtType
());
str
.
setMessage
(
mtStr
);
str
.
setMessage
(
mtStr
);
String
outputFilePath
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_TO_MT_OUTPUT_FILE_PATH
,
true
);
String
outputFilePath
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_TO_MT_OUTPUT_FILE_PATH
,
true
);
if
(
StringUtil
.
isNotEmpty
(
outputFilePath
))
{
if
(
StringUtil
.
isNotEmpty
(
outputFilePath
))
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt940950/impl/Field60Generate.java
View file @
991c3a50
...
@@ -49,6 +49,9 @@ public class Field60Generate extends AbstractMx2MtTagsGenerate {
...
@@ -49,6 +49,9 @@ public class Field60Generate extends AbstractMx2MtTagsGenerate {
if
(
counter
!=
1
)
{
//没有OPBD 或者 OPBD不止一条数据
if
(
counter
!=
1
)
{
//没有OPBD 或者 OPBD不止一条数据
buildSTErrorInfo
(
84
,
"Block4/60a"
,
null
);
buildSTErrorInfo
(
84
,
"Block4/60a"
,
null
);
}
}
if
(
index
==
-
1
)
{
return
;
}
String
pageNumber
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Stmt.StmtPgntn.PgNb"
);
String
pageNumber
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Stmt.StmtPgntn.PgNb"
);
if
(
StringUtil
.
isNotEmpty
(
pageNumber
))
{
if
(
StringUtil
.
isNotEmpty
(
pageNumber
))
{
int
pgNb
=
Integer
.
parseInt
(
pageNumber
);
int
pgNb
=
Integer
.
parseInt
(
pageNumber
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt940950/impl/Field62Generate.java
View file @
991c3a50
...
@@ -49,6 +49,9 @@ public class Field62Generate extends AbstractMx2MtTagsGenerate {
...
@@ -49,6 +49,9 @@ public class Field62Generate extends AbstractMx2MtTagsGenerate {
if
(
counter
!=
1
)
{
//没有CLBD 或者 CLBD不止一条数据
if
(
counter
!=
1
)
{
//没有CLBD 或者 CLBD不止一条数据
buildSTErrorInfo
(
87
,
"Block4/62a"
,
null
);
buildSTErrorInfo
(
87
,
"Block4/62a"
,
null
);
}
}
if
(
index
==
-
1
)
{
return
;
}
String
lastPageIndicator
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Stmt.StmtPgntn.LastPgInd"
);
String
lastPageIndicator
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Stmt.StmtPgntn.LastPgInd"
);
if
(
StringUtil
.
isNotEmpty
(
lastPageIndicator
)
&&
Boolean
.
TRUE
.
equals
(
Boolean
.
valueOf
(
lastPageIndicator
)))
{
if
(
StringUtil
.
isNotEmpty
(
lastPageIndicator
)
&&
Boolean
.
TRUE
.
equals
(
Boolean
.
valueOf
(
lastPageIndicator
)))
{
String
subTypeCode
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Stmt.Bal("
+
index
+
").Tp.SubTp.Cd"
);
String
subTypeCode
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Stmt.Bal("
+
index
+
").Tp.SubTp.Cd"
);
...
...
swiftCore/src/main/java/com/brilliance/swift/util/SwiftTransferUtil.java
View file @
991c3a50
...
@@ -766,7 +766,7 @@ public class SwiftTransferUtil {
...
@@ -766,7 +766,7 @@ public class SwiftTransferUtil {
* List<SwiftTransferErrorInfo>
* List<SwiftTransferErrorInfo>
*/
*/
public
static
SwiftTranslationErrorInfo
getSwiftTranslationErrorInfoById
(
long
id
)
{
public
static
SwiftTranslationErrorInfo
getSwiftTranslationErrorInfoById
(
long
id
)
{
//
if (stErrorInfos == null) {
if
(
stErrorInfos
==
null
)
{
try
{
try
{
stErrorInfos
=
new
ArrayList
<>();
stErrorInfos
=
new
ArrayList
<>();
InputStream
resourceAsStream
=
SwiftTransferUtil
.
class
.
getResourceAsStream
(
"/ErrorCodeList.xlsx"
);
InputStream
resourceAsStream
=
SwiftTransferUtil
.
class
.
getResourceAsStream
(
"/ErrorCodeList.xlsx"
);
...
@@ -791,7 +791,7 @@ public class SwiftTransferUtil {
...
@@ -791,7 +791,7 @@ public class SwiftTransferUtil {
stErrorInfos
=
null
;
//如果出现异常,stErrorInfos=null,下次仍需初始化
stErrorInfos
=
null
;
//如果出现异常,stErrorInfos=null,下次仍需初始化
throw
e
;
throw
e
;
}
}
//
}
}
SwiftTranslationErrorInfo
tmpErrorInfo
=
null
;
SwiftTranslationErrorInfo
tmpErrorInfo
=
null
;
if
(
stErrorInfos
!=
null
&&
stErrorInfos
.
size
()
>
0
)
{
if
(
stErrorInfos
!=
null
&&
stErrorInfos
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
stErrorInfos
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
stErrorInfos
.
size
();
i
++)
{
...
...
swiftCore/src/main/java/com/brilliance/swift/vo/SwiftTranslationReport.java
View file @
991c3a50
...
@@ -16,6 +16,10 @@ public class SwiftTranslationReport {
...
@@ -16,6 +16,10 @@ public class SwiftTranslationReport {
private
String
translationResult
;
private
String
translationResult
;
private
String
mxType
;
private
String
mtType
;
public
List
<
SwiftTranslationErrorInfo
>
getErrorInfos
()
{
public
List
<
SwiftTranslationErrorInfo
>
getErrorInfos
()
{
if
(
errorInfos
==
null
)
{
if
(
errorInfos
==
null
)
{
errorInfos
=
new
ArrayList
<>();
errorInfos
=
new
ArrayList
<>();
...
@@ -42,4 +46,20 @@ public class SwiftTranslationReport {
...
@@ -42,4 +46,20 @@ public class SwiftTranslationReport {
public
void
setTranslationResult
(
String
translationResult
)
{
public
void
setTranslationResult
(
String
translationResult
)
{
this
.
translationResult
=
translationResult
;
this
.
translationResult
=
translationResult
;
}
}
public
String
getMxType
()
{
return
mxType
;
}
public
void
setMxType
(
String
mxType
)
{
this
.
mxType
=
mxType
;
}
public
String
getMtType
()
{
return
mtType
;
}
public
void
setMtType
(
String
mtType
)
{
this
.
mtType
=
mtType
;
}
}
}
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