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
d88760d6
Commit
d88760d6
authored
Jul 08, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成mt942中文的报文要素展示
parent
2a458576
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
232 additions
and
17 deletions
+232
-17
Mx2MapCreatorManager.java
...ava/com/brilliance/swift/mx2map/Mx2MapCreatorManager.java
+8
-0
Mx2MapCamt029Creator.java
...brilliance/swift/mx2map/camt029/Mx2MapCamt029Creator.java
+6
-6
Mx2MapCamt052Creator.java
...brilliance/swift/mx2map/camt052/Mx2MapCamt052Creator.java
+121
-0
Mx2MapCamt056Creator.java
...brilliance/swift/mx2map/camt056/Mx2MapCamt056Creator.java
+6
-6
Mx2MapCamt057Creator.java
...brilliance/swift/mx2map/camt057/Mx2MapCamt057Creator.java
+0
-0
Messages_CN.properties
swiftCore/src/main/resources/Messages_CN.properties
+18
-0
MXcamt05200108_942.xml
swiftCore/src/main/resources/swiftXml/MXcamt05200108_942.xml
+5
-5
Test.java
...ore/src/test/java/com/brilliance/mx2mtmap/mt192/Test.java
+17
-0
Test.java
...ore/src/test/java/com/brilliance/mx2mtmap/mt196/Test.java
+17
-0
Test.java
...ore/src/test/java/com/brilliance/mx2mtmap/mt210/Test.java
+17
-0
Test.java
...ore/src/test/java/com/brilliance/mx2mtmap/mt942/Test.java
+17
-0
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2map/Mx2MapCreatorManager.java
View file @
d88760d6
...
...
@@ -2,8 +2,10 @@ package com.brilliance.swift.mx2map;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2map.camt029.Mx2MapCamt029Creator
;
import
com.brilliance.swift.mx2map.camt052.Mx2MapCamt052Creator
;
import
com.brilliance.swift.mx2map.camt053.Mx2MapCamt053Creator
;
import
com.brilliance.swift.mx2map.camt056.Mx2MapCamt056Creator
;
import
com.brilliance.swift.mx2map.camt057.Mx2MapCamt057Creator
;
import
com.prowidesoftware.swift.model.mx.AbstractMX
;
import
java.util.Map
;
...
...
@@ -33,6 +35,12 @@ public class Mx2MapCreatorManager {
} else if("camt.056.001".equals(messageType)) {
return new Mx2MapCamt056Creator();
}*/
/*else if("camt.052.001".equals(messageType)){
return new Mx2MapCamt052Creator();
}*/
/*else if("camt.057.001".equals(messageType)){
return new Mx2MapCamt057Creator();
}*/
else
{
return
new
DefaultMx2MapCreator
();
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt029/Mx2MapCamt029Creator.java
View file @
d88760d6
...
...
@@ -37,13 +37,13 @@ public class Mx2MapCamt029Creator extends AbstractMx2MapCreator {
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
bizSvc
);
XMLGregorianCalendar
creDt
=
abstractMX
.
getAppHdr
().
creationDate
();
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
creDt
.
toXMLFormat
());
String
cxlSts
Id
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.CxlStsId"
);
if
(
StringUtil
.
isNotEmpty
(
cxlSts
Id
)){
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"message.id"
),
cxlSts
Id
);
String
message
Id
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.CxlStsId"
);
if
(
StringUtil
.
isNotEmpty
(
message
Id
)){
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"message.id"
),
message
Id
);
}
String
case
Id
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.RslvdCase.Id"
);
if
(
StringUtil
.
isNotEmpty
(
case
Id
)){
maps
.
put
(
getPropertyValue
(
"endToEnd.id"
),
case
Id
);
String
endToEnd
Id
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.RslvdCase.Id"
);
if
(
StringUtil
.
isNotEmpty
(
endToEnd
Id
)){
maps
.
put
(
getPropertyValue
(
"endToEnd.id"
),
endToEnd
Id
);
}
String
nameId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlMsgNmId"
);
String
dateStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlCreDtTm"
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt052/Mx2MapCamt052Creator.java
0 → 100644
View file @
d88760d6
package
com
.
brilliance
.
swift
.
mx2map
.
camt052
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2map.AbstractMx2MapCreator
;
import
com.brilliance.swift.util.StringUtil
;
import
com.brilliance.swift.util.XmlUtil
;
import
com.brilliance.swift.vo.common.CdtDbtCode
;
import
org.dom4j.Document
;
import
org.dom4j.DocumentException
;
import
org.dom4j.DocumentHelper
;
import
javax.xml.datatype.XMLGregorianCalendar
;
import
java.util.Map
;
public
class
Mx2MapCamt052Creator
extends
AbstractMx2MapCreator
{
@Override
public
Map
<
String
,
String
>
mx2Map
()
throws
SwiftException
{
try
{
Document
document
=
DocumentHelper
.
parseText
(
xmlStr
);
Map
<
String
,
String
>
parentElementMaps
=
XmlUtil
.
getParentElementMaps
(
document
);
String
appHdrParentElementName
=
parentElementMaps
.
get
(
"AppHdr"
);
String
grpHdrParentElementName
=
parentElementMaps
.
get
(
"GrpHdr"
);
String
bodyParentElementName
=
parentElementMaps
.
get
(
"Rpt"
);
String
sendBic
=
abstractMX
.
getAppHdr
().
from
();
maps
.
put
(
getPropertyValue
(
"app.header.sendBic"
),
sendBic
);
String
receiverBic
=
abstractMX
.
getAppHdr
().
to
();
maps
.
put
(
getPropertyValue
(
"app.header.receiverBic"
),
receiverBic
);
String
msgDefId
=
abstractMX
.
getAppHdr
().
messageName
();
maps
.
put
(
getPropertyValue
(
"app.header.msgDefId"
),
msgDefId
);
String
bizSvc
=
abstractMX
.
getAppHdr
().
serviceName
();
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
bizSvc
);
XMLGregorianCalendar
creDt
=
abstractMX
.
getAppHdr
().
creationDate
();
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
creDt
.
toXMLFormat
());
String
messageId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Id"
);
if
(
StringUtil
.
isNotEmpty
(
messageId
)){
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"message.id"
),
messageId
);
}
String
iban
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Acct.Id.IBAN"
);
String
acctId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Acct.Id.Othr.Id"
);
String
account
=
StringUtil
.
isNotEmpty
(
iban
)
?
iban
:
acctId
;
if
(
StringUtil
.
isNotEmpty
(
account
))
{
maps
.
put
(
getPropertyValue
(
"statement.account"
),
account
);
}
String
elctrncSeqNb
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.LglSeqNb"
);
if
(
StringUtil
.
isEmpty
(
elctrncSeqNb
)
||
elctrncSeqNb
.
length
()
>
5
)
{
elctrncSeqNb
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.ElctrncSeqNb"
);
}
if
(
StringUtil
.
isNotEmpty
(
elctrncSeqNb
))
{
maps
.
put
(
getPropertyValue
(
"statement.sequence.number"
),
elctrncSeqNb
);
}
String
pageNumber
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.RptPgntn.PgNb"
);
if
(
StringUtil
.
isNotEmpty
(
pageNumber
)){
maps
.
put
(
getPropertyValue
(
"statement.page.number"
),
pageNumber
);
}
String
amount
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Acct.Ccy"
);
if
(
StringUtil
.
isNotEmpty
(
amount
)){
maps
.
put
(
getPropertyValue
(
"report.account.currency"
),
amount
+
"0"
);
}
String
dateStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.CreDtTm"
);
if
(
StringUtil
.
isEmpty
(
dateStr
)){
dateStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".GrpHdr.CreDtTm"
);
}
if
(
StringUtil
.
isEmpty
(
dateStr
)){
maps
.
put
(
getPropertyValue
(
"report.creDtTm"
),
dateStr
);
}
int
entryCount
=
XmlUtil
.
getChildrenCount
(
document
,
bodyParentElementName
+
".Rpt.Ntry"
,
null
);
if
(
entryCount
>
0
)
{
for
(
int
i
=
0
;
i
<
entryCount
;
i
++)
{
String
reversalIndicator
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Ntry("
+
i
+
").RvslInd"
);
String
creditDebitIndicator
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Ntry("
+
i
+
").CdtDbtInd"
);
if
(
StringUtil
.
isNotEmpty
(
reversalIndicator
)
&&
Boolean
.
valueOf
(
reversalIndicator
))
{
if
(
CdtDbtCode
.
DBIT
.
value
().
equals
(
creditDebitIndicator
))
{
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"statement.entry.crdr"
)+
"("
+(
i
+
1
)+
")"
,
getPropertyValue
(
"reversal.credit"
));
}
else
{
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"statement.entry.crdr"
)+
"("
+(
i
+
1
)+
")"
,
getPropertyValue
(
"reversal.debit"
));
}
}
else
{
if
(
CdtDbtCode
.
DBIT
.
value
().
equals
(
creditDebitIndicator
))
{
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"statement.entry.crdr"
)+
"("
+(
i
+
1
)+
")"
,
getPropertyValue
(
"debit"
));
}
else
{
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"statement.entry.crdr"
)+
"("
+(
i
+
1
)+
")"
,
getPropertyValue
(
"credit"
));
}
}
String
valueDateStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Ntry("
+
i
+
").ValDt.Dt"
);
if
(
StringUtil
.
isNotEmpty
(
valueDateStr
))
{
maps
.
put
(
getPropertyValue
(
"statement.entry.valueDate"
)+
"("
+(
i
+
1
)+
")"
,
valueDateStr
);
}
String
amt
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Ntry("
+
i
+
").Amt"
);
String
ccy
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Ntry("
+
i
+
").Amt@Ccy"
);
if
(
StringUtil
.
isNotEmpty
(
ccy
))
{
maps
.
put
(
getPropertyValue
(
"statement.entry.ccy"
)+
"("
+(
i
+
1
)+
")"
,
ccy
);
}
if
(
StringUtil
.
isNotEmpty
(
amt
))
{
maps
.
put
(
getPropertyValue
(
"statement.entry.amt"
)+
"("
+(
i
+
1
)+
")"
,
amt
);
}
String
endToEndId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.Ntry("
+
i
+
").NtryDtls.TxDtls.Refs.EndToEndId"
);
if
(
StringUtil
.
isNotEmpty
(
endToEndId
))
{
maps
.
put
(
getPropertyValue
(
"statement.entry.endToEndId"
)+
"("
+(
i
+
1
)+
")"
,
endToEndId
);
}
String
sumc
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.TxsSummry.TtlCdtNtries.Sum"
);
String
nbOfNtriesc
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.TxsSummry.TtlCdtNtries.NbOfNtries"
);
if
(
StringUtil
.
isNotEmpty
(
sumc
)&&
StringUtil
.
isNotEmpty
(
nbOfNtriesc
)){
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"report.transactionsSummary.totalCreditEntries.nbOfNtries"
),
nbOfNtriesc
);
maps
.
put
(
getPropertyValue
(
"report.transactionsSummary.totalCreditEntries.sum"
),
sumc
);
}
String
sumd
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.TxsSummry.TtlDbtNtries.Sum"
);
String
nbOfNtriesd
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Rpt.TxsSummry.TtlDbtNtries.NbOfNtries"
);
if
(
StringUtil
.
isNotEmpty
(
sumd
)&&
StringUtil
.
isNotEmpty
(
nbOfNtriesd
)){
maps
.
put
(
getPropertyValue
(
"report.transactionsSummary.totalDebitEntries.nbOfNtries"
),
nbOfNtriesd
);
maps
.
put
(
getPropertyValue
(
"report.transactionsSummary.totalDebitEntries.sum"
),
sumd
);
}
}
}
}
catch
(
DocumentException
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
}
return
maps
;
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt056/Mx2MapCamt056Creator.java
View file @
d88760d6
...
...
@@ -35,13 +35,13 @@ public class Mx2MapCamt056Creator extends AbstractMx2MapCreator {
maps
.
put
(
getPropertyValue
(
"app.header.bizSvc"
),
bizSvc
);
XMLGregorianCalendar
creDt
=
abstractMX
.
getAppHdr
().
creationDate
();
maps
.
put
(
getPropertyValue
(
"app.header.creDt"
),
creDt
.
toXMLFormat
());
String
cas
eId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Undrlyg.TxInf.Case.Id"
);
if
(
StringUtil
.
isNotEmpty
(
cas
eId
)){
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"message.id"
),
cas
eId
);
String
messag
eId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Undrlyg.TxInf.Case.Id"
);
if
(
StringUtil
.
isNotEmpty
(
messag
eId
)){
maps
.
put
(
Mx2MtConstants
.
NEW_LINE
+
getPropertyValue
(
"message.id"
),
messag
eId
);
}
String
i
d
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Undrlyg.TxInf.OrgnlInstrId"
);
if
(
StringUtil
.
isNotEmpty
(
i
d
)){
maps
.
put
(
getPropertyValue
(
"endToEnd.id"
),
i
d
);
String
endToEndI
d
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Undrlyg.TxInf.OrgnlInstrId"
);
if
(
StringUtil
.
isNotEmpty
(
endToEndI
d
)){
maps
.
put
(
getPropertyValue
(
"endToEnd.id"
),
endToEndI
d
);
}
String
nameId
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".Undrlyg.TxInf.OrgnlGrpInf.OrgnlMsgNmId"
);
String
dateStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
bodyParentElementName
+
".CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlCreDtTm"
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2map/camt057/Mx2MapCamt057Creator.java
View file @
d88760d6
This diff is collapsed.
Click to expand it.
swiftCore/src/main/resources/Messages_CN.properties
View file @
d88760d6
...
...
@@ -31,6 +31,24 @@ cancellationDetails.transactionInformationAndStatus.cancellationStatusReasonInfo
cancellationDetails.transactionInformationAndStatus.cancellationStatusReasonInformation.addtlInf
=
\u
4ea4
\u6613\u
64a4
\u9500\u
8bf7
\u
6c42
\u
54cd
\u
5e94
\u
8be6
\u
60c5
underlying.transactionInformation.cancellationReasonInformation.reason.cd
=
\u
4ea4
\u6613\u
64a4
\u9500\u
8bf7
\u
6c42
\u
4ee3
\u7801
underlying.transactionInformation.cancellationReasonInformation.addtlInf
=
\u
4ea4
\u6613\u
64a4
\u9500\u
8bf7
\u
6c42
\u
8be6
\u
60c5
report.account.currency
=
\u6700\u
4f4e
\u
91d1
\u
989d
\u
89c4
\u
5b9a
report.creDtTm
=
\u
65e5
\u
671f
report.transactionsSummary.totalCreditEntries.nbOfNtries
=
\u
501f
\u
8bb0
\u
7b14
\u6570
report.transactionsSummary.totalCreditEntries.sum
=
\u
501f
\u
8bb0
\u
603b
\u
91d1
\u
989d
report.transactionsSummary.totalDebitEntries.nbOfNtries
=
\u
8d37
\u
8bb0
\u
7b14
\u6570
report.transactionsSummary.totalDebitEntries.sum
=
\u
8d37
\u
8bb0
\u
603b
\u
91d1
\u
989d
notification.amount.ccy
=
\u
8d27
\u
5e01
notification.amount.amt
=
\u
91d1
\u
989d
remitter
=
\u
6c47
\u
6b3e
\u
4eba
instructingBank
=
\u6307\u
793a
\u
884c
intermediaryBank
=
\u
4e2d
\u
95f4
\u
884c
remitter.anyBIC
=
\u
6c47
\u
6b3e
\u
4eba
\u
91d1
\u
878d
\u
673a
\u6784
bic
\u
4ee3
\u7801
remitter.ctry
=
\u
6c47
\u
6b3e
\u
4eba
\u
56fd
\u
5bb6
remitter.nm
=
\u
6c47
\u
6b3e
\u
4eba
\u
540d
\u
79f0
account
=
\u
8d26
\u6237
remitter.adrLine
=
\u
6c47
\u
6b3e
\u
4eba
\u5730\u5740
remitter.cd
=
\u
6c47
\u
6b3e
\u
4eba
\u
6e05
\u
7b97
\u
884c
\u
7cfb
\u
7edf
\u
4ee3
\u7801
remitter.mmbId
=
\u
6c47
\u
6b3e
\u
4eba
\u
6e05
\u
7b97
\u
884c
\u
7cfb
\u
7edf
\u
8d26
\u
53f7
#
message.id
=
\u
4e1a
\u
52a1
\u
7f16
\u
53f7
endToEnd.id
=
\u
76f8
\u5173\u
4e1a
\u
52a1
\u
7f16
\u
53f7
...
...
swiftCore/src/main/resources/swiftXml/MXcamt05200108_942.xml
View file @
d88760d6
...
...
@@ -42,7 +42,7 @@ Change Log
<CreDtTm>
2020-12-15T11:00:00-07:00
</CreDtTm>
</GrpHdr>
<Rpt>
<Id>
//100-011111111111111111111111111
1
</Id>
<Id>
100-0
1
</Id>
<RptPgntn>
<PgNb>
1
</PgNb>
<LastPgInd>
true
</LastPgInd>
...
...
@@ -58,12 +58,12 @@ Change Log
</Acct>
<TxsSummry>
<TtlCdtNtries>
<NbOfNtries>
87
1111111
</NbOfNtries>
<
!--<Sum>385700</Sum>--
>
<NbOfNtries>
87
</NbOfNtries>
<
Sum>
385700
</Sum
>
</TtlCdtNtries>
<TtlDbtNtries>
<NbOfNtries>
9
111111111
</NbOfNtries>
<
!--<Sum>210000</Sum>--
>
<NbOfNtries>
9
</NbOfNtries>
<
Sum>
210000
</Sum
>
</TtlDbtNtries>
</TxsSummry>
<Ntry>
...
...
swiftCore/src/test/java/com/brilliance/mx2mtmap/mt192/Test.java
0 → 100644
View file @
d88760d6
package
com
.
brilliance
.
mx2mtmap
.
mt192
;
import
com.brilliance.swift.SwiftTransfer
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Map
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
xmlStr
=
FileUtils
.
readFileToString
(
new
File
(
System
.
getProperty
(
"user.dir"
)
+
"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05600108_292.xml"
));
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2Map
(
xmlStr
);
maps
.
forEach
((
k
,
v
)
->
System
.
out
.
println
(
k
+
":"
+
v
));
}
}
swiftCore/src/test/java/com/brilliance/mx2mtmap/mt196/Test.java
0 → 100644
View file @
d88760d6
package
com
.
brilliance
.
mx2mtmap
.
mt196
;
import
com.brilliance.swift.SwiftTransfer
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Map
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
xmlStr
=
FileUtils
.
readFileToString
(
new
File
(
System
.
getProperty
(
"user.dir"
)
+
"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt02900108_296.xml"
));
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2Map
(
xmlStr
);
maps
.
forEach
((
k
,
v
)
->
System
.
out
.
println
(
k
+
":"
+
v
));
}
}
swiftCore/src/test/java/com/brilliance/mx2mtmap/mt210/Test.java
0 → 100644
View file @
d88760d6
package
com
.
brilliance
.
mx2mtmap
.
mt210
;
import
com.brilliance.swift.SwiftTransfer
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Map
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
xmlStr
=
FileUtils
.
readFileToString
(
new
File
(
System
.
getProperty
(
"user.dir"
)
+
"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05700106.xml"
));
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2Map
(
xmlStr
);
maps
.
forEach
((
k
,
v
)
->
System
.
out
.
println
(
k
+
":"
+
v
));
}
}
swiftCore/src/test/java/com/brilliance/mx2mtmap/mt942/Test.java
0 → 100644
View file @
d88760d6
package
com
.
brilliance
.
mx2mtmap
.
mt942
;
import
com.brilliance.swift.SwiftTransfer
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Map
;
public
class
Test
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
xmlStr
=
FileUtils
.
readFileToString
(
new
File
(
System
.
getProperty
(
"user.dir"
)
+
"\\swiftCore\\src\\main\\resources\\swiftXml\\MXcamt05200108_942.xml"
));
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2Map
(
xmlStr
);
maps
.
forEach
((
k
,
v
)
->
System
.
out
.
println
(
k
+
":"
+
v
));
}
}
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