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
3e32e0af
Commit
3e32e0af
authored
Jun 29, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mt192292的异常警告的定义
parent
8f9dedf7
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
120 additions
and
73 deletions
+120
-73
SwiftTransfer.java
...ore/src/main/java/com/brilliance/swift/SwiftTransfer.java
+1
-1
Mx2Mtn92Creator.java
.../com/brilliance/swift/mx2mt/mt192292/Mx2Mtn92Creator.java
+3
-0
Field11SGenerate.java
...rilliance/swift/mx2mt/mt192292/impl/Field11SGenerate.java
+19
-0
Field20Generate.java
...brilliance/swift/mx2mt/mt192292/impl/Field20Generate.java
+7
-0
Field21Generate.java
...brilliance/swift/mx2mt/mt192292/impl/Field21Generate.java
+6
-0
Mx2Mtn96Creator.java
.../com/brilliance/swift/mx2mt/mt196296/Mx2Mtn96Creator.java
+2
-0
Field20Generate.java
...brilliance/swift/mx2mt/mt196296/impl/Field20Generate.java
+1
-0
Field21Generate.java
...brilliance/swift/mx2mt/mt196296/impl/Field21Generate.java
+1
-0
Field20Generate.java
...om/brilliance/swift/mx2mt/mt210/impl/Field20Generate.java
+1
-0
Field21Generate.java
...om/brilliance/swift/mx2mt/mt210/impl/Field21Generate.java
+1
-0
Field30Generate.java
...om/brilliance/swift/mx2mt/mt210/impl/Field30Generate.java
+6
-2
Field50aGenerate.java
...m/brilliance/swift/mx2mt/mt210/impl/Field50aGenerate.java
+5
-0
Field20Generate.java
...brilliance/swift/mx2mt/mt941942/impl/Field20Generate.java
+1
-0
Field61Generate.java
...brilliance/swift/mx2mt/mt941942/impl/Field61Generate.java
+4
-0
Field90CGenerate.java
...rilliance/swift/mx2mt/mt941942/impl/Field90CGenerate.java
+6
-2
Field90DGenerate.java
...rilliance/swift/mx2mt/mt941942/impl/Field90DGenerate.java
+6
-2
ErrorCodeList.xlsx
swiftCore/src/main/resources/ErrorCodeList.xlsx
+0
-0
MXcamt05200108_941.xml
swiftCore/src/main/resources/swiftXml/MXcamt05200108_941.xml
+10
-10
MXcamt05200108_942.xml
swiftCore/src/main/resources/swiftXml/MXcamt05200108_942.xml
+10
-10
MxCamt02900108_296.xml
swiftCore/src/main/resources/swiftXml/MxCamt02900108_296.xml
+3
-3
MxCamt05300108_950.xml
swiftCore/src/main/resources/swiftXml/MxCamt05300108_950.xml
+1
-1
MxCamt05400108_CREDIT.xml
...ore/src/main/resources/swiftXml/MxCamt05400108_CREDIT.xml
+0
-9
MxCamt05400108_DEBIT.xml
...Core/src/main/resources/swiftXml/MxCamt05400108_DEBIT.xml
+0
-3
MxCamt05600108_192.xml
swiftCore/src/main/resources/swiftXml/MxCamt05600108_192.xml
+3
-3
MxCamt05600108_292.xml
swiftCore/src/main/resources/swiftXml/MxCamt05600108_292.xml
+2
-2
Test196.java
...rc/test/java/com/brilliance/mt2mx/camt029001/Test196.java
+0
-5
Test296.java
...rc/test/java/com/brilliance/mt2mx/camt029001/Test296.java
+0
-5
Test192.java
...rc/test/java/com/brilliance/mt2mx/camt056001/Test192.java
+1
-6
Test292.java
...rc/test/java/com/brilliance/mt2mx/camt056001/Test292.java
+1
-6
TestMx2MtFor192.java
...test/java/com/brilliance/mx2mt/mt192/TestMx2MtFor192.java
+19
-3
No files found.
swiftCore/src/main/java/com/brilliance/swift/SwiftTransfer.java
View file @
3e32e0af
...
...
@@ -183,7 +183,7 @@ public class SwiftTransfer {
}
public
static
void
main
(
String
[]
args
)
throws
IOException
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftXml\\Mx
Pacs00200110_Pacs009
.xml"
);
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftXml\\Mx
Camt05700106
.xml"
);
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
validateMx
(
xmlStr
);
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/Mx2Mtn92Creator.java
View file @
3e32e0af
package
com
.
brilliance
.
swift
.
mx2mt
.
mt192292
;
import
com.brilliance.swift.constants.ERROR
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2mt.AbstractMx2MtCreator
;
...
...
@@ -72,6 +73,8 @@ public class Mx2Mtn92Creator extends AbstractMx2MtCreator {
mtType
=
Mx2MtConstants
.
MT_TYPE_192
;
}
else
if
(
orgMsgNameIdentification
.
matches
(
"MT20[0-9]{1}"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_292
;
}
else
{
buildSTErrorInfo
(
ERROR
.
T20092
,
null
,
null
);
}
}
return
mtType
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field11SGenerate.java
View file @
3e32e0af
package
com
.
brilliance
.
swift
.
mx2mt
.
mt192292
.
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
;
...
...
@@ -25,6 +26,24 @@ public class Field11SGenerate extends AbstractMx2MtTagsGenerate {
String
dateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Undrlyg.TxInf.OrgnlGrpInf.OrgnlCreDtTm"
);
if
(
StringUtil
.
isNotEmpty
(
mtType
))
{
orgnlMsgNmId
=
getMtMsg
(
mtType
);
if
(
StringUtil
.
isNotEmpty
(
mtType
)){
if
(
mtType
.
startsWith
(
"pacs.008"
)){
orgnlMsgNmId
=
"103"
;
}
else
if
(
mtType
.
startsWith
(
"pacs.003"
)){
orgnlMsgNmId
=
"104"
;
}
else
if
(
mtType
.
startsWith
(
"pacs.009"
)){
orgnlMsgNmId
=
"202"
;
}
else
if
(
mtType
.
startsWith
(
"pacs.010"
)){
orgnlMsgNmId
=
"204"
;
}
else
if
(
mtType
.
matches
(
"MT10[0-9]{1}"
)){
orgnlMsgNmId
=
mtType
.
substring
(
2
);
}
else
if
(
mtType
.
matches
(
"MT20[0-9]{1}"
)){
orgnlMsgNmId
=
mtType
.
substring
(
2
);
}
else
{
orgnlMsgNmId
=
"202"
;
buildSTErrorInfo
(
ERROR
.
T20083
,
null
,
null
);
}
}
}
if
(
StringUtil
.
isNotEmpty
(
dateStr
)){
date
=
mXToMTDate
(
dateStr
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field20Generate.java
View file @
3e32e0af
package
com
.
brilliance
.
swift
.
mx2mt
.
mt192292
.
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
;
import
com.brilliance.swift.mx2mt.Mx2MtContextIdentifier
;
import
com.brilliance.swift.util.StringUtil
;
import
com.brilliance.swift.util.SwiftTransferUtil
;
import
com.brilliance.swift.vo.SwiftTranslationErrorInfo
;
import
com.brilliance.swift.vo.SwiftTranslationReport
;
import
com.prowidesoftware.swift.model.SwiftMessage
;
import
com.prowidesoftware.swift.model.Tag
;
...
...
@@ -23,11 +28,13 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
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
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field21Generate.java
View file @
3e32e0af
package
com
.
brilliance
.
swift
.
mx2mt
.
mt192292
.
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
;
import
com.brilliance.swift.mx2mt.Mx2MtContextIdentifier
;
import
com.brilliance.swift.util.StringUtil
;
import
com.prowidesoftware.swift.model.SwiftMessage
;
import
com.prowidesoftware.swift.model.Tag
;
...
...
@@ -24,12 +26,16 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
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
));
}
else
{
buildSTErrorInfo
(
ERROR
.
T20072
,
"BLOCK4/:21:"
,
orgnlInstrId
);
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/Mx2Mtn96Creator.java
View file @
3e32e0af
...
...
@@ -73,6 +73,8 @@ public class Mx2Mtn96Creator extends AbstractMx2MtCreator {
mtType
=
Mx2MtConstants
.
MT_TYPE_196
;
}
else
if
(
orgMsgNameIdentification
.
matches
(
"MT20[0-9]{1}"
))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_296
;
}
else
{
//TODO,填入location:(mt196|mt296)/block3/:11R:,errorcode:T20083
}
}
return
mtType
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/impl/Field20Generate.java
View file @
3e32e0af
...
...
@@ -28,6 +28,7 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
//TODO,填入location:(mt196|mt296)/block3/:20:,errorcode:T20090
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt196296/impl/Field21Generate.java
View file @
3e32e0af
...
...
@@ -28,6 +28,7 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
String
value
=
orgnlInstrId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
//TODO,填入location:(mt196|mt296)/block3/:21:,errorcode:T20091
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field20Generate.java
View file @
3e32e0af
...
...
@@ -28,6 +28,7 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
//TODO,填入location:mt210/block3/:20:,errorcode:T20051
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field21Generate.java
View file @
3e32e0af
...
...
@@ -34,6 +34,7 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
String
value
=
filed21
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
//TODO,填入location:mt210/block3/:21:,errorcode:T20055
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field30Generate.java
View file @
3e32e0af
...
...
@@ -20,6 +20,7 @@ public class Field30Generate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
mxDate
=
""
;
String
mtDate
=
""
;
String
valDt
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.XpctdValDt"
);
if
(
StringUtil
.
isNotEmpty
(
valDt
)){
mxDate
=
valDt
;
...
...
@@ -27,8 +28,11 @@ public class Field30Generate extends AbstractMx2MtTagsGenerate {
mxDate
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Itm("
+
0
+
").XpctdValDt"
);
}
if
(
StringUtil
.
isNotEmpty
(
mxDate
)){
String
mtDate
=
mXToMTDate
(
mxDate
);
tags
.
add
(
new
Tag
(
name
,
mtDate
));
mtDate
=
mXToMTDate
(
mxDate
);
}
else
{
mtDate
=
mXToMTDate
(
"991231"
);
//TODO,填入location:mt210/block3/:30:,errorcode:T00062
}
tags
.
add
(
new
Tag
(
name
,
mtDate
));
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt210/impl/Field50aGenerate.java
View file @
3e32e0af
...
...
@@ -95,6 +95,8 @@ public class Field50aGenerate extends AbstractMx2MtTagsGenerate {
String
mtNameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
partyPath
);
tags
.
add
(
new
Tag
(
name_F
,
account
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
));
}
}
else
{
//TODO,填入location:mt210/block3/:50a:,errorcode:T20102
}
if
(
counts3
>
0
||
counts4
>
0
)
{
if
(
StringUtil
.
isNotEmpty
(
bicCode
))
{
...
...
@@ -107,7 +109,10 @@ public class Field50aGenerate extends AbstractMx2MtTagsGenerate {
tags
.
add
(
new
Tag
(
name_
,
nameAddress
));
}
else
if
(
StringUtil
.
isNotEmpty
(
clearSystemId
))
{
tags
.
add
(
new
Tag
(
name_
,
clearSystemId
));
//TODO,填入location:mt210/block3/:50a:,errorcode:T20097
}
}
else
{
//TODO,填入location:mt210/block3/:50a:,errorcode:T20102
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field20Generate.java
View file @
3e32e0af
...
...
@@ -28,6 +28,7 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
String
value
=
messageId
;
if
(
value
.
startsWith
(
"/"
)
||
value
.
endsWith
(
"/"
)
||
value
.
contains
(
"//"
))
{
value
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
//TODO,填入location:mt942/block3/:20:,errorcode:T20115
}
tags
.
add
(
new
Tag
(
name
,
value
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field61Generate.java
View file @
3e32e0af
...
...
@@ -77,6 +77,10 @@ public class Field61Generate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isNotEmpty
(
amt
)
&&
StringUtil
.
isNotEmpty
(
ccy
))
{
value
+=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
amt
),
ccy
);
}
if
(
amt
.
length
()>
15
){
//TODO,填入location:mt942/block3/:61:,errorcode:T20113
return
;
}
value
+=
"NTRF"
;
String
endToEndId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").NtryDtls.TxDtls.Refs.EndToEndId"
);
if
(
StringUtil
.
isNotEmpty
(
endToEndId
))
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field90CGenerate.java
View file @
3e32e0af
...
...
@@ -26,11 +26,15 @@ public class Field90CGenerate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isNotEmpty
(
sum
)&&
StringUtil
.
isNotEmpty
(
nbOfNtries
))
{
String
currency
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Acct.Ccy"
);
String
amt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
sum
),
currency
);
if
(
amt
.
length
()>
15
||
nbOfNtries
.
length
()>
5
){
if
(
amt
.
length
()>
15
){
//TODO,填入location:mt942/block3/:90C:,errorcode:T20120
}
else
if
(
nbOfNtries
.
length
()>
5
){
//TODO,填入location:mt942/block3/:90C:,errorcode:T20119
}
else
{
tags
.
add
(
new
Tag
(
name
,
nbOfNtries
+
currency
+
amt
));
}
}
else
{
//TODO,填入location:mt942/block3/:90C:,errorcode:T20122
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field90DGenerate.java
View file @
3e32e0af
...
...
@@ -26,11 +26,15 @@ public class Field90DGenerate extends AbstractMx2MtTagsGenerate {
if
(
StringUtil
.
isNotEmpty
(
sum
)&&
StringUtil
.
isNotEmpty
(
nbOfNtries
))
{
String
currency
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Acct.Ccy"
);
String
amt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
sum
),
currency
);
if
(
amt
.
length
()>
15
||
nbOfNtries
.
length
()>
5
){
if
(
amt
.
length
()>
15
){
//TODO,填入location:mt942/block3/:90D:,errorcode:T20120
}
else
if
(
nbOfNtries
.
length
()>
5
){
//TODO,填入location:mt942/block3/:90D:,errorcode:T20119
}
else
{
tags
.
add
(
new
Tag
(
name
,
nbOfNtries
+
currency
+
amt
));
}
}
else
{
//TODO,填入location:mt942/block3/:90D:,errorcode:T20121
}
}
}
swiftCore/src/main/resources/ErrorCodeList.xlsx
View file @
3e32e0af
No preview for this file type
swiftCore/src/main/resources/swiftXml/MXcamt05200108_941.xml
View file @
3e32e0af
...
...
@@ -42,16 +42,6 @@ Change Log
<CreDtTm>
2020-12-15T11:00:00-07:00
</CreDtTm>
</GrpHdr>
<Rpt>
<TxsSummry>
<TtlCdtNtries>
<Sum
Ccy=
"EUR"
>
385700
</Sum>
<NbOfNtries>
87
</NbOfNtries>
</TtlCdtNtries>
<TtlDbtNtries>
<Sum
Ccy=
"EUR"
>
210000
</Sum>
<NbOfNtries>
9
</NbOfNtries>
</TtlDbtNtries>
</TxsSummry>
<Id>
100-01
</Id>
<RptPgntn>
<PgNb>
1
</PgNb>
...
...
@@ -114,6 +104,16 @@ Change Log
<Dt>
2020-12-15
</Dt>
</Dt>
</Bal>
<TxsSummry>
<TtlCdtNtries>
<NbOfNtries>
87
</NbOfNtries>
<Sum>
385700
</Sum>
</TtlCdtNtries>
<TtlDbtNtries>
<NbOfNtries>
9
</NbOfNtries>
<Sum>
210000
</Sum>
</TtlDbtNtries>
</TxsSummry>
<Ntry>
<Amt
Ccy=
"EUR"
>
1000000
</Amt>
<CdtDbtInd>
CRDT
</CdtDbtInd>
...
...
swiftCore/src/main/resources/swiftXml/MXcamt05200108_942.xml
View file @
3e32e0af
...
...
@@ -42,16 +42,6 @@ Change Log
<CreDtTm>
2020-12-15T11:00:00-07:00
</CreDtTm>
</GrpHdr>
<Rpt>
<TxsSummry>
<TtlCdtNtries>
<Sum
Ccy=
"EUR"
>
385700
</Sum>
<NbOfNtries>
87
</NbOfNtries>
</TtlCdtNtries>
<TtlDbtNtries>
<Sum
Ccy=
"EUR"
>
210000
</Sum>
<NbOfNtries>
9
</NbOfNtries>
</TtlDbtNtries>
</TxsSummry>
<Id>
100-01
</Id>
<RptPgntn>
<PgNb>
1
</PgNb>
...
...
@@ -66,6 +56,16 @@ Change Log
</Id>
<Ccy>
EUR
</Ccy>
</Acct>
<TxsSummry>
<TtlCdtNtries>
<NbOfNtries>
87
</NbOfNtries>
<Sum>
385700
</Sum>
</TtlCdtNtries>
<TtlDbtNtries>
<NbOfNtries>
9
</NbOfNtries>
<Sum>
210000
</Sum>
</TtlDbtNtries>
</TxsSummry>
<Ntry>
<Amt
Ccy=
"EUR"
>
1000000
</Amt>
<CdtDbtInd>
CRDT
</CdtDbtInd>
...
...
swiftCore/src/main/resources/swiftXml/MxCamt02900108_296.xml
View file @
3e32e0af
...
...
@@ -98,8 +98,6 @@ Change Log
<OrgnlEndToEndId>
pacs008EndToEndId-001
</OrgnlEndToEndId>
<OrgnlUETR>
8a562c67-ca16-48ba-b074-65581be6f001
</OrgnlUETR>
<CxlStsRsnInf>
<AddtlInf>
HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.
</AddtlInf>
<AddtlInf>
NICE TO MEET YOU
</AddtlInf>
<Orgtr>
<Nm>
A Debiter
</Nm>
<PstlAdr>
...
...
@@ -110,7 +108,9 @@ Change Log
</Orgtr>
<Rsn>
<Cd>
AGNT
</Cd>
</Rsn>
</Rsn>
<AddtlInf>
HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,W
</AddtlInf>
<AddtlInf>
NICE TO MEET YOU
</AddtlInf>
</CxlStsRsnInf>
</TxInfAndSts>
</CxlDtls>
...
...
swiftCore/src/main/resources/swiftXml/MxCamt05300108_950.xml
View file @
3e32e0af
...
...
@@ -114,7 +114,7 @@ Change Log
<Ntry>
<Amt
Ccy=
"EUR"
>
100.23
</Amt>
<CdtDbtInd>
DBIT
</CdtDbtInd>
<RvslInd>
T
rue
</RvslInd>
<RvslInd>
t
rue
</RvslInd>
<Sts>
<Cd>
BOOK
</Cd>
</Sts>
...
...
swiftCore/src/main/resources/swiftXml/MxCamt05400108_CREDIT.xml
View file @
3e32e0af
...
...
@@ -106,15 +106,6 @@ Change Log
<Purp>
<Cd>
COMC
</Cd>
</Purp>
<RltdRmtInf>
<RmtId>
ID-1236654
</RmtId>
</RltdRmtInf>
<RmtInf>
<Ustrd>
Inv: AEG-69874/958
</Ustrd>
</RmtInf>
<RltdDts>
<IntrBkSttlmDt>
2020-09-08
</IntrBkSttlmDt>
</RltdDts>
</TxDtls>
</NtryDtls>
</Ntry>
...
...
swiftCore/src/main/resources/swiftXml/MxCamt05400108_DEBIT.xml
View file @
3e32e0af
...
...
@@ -92,9 +92,6 @@ Change Log
</Agt>
</Cdtr>
</RltdPties>
<RltdDts>
<IntrBkSttlmDt>
2021-02-23
</IntrBkSttlmDt>
</RltdDts>
</TxDtls>
</NtryDtls>
</Ntry>
...
...
swiftCore/src/main/resources/swiftXml/MxCamt05600108_192.xml
View file @
3e32e0af
...
...
@@ -56,7 +56,7 @@ Change Log
<Undrlyg>
<TxInf>
<Case>
<Id>
CSE-001
</Id>
<Id>
CSE-001
</Id>
<Cretr>
<Agt>
<FinInstnId>
...
...
@@ -67,10 +67,10 @@ Change Log
</Case>
<OrgnlGrpInf>
<OrgnlMsgId>
pacs8bizmsgidr01
</OrgnlMsgId>
<OrgnlMsgNmId>
pacs.008.001.08
</OrgnlMsgNmId>
<OrgnlMsgNmId>
pacs.008.001.08
</OrgnlMsgNmId>
<OrgnlCreDtTm>
2021-02-17T08:30:00+01:00
</OrgnlCreDtTm>
</OrgnlGrpInf>
<OrgnlInstrId>
pacs8bizmsgidr01
</OrgnlInstrId>
<OrgnlInstrId>
pacs8bizmsgidr01
</OrgnlInstrId>
<OrgnlEndToEndId>
pacs008EndToEndId-001
</OrgnlEndToEndId>
<OrgnlUETR>
8a562c67-ca16-48ba-b074-65581be6f001
</OrgnlUETR>
<OrgnlIntrBkSttlmAmt
Ccy=
"EUR"
>
1500000
</OrgnlIntrBkSttlmAmt>
...
...
swiftCore/src/main/resources/swiftXml/MxCamt05600108_292.xml
View file @
3e32e0af
...
...
@@ -76,8 +76,6 @@ Change Log
<OrgnlIntrBkSttlmAmt
Ccy=
"EUR"
>
1500000
</OrgnlIntrBkSttlmAmt>
<OrgnlIntrBkSttlmDt>
2021-02-17
</OrgnlIntrBkSttlmDt>
<CxlRsnInf>
<AddtlInf>
HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.
</AddtlInf>
<AddtlInf>
NICE TO MEET YOU
</AddtlInf>
<Orgtr>
<Nm>
A Debiter
</Nm>
<PstlAdr>
...
...
@@ -89,6 +87,8 @@ Change Log
<Rsn>
<Cd>
AM09
</Cd>
</Rsn>
<AddtlInf>
HELLO,WORLD.HELLO,WORLD.HELLO,WORLD.HELLO,
</AddtlInf>
<AddtlInf>
NICE TO MEET YOU
</AddtlInf>
</CxlRsnInf>
</TxInf>
</Undrlyg>
...
...
swiftCore/src/test/java/com/brilliance/mt2mx/camt029001/Test196.java
View file @
3e32e0af
...
...
@@ -13,10 +13,5 @@ public class Test196 {
String
mtStr
=
FileUtils
.
readFileToString
(
file
);
String
mxXml
=
new
Mt2MxCreatorManager
().
mt2mx
(
mtStr
,
null
,
null
);
System
.
out
.
println
(
mxXml
);
/*AbstractMT abstractMT = AbstractMT.parse(mtStr);
MT103 mt103 = (MT103)abstractMT;
Field53A field53A = mt103.getField53A();
System.out.println(field53A.getComponent(1) + field53A.getComponent2());
System.out.println(field53A.getBIC());*/
}
}
swiftCore/src/test/java/com/brilliance/mt2mx/camt029001/Test296.java
View file @
3e32e0af
...
...
@@ -13,10 +13,5 @@ public class Test296 {
String
mtStr
=
FileUtils
.
readFileToString
(
file
);
String
mxXml
=
new
Mt2MxCreatorManager
().
mt2mx
(
mtStr
,
null
,
null
);
System
.
out
.
println
(
mxXml
);
/*AbstractMT abstractMT = AbstractMT.parse(mtStr);
MT103 mt103 = (MT103)abstractMT;
Field53A field53A = mt103.getField53A();
System.out.println(field53A.getComponent(1) + field53A.getComponent2());
System.out.println(field53A.getBIC());*/
}
}
swiftCore/src/test/java/com/brilliance/mt2mx/camt056001
08
/Test192.java
→
swiftCore/src/test/java/com/brilliance/mt2mx/camt056001/Test192.java
View file @
3e32e0af
package
com
.
brilliance
.
mt2mx
.
camt056001
08
;
package
com
.
brilliance
.
mt2mx
.
camt056001
;
import
com.brilliance.swift.mt2mx.Mt2MxCreatorManager
;
import
org.apache.commons.io.FileUtils
;
...
...
@@ -13,10 +13,5 @@ public class Test192 {
String
mtStr
=
FileUtils
.
readFileToString
(
file
);
String
mxXml
=
new
Mt2MxCreatorManager
().
mt2mx
(
mtStr
,
null
,
null
);
System
.
out
.
println
(
mxXml
);
/*AbstractMT abstractMT = AbstractMT.parse(mtStr);
MT103 mt103 = (MT103)abstractMT;
Field53A field53A = mt103.getField53A();
System.out.println(field53A.getComponent(1) + field53A.getComponent2());
System.out.println(field53A.getBIC());*/
}
}
swiftCore/src/test/java/com/brilliance/mt2mx/camt056001
08
/Test292.java
→
swiftCore/src/test/java/com/brilliance/mt2mx/camt056001/Test292.java
View file @
3e32e0af
package
com
.
brilliance
.
mt2mx
.
camt056001
08
;
package
com
.
brilliance
.
mt2mx
.
camt056001
;
import
com.brilliance.swift.mt2mx.Mt2MxCreatorManager
;
import
org.apache.commons.io.FileUtils
;
...
...
@@ -13,10 +13,5 @@ public class Test292 {
String
mtStr
=
FileUtils
.
readFileToString
(
file
);
String
mxXml
=
new
Mt2MxCreatorManager
().
mt2mx
(
mtStr
,
null
,
null
);
System
.
out
.
println
(
mxXml
);
/*AbstractMT abstractMT = AbstractMT.parse(mtStr);
MT103 mt103 = (MT103)abstractMT;
Field53A field53A = mt103.getField53A();
System.out.println(field53A.getComponent(1) + field53A.getComponent2());
System.out.println(field53A.getBIC());*/
}
}
swiftCore/src/test/java/com/brilliance/mx2mt/mt192/TestMx2MtFor192.java
View file @
3e32e0af
package
com
.
brilliance
.
mx2mt
.
mt192
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.vo.SwiftTranslationErrorInfo
;
import
com.brilliance.swift.vo.SwiftTranslationReport
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.util.List
;
public
class
TestMx2MtFor192
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftXml\\Mx
c
amt05600108_192.xml"
);
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftXml\\Mx
C
amt05600108_192.xml"
);
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
String
mt192
=
SwiftTransfer
.
mx2Mt
(
xmlStr
,
null
,
null
);
System
.
out
.
println
(
mt192
);
SwiftTranslationReport
str
=
SwiftTransfer
.
mx2MtPlus
(
xmlStr
,
null
,
null
);
if
(
str
!=
null
)
{
List
<
SwiftTranslationErrorInfo
>
errorInfos
=
str
.
getErrorInfos
();
if
(
errorInfos
!=
null
&&
errorInfos
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
errorInfos
.
size
();
i
++)
{
SwiftTranslationErrorInfo
errorInfo
=
errorInfos
.
get
(
i
);
String
location
=
errorInfo
.
getLocation
();
String
errorType
=
errorInfo
.
getErrorType
();
String
description
=
errorInfo
.
getDescription
();
System
.
out
.
println
(
location
+
Mx2MtConstants
.
NEW_LINE
+
"-"
+
errorType
+
":"
+
description
);
}
}
System
.
out
.
println
(
str
.
getMessage
());
}
}
}
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