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
844c8594
Commit
844c8594
authored
Jul 04, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了mt210,mt192292,mt196296,mt940的异常警告
parent
23175acb
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
68 additions
and
63 deletions
+68
-63
Mx2Mtn92Creator.java
.../com/brilliance/swift/mx2mt/mt192292/Mx2Mtn92Creator.java
+5
-5
Field11SGenerate.java
...rilliance/swift/mx2mt/mt192292/impl/Field11SGenerate.java
+1
-1
Field20Generate.java
...brilliance/swift/mx2mt/mt192292/impl/Field20Generate.java
+6
-4
Field21Generate.java
...brilliance/swift/mx2mt/mt192292/impl/Field21Generate.java
+6
-4
Mx2Mtn96Creator.java
.../com/brilliance/swift/mx2mt/mt196296/Mx2Mtn96Creator.java
+5
-5
Field11RGenerate.java
...rilliance/swift/mx2mt/mt196296/impl/Field11RGenerate.java
+1
-1
Field20Generate.java
...brilliance/swift/mx2mt/mt196296/impl/Field20Generate.java
+7
-5
Field21Generate.java
...brilliance/swift/mx2mt/mt196296/impl/Field21Generate.java
+8
-5
Field20Generate.java
...om/brilliance/swift/mx2mt/mt210/impl/Field20Generate.java
+4
-4
Field21Generate.java
...om/brilliance/swift/mx2mt/mt210/impl/Field21Generate.java
+7
-5
Field30Generate.java
...om/brilliance/swift/mx2mt/mt210/impl/Field30Generate.java
+1
-1
Field50aGenerate.java
...m/brilliance/swift/mx2mt/mt210/impl/Field50aGenerate.java
+2
-7
Field52aGenerate.java
...m/brilliance/swift/mx2mt/mt210/impl/Field52aGenerate.java
+2
-0
Field20Generate.java
...brilliance/swift/mx2mt/mt941942/impl/Field20Generate.java
+7
-5
Field28CGenerate.java
...rilliance/swift/mx2mt/mt941942/impl/Field28CGenerate.java
+1
-1
Field34FGenerate.java
...rilliance/swift/mx2mt/mt941942/impl/Field34FGenerate.java
+1
-2
Field61Generate.java
...brilliance/swift/mx2mt/mt941942/impl/Field61Generate.java
+1
-1
Field90CGenerate.java
...rilliance/swift/mx2mt/mt941942/impl/Field90CGenerate.java
+2
-4
Field90DGenerate.java
...rilliance/swift/mx2mt/mt941942/impl/Field90DGenerate.java
+1
-3
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/Mx2Mtn92Creator.java
View file @
844c8594
...
...
@@ -72,18 +72,18 @@ public class Mx2Mtn92Creator extends AbstractMx2MtCreator {
String
orgMsgNameIdentification
=
getXmlNodeValue
(
bodyParentPath
,
document
,
"Undrlyg.TxInf.OrgnlGrpInf.OrgnlMsgNmId"
);
String
mtType
=
Mx2MtConstants
.
MT_TYPE_292
;
if
(
StringUtil
.
isNotEmpty
(
orgMsgNameIdentification
))
{
if
(
orgMsgNameIdentification
.
startsWith
(
"pacs.008"
)
||
orgMsgNameIdentification
.
startsWith
(
"pacs.003"
))
{
if
(
orgMsgNameIdentification
.
contains
(
"pacs.008"
)
||
orgMsgNameIdentification
.
contains
(
"pacs.003"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_192
;
}
else
if
(
orgMsgNameIdentification
.
startsWith
(
"pacs.009"
)
||
orgMsgNameIdentification
.
startsWith
(
"pacs.010"
))
{
}
else
if
(
orgMsgNameIdentification
.
contains
(
"pacs.009"
)
||
orgMsgNameIdentification
.
contains
(
"pacs.010"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_292
;
}
else
if
(
orgMsgNameIdentification
.
matches
(
"MT10[0-9]{1}"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_192
;
}
else
if
(
orgMsgNameIdentification
.
matches
(
"MT20[0-9]{1}"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_292
;
}
else
{
buildSTErrorInfo
(
ERROR
.
T20092
,
null
,
null
);
buildSTErrorInfo
(
ERROR
.
T20092
,
"BLOCK2/:mtType:"
,
orgMsgNameIdentification
);
}
}
return
mtType
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field11SGenerate.java
View file @
844c8594
...
...
@@ -40,7 +40,7 @@ public class Field11SGenerate extends AbstractMx2MtTagsGenerate {
orgnlMsgNmId
=
mtType
.
substring
(
2
);
}
else
{
orgnlMsgNmId
=
"202"
;
buildSTErrorInfo
(
ERROR
.
T20083
,
null
,
null
);
buildSTErrorInfo
(
ERROR
.
T20083
,
"BLOCK4/:11S:"
,
null
);
}
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field20Generate.java
View file @
844c8594
...
...
@@ -27,14 +27,16 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Undrlyg.TxInf.Case.Id"
);
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
messageId
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
messageId
);
messageId
=
messageId
.
substring
(
0
,
15
)
+
"+"
;
}
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20080
,
"BLOCK4/:20:"
,
messageId
);
tags
.
add
(
new
Tag
(
name
,
value
));
return
;
}
if
(
value
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
value
);
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field21Generate.java
View file @
844c8594
...
...
@@ -24,14 +24,16 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
orgnlInstrId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Undrlyg.TxInf.OrgnlInstrId"
);
if
(
StringUtil
.
isNotEmpty
(
orgnlInstrId
))
{
if
(
orgnlInstrId
.
length
()
>
16
)
{
orgnlInstrId
=
orgnlInstrId
.
substring
(
0
,
15
)
+
"+"
;
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:21:"
,
orgnlInstrId
);
}
String
value
=
orgnlInstrId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20081
,
"BLOCK4/:21:"
,
orgnlInstrId
);
tags
.
add
(
new
Tag
(
name
,
value
));
return
;
}
if
(
value
.
length
()
>
16
)
{
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:21:"
,
value
);
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
else
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/Mx2Mtn96Creator.java
View file @
844c8594
...
...
@@ -72,18 +72,18 @@ public class Mx2Mtn96Creator extends AbstractMx2MtCreator {
String
orgMsgNameIdentification
=
getXmlNodeValue
(
bodyParentPath
,
document
,
"CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlMsgNmId"
);
String
mtType
=
Mx2MtConstants
.
MT_TYPE_296
;
if
(
StringUtil
.
isNotEmpty
(
orgMsgNameIdentification
))
{
if
(
orgMsgNameIdentification
.
startsWith
(
"pacs.008"
)
||
orgMsgNameIdentification
.
startsWith
(
"pacs.003"
))
{
if
(
orgMsgNameIdentification
.
contains
(
"pacs.008"
)
||
orgMsgNameIdentification
.
contains
(
"pacs.003"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_196
;
}
else
if
(
orgMsgNameIdentification
.
startsWith
(
"pacs.009"
)
||
orgMsgNameIdentification
.
startsWith
(
"pacs.010"
))
{
}
else
if
(
orgMsgNameIdentification
.
contains
(
"pacs.009"
)
||
orgMsgNameIdentification
.
contains
(
"pacs.010"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_296
;
}
else
if
(
orgMsgNameIdentification
.
matches
(
"MT10[0-9]{1}"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_196
;
}
else
if
(
orgMsgNameIdentification
.
matches
(
"MT20[0-9]{1}"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_296
;
}
else
{
buildSTErrorInfo
(
ERROR
.
T20092
,
null
,
null
);
buildSTErrorInfo
(
ERROR
.
T20092
,
"BLOCK2/:mtType:"
,
orgMsgNameIdentification
);
}
}
return
mtType
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/impl/Field11RGenerate.java
View file @
844c8594
...
...
@@ -60,7 +60,7 @@ public class Field11RGenerate extends AbstractMx2MtTagsGenerate {
}
else
{
tags
.
add
(
new
Tag
(
name
,
orgnlMsgNmId
+
Mx2MtConstants
.
NEW_LINE
+
date
));
if
(
boolean1
){
buildSTErrorInfo
(
ERROR
.
T20083
,
null
,
null
);
buildSTErrorInfo
(
ERROR
.
T20083
,
"BLOCK4/:11R:"
,
null
);
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/impl/Field20Generate.java
View file @
844c8594
...
...
@@ -23,14 +23,16 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"CxlDtls.TxInfAndSts.CxlStsId"
);
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
messageId
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
messageId
);
messageId
=
messageId
.
substring
(
0
,
15
)
+
"+"
;
}
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20090
,
"BLOCK4/:20:"
,
messageId
);
buildSTErrorInfo
(
ERROR
.
T20090
,
"BLOCK4/:20:"
,
value
);
tags
.
add
(
new
Tag
(
name
,
value
));
return
;
}
if
(
value
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
value
);
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/impl/Field21Generate.java
View file @
844c8594
...
...
@@ -23,14 +23,17 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
orgnlInstrId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"CxlDtls.TxInfAndSts.RslvdCase.Id"
);
if
(
StringUtil
.
isNotEmpty
(
orgnlInstrId
))
{
if
(
orgnlInstrId
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:21:"
,
orgnlInstrId
);
orgnlInstrId
=
orgnlInstrId
.
substring
(
0
,
15
)
+
"+"
;
}
String
value
=
orgnlInstrId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20091
,
"BLOCK4/:21:"
,
orgnlInstrId
);
buildSTErrorInfo
(
ERROR
.
T20091
,
"BLOCK4/:21:"
,
value
);
tags
.
add
(
new
Tag
(
name
,
value
));
return
;
}
if
(
value
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:21:"
,
value
);
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field20Generate.java
View file @
844c8594
...
...
@@ -23,15 +23,15 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
messageId
.
length
()
>
16
)
{
messageId
=
messageId
.
substring
(
0
,
15
)
+
"+"
;
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
messageId
);
}
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20051
,
"BLOCK4/:20:"
,
messageId
);
}
if
(
value
.
length
()
>
16
)
{
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
value
);
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field21Generate.java
View file @
844c8594
...
...
@@ -29,14 +29,16 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
filed21
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Itm("
+
0
+
").Id"
);
}
if
(
StringUtil
.
isNotEmpty
(
filed21
))
{
if
(
filed21
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:21:"
,
endToEndId
);
filed21
=
filed21
.
substring
(
0
,
15
)
+
"+"
;
}
String
value
=
filed21
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20055
,
"BLOCK4/:21:"
,
endToEndId
);
buildSTErrorInfo
(
ERROR
.
T20055
,
"BLOCK4/:21:"
,
value
);
tags
.
add
(
new
Tag
(
name
,
value
));
return
;
}
if
(
value
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:21:"
,
value
);
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field30Generate.java
View file @
844c8594
...
...
@@ -31,7 +31,7 @@ public class Field30Generate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isNotEmpty
(
mxDate
)){
mtDate
=
mXToMTDate
(
mxDate
);
}
else
{
mtDate
=
mXToMTDate
(
"991231"
)
;
mtDate
=
"991231"
;
buildSTErrorInfo
(
ERROR
.
T20062
,
"BLOCK4/:30:"
,
""
);
}
tags
.
add
(
new
Tag
(
name
,
mtDate
));
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field50aGenerate.java
View file @
844c8594
...
...
@@ -97,10 +97,7 @@ public class Field50aGenerate extends AbstractMx2MtTagsGenerate {
String
mtNameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
partyPath
);
tags
.
add
(
new
Tag
(
name_F
,
account
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
));
}
}
else
{
buildSTErrorInfo
(
ERROR
.
T20102
,
"BLOCK4/:50a:"
,
""
);
}
if
(
counts3
>
0
||
counts4
>
0
)
{
}
else
if
(
counts3
>
0
||
counts4
>
0
)
{
if
(
StringUtil
.
isNotEmpty
(
bicCode
))
{
tags
.
add
(
new
Tag
(
name_C
,
bicCode
));
}
else
if
(
StringUtil
.
isNotEmpty
(
country
))
{
...
...
@@ -110,11 +107,9 @@ public class Field50aGenerate extends AbstractMx2MtTagsGenerate {
String
nameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
partyPath
);
tags
.
add
(
new
Tag
(
name_
,
nameAddress
));
}
else
if
(
StringUtil
.
isNotEmpty
(
clearSystemId
))
{
buildSTErrorInfo
(
ERROR
.
T20097
,
"BLOCK4/:50K:"
,
""
);
tags
.
add
(
new
Tag
(
name_
,
clearSystemId
));
buildSTErrorInfo
(
ERROR
.
T20097
,
"BLOCK4/:50a:"
,
""
);
}
}
else
{
buildSTErrorInfo
(
ERROR
.
T20102
,
"BLOCK4/:50a:"
,
""
);
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field52aGenerate.java
View file @
844c8594
package
com
.
brilliance
.
swift
.
mx2mt
.
mt210
.
impl
;
import
com.brilliance.swift.constants.ERROR
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate
;
...
...
@@ -24,6 +25,7 @@ public class Field52aGenerate extends AbstractMx2MtTagsGenerate {
context
.
set
(
Mx2MtContextIdentifier
.
MX_TO_MT_ERROR_LOCATION
,
"Block4/52a"
);
String
s
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
MT_TYPE_210_50_FLAG
);
if
(
Mx2MtConstants
.
YES
.
equals
(
s
)){
buildSTErrorInfo
(
ERROR
.
T20102
,
"BLOCK4/:52a:"
,
""
);
return
;
}
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field20Generate.java
View file @
844c8594
...
...
@@ -23,14 +23,16 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Id"
);
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
messageId
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
messageId
);
messageId
=
messageId
.
substring
(
0
,
15
)
+
"+"
;
}
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
buildSTErrorInfo
(
ERROR
.
T20115
,
"BLOCK4/:20:"
,
messageId
);
buildSTErrorInfo
(
ERROR
.
T20115
,
"BLOCK4/:20:"
,
value
);
tags
.
add
(
new
Tag
(
name
,
value
));
return
;
}
if
(
value
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
"BLOCK4/:20:"
,
value
);
value
=
value
.
substring
(
0
,
15
)
+
"+"
;
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field28CGenerate.java
View file @
844c8594
...
...
@@ -24,7 +24,7 @@ public class Field28CGenerate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isEmpty
(
num
)||
num
.
length
()>
5
){
num
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.ElctrncSeqNb"
);
if
(
StringUtil
.
isEmpty
(
num
)||
num
.
length
()>
5
){
buildSTErrorInfo
(
ERROR
.
T20103
,
"BLOCK4/:28:"
,
bodyHdrParentElementName
+
"Rpt.ElctrncSeqNb"
);
buildSTErrorInfo
(
ERROR
.
T20103
,
"BLOCK4/:28
C
:"
,
bodyHdrParentElementName
+
"Rpt.ElctrncSeqNb"
);
return
;
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field34FGenerate.java
View file @
844c8594
...
...
@@ -19,7 +19,6 @@ public class Field34FGenerate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
currency
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Acct.Ccy"
);
tags
.
add
(
new
Tag
(
name
,
currency
+
"D"
+
"0,"
));
tags
.
add
(
new
Tag
(
name
,
currency
+
"C"
+
"0,"
));
tags
.
add
(
new
Tag
(
name
,
currency
+
"0,"
));
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field61Generate.java
View file @
844c8594
...
...
@@ -37,7 +37,7 @@ public class Field61Generate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
int
entryCount
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry"
);
if
(
entryCount
>
1
89
){
if
(
entryCount
>
1
90
){
buildSTErrorInfo
(
ERROR
.
T20110
,
"BLOCK4/:61:"
,
entryCount
+
""
);
return
;
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field90CGenerate.java
View file @
844c8594
...
...
@@ -27,15 +27,13 @@ public class Field90CGenerate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isNotEmpty
(
sumc
)&&
StringUtil
.
isNotEmpty
(
nbOfNtries
))
{
String
currency
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Acct.Ccy"
);
String
amt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
sumc
),
currency
);
if
(
amt
.
length
()>
15
){
buildSTErrorInfo
(
ERROR
.
T20120
,
"BLOCK4/:90C:"
,
amt
);
}
else
if
(
nbOfNtries
.
length
()>
5
){
if
(
nbOfNtries
.
length
()>
5
){
buildSTErrorInfo
(
ERROR
.
T20119
,
"BLOCK4/:90C:"
,
nbOfNtries
);
}
else
{
tags
.
add
(
new
Tag
(
name
,
nbOfNtries
+
currency
+
amt
));
}
}
else
{
buildSTErrorInfo
(
ERROR
.
T20122
,
"BLOCK4/:90
D
:"
,
""
);
buildSTErrorInfo
(
ERROR
.
T20122
,
"BLOCK4/:90
C
:"
,
""
);
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field90DGenerate.java
View file @
844c8594
...
...
@@ -27,9 +27,7 @@ public class Field90DGenerate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isNotEmpty
(
sumd
)&&
StringUtil
.
isNotEmpty
(
nbOfNtries
))
{
String
currency
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Acct.Ccy"
);
String
amt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
sumd
),
currency
);
if
(
amt
.
length
()>
15
){
buildSTErrorInfo
(
ERROR
.
T20120
,
"BLOCK4/:90D:"
,
amt
);
}
else
if
(
nbOfNtries
.
length
()>
5
){
if
(
nbOfNtries
.
length
()>
5
){
buildSTErrorInfo
(
ERROR
.
T20119
,
"BLOCK4/:90D:"
,
nbOfNtries
);
}
else
{
tags
.
add
(
new
Tag
(
name
,
nbOfNtries
+
currency
+
amt
));
...
...
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