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
7f07038d
Commit
7f07038d
authored
May 05, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
900和910mx,mt和swift之间的转换基本完成
parent
2aac6a0f
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
864 additions
and
294 deletions
+864
-294
pom.xml
swiftCore/pom.xml
+1
-2
Camt053001Parse25aField.java
.../mt2SwiftDto/camt053001/impl/Camt053001Parse25aField.java
+6
-1
Camt053001Parse61Field.java
...t/mt2SwiftDto/camt053001/impl/Camt053001Parse61Field.java
+16
-2
Camt053001Parse86Field.java
...t/mt2SwiftDto/camt053001/impl/Camt053001Parse86Field.java
+5
-5
Camt054001Parse25aField.java
.../mt2SwiftDto/camt054001/impl/Camt054001Parse25aField.java
+6
-1
Camt054001Parse52aField.java
.../mt2SwiftDto/camt054001/impl/Camt054001Parse52aField.java
+31
-0
Field52aGenerate.java
...rilliance/swift/mx2mt/mt900910/impl/Field52aGenerate.java
+6
-17
Mx2SwiftDtoCreatorManager.java
...illiance/swift/mx2swiftdto/Mx2SwiftDtoCreatorManager.java
+3
-0
Mx2SwiftDtoBTCDCNCreator.java
...ift/mx2swiftdto/bankcdbcdnf/Mx2SwiftDtoBTCDCNCreator.java
+251
-0
SwiftDto2MtContextIdentifier.java
...iance/swift/swiftdto2mt/SwiftDto2MtContextIdentifier.java
+0
-16
SwiftDto2Mt900910Creator.java
.../swift/swiftdto2mt/mt900910/SwiftDto2Mt900910Creator.java
+3
-3
Tag25aGenerate.java
...iance/swift/swiftdto2mt/mt900910/impl/Tag25aGenerate.java
+3
-1
SwiftDto2Mt940950Creator.java
.../swift/swiftdto2mt/mt940950/SwiftDto2Mt940950Creator.java
+3
-3
Tag60aGenerate.java
...iance/swift/swiftdto2mt/mt940950/impl/Tag60aGenerate.java
+5
-2
Tag61Generate.java
...liance/swift/swiftdto2mt/mt940950/impl/Tag61Generate.java
+1
-1
Tag62aGenerate.java
...iance/swift/swiftdto2mt/mt940950/impl/Tag62aGenerate.java
+2
-1
Tag64Generate.java
...liance/swift/swiftdto2mt/mt940950/impl/Tag64Generate.java
+2
-2
Tag65Generate.java
...liance/swift/swiftdto2mt/mt940950/impl/Tag65Generate.java
+2
-3
Tag86Generate.java
...liance/swift/swiftdto2mt/mt940950/impl/Tag86Generate.java
+2
-8
SwiftDto2MxCreatorManager.java
...illiance/swift/swiftdto2mx/SwiftDto2MxCreatorManager.java
+3
-0
SwiftDto2MxCamt054001Creator.java
...ftdto2mx/camt054001/v08/SwiftDto2MxCamt054001Creator.java
+69
-49
BankToCustomerCreditNotification.json
...resources/swiftJson/BankToCustomerCreditNotification.json
+17
-9
BankToCustomerDebitNotification.json
.../resources/swiftJson/BankToCustomerDebitNotification.json
+11
-5
BankToCustomerStatement.json
...src/main/resources/swiftJson/BankToCustomerStatement.json
+2
-5
MT900.txt
swiftCore/src/main/resources/swiftTxt/MT900.txt
+5
-1
MT910.txt
swiftCore/src/main/resources/swiftTxt/MT910.txt
+10
-5
MxCamt05400102_CREDIT.xml
...ore/src/main/resources/swiftXml/MxCamt05400102_CREDIT.xml
+147
-148
MxCamt05400108_CREDIT.xml
...ore/src/main/resources/swiftXml/MxCamt05400108_CREDIT.xml
+107
-0
MxCamt05400108_DEBIT.xml
...Core/src/main/resources/swiftXml/MxCamt05400108_DEBIT.xml
+76
-0
Test900Camt054001.java
.../brilliance/mt2swiftdto/camt054001/Test900Camt054001.java
+1
-1
Test910Camt054001.java
.../brilliance/mt2swiftdto/camt054001/Test910Camt054001.java
+1
-1
Test900.java
.../java/com/brilliance/mx2swiftdto/bankcdbcdnf/Test900.java
+14
-0
Test910.java
.../java/com/brilliance/mx2swiftdto/bankcdbcdnf/Test910.java
+14
-0
Test.java
.../src/test/java/com/brilliance/swiftdto2mt/mt900/Test.java
+1
-1
Test.java
.../src/test/java/com/brilliance/swiftdto2mt/mt910/Test.java
+1
-1
Text900camt054001.java
.../brilliance/swiftdto2mx/camt054001/Text900camt054001.java
+20
-0
Text910camt054001.java
.../brilliance/swiftdto2mx/camt054001/Text910camt054001.java
+17
-0
No files found.
swiftCore/pom.xml
View file @
7f07038d
...
...
@@ -24,4 +24,4 @@
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
swiftCore/src/main/java/com/brilliance/swift/mt2SwiftDto/camt053001/impl/Camt053001Parse25aField.java
View file @
7f07038d
...
...
@@ -2,6 +2,7 @@ package com.brilliance.swift.mt2SwiftDto.camt053001.impl;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mt2SwiftDto.AbstractMt2SwiftDtoParseFields
;
import
com.brilliance.swift.util.SwiftTransferUtil
;
import
com.brilliance.swift.vo.BankToCustomerStatement
;
import
com.brilliance.swift.vo.common.PartyAccount
;
import
com.prowidesoftware.swift.model.field.Field25
;
...
...
@@ -23,7 +24,11 @@ public class Camt053001Parse25aField extends AbstractMt2SwiftDtoParseFields {
Field25
field25
=
mt940
.
getField25
();
if
(
field25
!=
null
){
PartyAccount
account
=
new
PartyAccount
();
account
.
setAccount
(
field25
.
getValue
());
if
(
SwiftTransferUtil
.
checkIbanAccount
(
field25
.
getValue
()))
{
account
.
setIbanAcct
(
field25
.
getValue
());
}
else
{
account
.
setAccount
(
field25
.
getValue
());
}
bankToCustomerStatement
.
setAccount
(
account
);
}
}
else
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2SwiftDto/camt053001/impl/Camt053001Parse61Field.java
View file @
7f07038d
...
...
@@ -5,12 +5,14 @@ import com.brilliance.swift.mt2SwiftDto.AbstractMt2SwiftDtoParseFields;
import
com.brilliance.swift.util.DateUtil
;
import
com.brilliance.swift.vo.BankToCustomerStatement
;
import
com.brilliance.swift.vo.common.statementBreakdown
;
import
com.prowidesoftware.swift.model.Tag
;
import
com.prowidesoftware.swift.model.field.Field61
;
import
com.prowidesoftware.swift.model.field.Field86
;
import
com.prowidesoftware.swift.model.mt.AbstractMT
;
import
com.prowidesoftware.swift.model.mt9xx.MT940
;
import
com.prowidesoftware.swift.model.mt9xx.MT950
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -25,7 +27,17 @@ public class Camt053001Parse61Field extends AbstractMt2SwiftDtoParseFields {
if
(
context
.
get
(
AbstractMT
.
class
).
getMessageType
().
equals
(
"940"
)){
MT940
mt940
=
(
MT940
)
context
.
get
(
AbstractMT
.
class
);
List
<
Field61
>
field61List
=
mt940
.
getField61
();
List
<
Field86
>
field86List
=
mt940
.
getField86
();
List
<
String
>
Message86List
=
new
ArrayList
<>();
List
<
Tag
>
tags
=
mt940
.
getSwiftMessage
().
getBlock4
().
getTags
();
for
(
int
i
=
0
;
i
<
tags
.
size
();
i
++)
{
if
(
tags
.
get
(
i
).
getName
().
equals
(
"61"
)){
if
(
tags
.
get
(
i
+
1
).
getName
().
equals
(
"86"
)){
Message86List
.
add
(
tags
.
get
(
i
+
1
).
getValue
());
}
else
{
Message86List
.
add
(
"no"
);
}
}
}
if
(
field61List
.
size
()>
0
)
{
for
(
int
i
=
0
;
i
<
field61List
.
size
();
i
++)
{
statementBreakdown
statementBreakdown
=
new
statementBreakdown
();
...
...
@@ -46,7 +58,9 @@ public class Camt053001Parse61Field extends AbstractMt2SwiftDtoParseFields {
statementBreakdown
.
setEndToEndId
(
field61List
.
get
(
i
).
getReferenceForTheAccountOwner
());
statementBreakdown
.
setAcctSvcrRef
(
field61List
.
get
(
i
).
getReferenceOfTheAccountServicingInstitution
());
statementBreakdown
.
setAddtlTxInf
(
field61List
.
get
(
i
).
getSupplementaryDetails
());
statementBreakdown
.
setAddtlNtryInf
(
field86List
.
get
(
i
).
getValue
());
if
(!
Message86List
.
get
(
i
).
equals
(
"no"
)){
statementBreakdown
.
setAddtlNtryInf
(
Message86List
.
get
(
i
));
}
bankToCustomerStatement
.
addNtryDto
(
statementBreakdown
);
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2SwiftDto/camt053001/impl/Camt053001Parse86Field.java
View file @
7f07038d
...
...
@@ -3,10 +3,12 @@ package com.brilliance.swift.mt2SwiftDto.camt053001.impl;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mt2SwiftDto.AbstractMt2SwiftDtoParseFields
;
import
com.brilliance.swift.vo.BankToCustomerStatement
;
import
com.prowidesoftware.swift.model.Tag
;
import
com.prowidesoftware.swift.model.field.Field86
;
import
com.prowidesoftware.swift.model.mt.AbstractMT
;
import
com.prowidesoftware.swift.model.mt9xx.MT940
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -20,11 +22,9 @@ public class Camt053001Parse86Field extends AbstractMt2SwiftDtoParseFields {
BankToCustomerStatement
bankToCustomerStatement
=
context
.
get
(
BankToCustomerStatement
.
class
);
if
(
context
.
get
(
AbstractMT
.
class
).
getMessageType
().
equals
(
"940"
)){
MT940
mt940
=
(
MT940
)
context
.
get
(
AbstractMT
.
class
);
List
<
Field86
>
field86List
=
mt940
.
getField86
();
if
(
field86List
.
size
()>
0
)
{
for
(
int
i
=
0
;
i
<
field86List
.
size
();
i
++)
{
bankToCustomerStatement
.
addAddtlStmtInf
(
field86List
.
get
(
i
).
getNarrative
());
}
List
<
Tag
>
tags
=
mt940
.
getSwiftMessage
().
getBlock4
().
getTags
();
if
(
tags
.
get
(
tags
.
size
()-
1
).
getName
().
equals
(
"86"
)){
bankToCustomerStatement
.
addAddtlStmtInf
(
tags
.
get
(
tags
.
size
()-
1
).
getValue
());
}
}
}
catch
(
Exception
e
)
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2SwiftDto/camt054001/impl/Camt054001Parse25aField.java
View file @
7f07038d
...
...
@@ -2,6 +2,7 @@ package com.brilliance.swift.mt2SwiftDto.camt054001.impl;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mt2SwiftDto.AbstractMt2SwiftDtoParseFields
;
import
com.brilliance.swift.util.SwiftTransferUtil
;
import
com.brilliance.swift.vo.BankToCustomerDebitCreditNotification
;
import
com.brilliance.swift.vo.common.PartyAccount
;
import
com.prowidesoftware.swift.model.field.Field25
;
...
...
@@ -23,7 +24,11 @@ public class Camt054001Parse25aField extends AbstractMt2SwiftDtoParseFields {
Field25
field25
=
mt900
.
getField25
();
if
(
field25
!=
null
){
PartyAccount
account
=
new
PartyAccount
();
account
.
setAccount
(
field25
.
getValue
());
if
(
SwiftTransferUtil
.
checkIbanAccount
(
field25
.
getValue
()))
{
account
.
setIbanAcct
(
field25
.
getValue
());
}
else
{
account
.
setAccount
(
field25
.
getValue
());
}
bankToCustomerDebitCreditNotification
.
setAccount
(
account
);
}
}
else
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2SwiftDto/camt054001/impl/Camt054001Parse52aField.java
View file @
7f07038d
...
...
@@ -9,6 +9,7 @@ import com.prowidesoftware.swift.model.field.Field52A;
import
com.prowidesoftware.swift.model.field.Field52D
;
import
com.prowidesoftware.swift.model.mt.AbstractMT
;
import
com.prowidesoftware.swift.model.mt9xx.MT900
;
import
com.prowidesoftware.swift.model.mt9xx.MT910
;
/**
* @author zh
...
...
@@ -49,6 +50,36 @@ public class Camt054001Parse52aField extends AbstractMt2SwiftDtoParseFields {
if
(
partyDto
!=
null
)
{
bankToCustomerDebitCreditNotification
.
setDebitAgtParty
(
partyDto
);
}
}
else
if
((
context
.
get
(
AbstractMT
.
class
).
getMessageType
().
equals
(
"910"
))){
MT910
mt910
=
(
MT910
)
context
.
get
(
AbstractMT
.
class
);
PartyDto
partyDto
=
null
;
if
(
mt910
.
getField52A
()!=
null
){
Field52A
field52A
=
mt910
.
getField52A
();
partyDto
=
new
PartyDto
();
if
(
StringUtil
.
isNotEmpty
(
field52A
.
getAccount
()))
{
partyDto
=
buildPartyAccount
(
partyDto
,
field52A
.
getLine
(
1
));
}
partyDto
.
setPartyBic
(
field52A
.
getBIC
());
}
else
if
(
mt910
.
getField52D
()
!=
null
)
{
Field52D
field52D
=
mt910
.
getField52D
();
partyDto
=
new
PartyDto
();
if
(
StringUtil
.
isNotEmpty
(
field52D
.
getAccount
()))
{
partyDto
=
buildPartyAccount
(
partyDto
,
field52D
.
getLine
(
1
));
}
partyDto
.
setPartyName
(
field52D
.
getNameAndAddressLine1
());
if
(
StringUtil
.
isNotEmpty
(
field52D
.
getNameAndAddressLine2
()))
{
partyDto
.
addAddress
(
field52D
.
getNameAndAddressLine2
());
}
if
(
StringUtil
.
isNotEmpty
(
field52D
.
getNameAndAddressLine3
()))
{
partyDto
.
addAddress
(
field52D
.
getNameAndAddressLine3
());
}
if
(
StringUtil
.
isNotEmpty
(
field52D
.
getNameAndAddressLine4
()))
{
partyDto
.
addAddress
(
field52D
.
getNameAndAddressLine4
());
}
}
if
(
partyDto
!=
null
)
{
bankToCustomerDebitCreditNotification
.
setDebitAgtParty
(
partyDto
);
}
}
}
catch
(
Exception
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt900910/impl/Field52aGenerate.java
View file @
7f07038d
...
...
@@ -7,7 +7,7 @@ import com.brilliance.swift.util.StringUtil;
import
org.dom4j.Document
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><Id><OrgId><AnyBIC>
public
class
Field52aGenerate
extends
AbstractMx2MtFieldsGenerate
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Field52aGenerate
.
class
);
...
...
@@ -18,30 +18,19 @@ public class Field52aGenerate extends AbstractMx2MtFieldsGenerate {
Document
document
=
(
Document
)
map
.
get
(
Mx2MtConstants
.
MX_XML_DOCUMENT
);
String
field52aOption
=
""
;
String
field52a
=
""
;
String
bicCode
=
getBicCode
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.DbtrAgt.FinInstnId"
);
String
memberId
=
getXmlNodeValue
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.DbtrAgt.FinInstnId.ClrSysMmbId.MmbId"
);
String
name
=
getXmlNodeValue
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.DbtrAgt.FinInstnId.Nm"
);
memberId
=
"/"
+
memberId
;
if
(
memberId
.
length
()>
35
)
memberId
=
memberId
.
substring
(
0
,
35
);
String
bicCode
=
getBicCode
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.Id.OrgId.AnyBIC"
);
String
name
=
getBicCode
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.Nm"
);
if
(
StringUtil
.
isNotEmpty
(
bicCode
))
{
field52aOption
=
"A"
;
if
(
StringUtil
.
isNotEmpty
(
memberId
))
{
field52a
=
memberId
+
Mx2MtConstants
.
NEW_LINE
+
bicCode
;
}
else
{
field52a
=
bicCode
;
}
field52a
=
bicCode
;
}
else
if
(
StringUtil
.
isNotEmpty
(
name
)){
field52aOption
=
"D"
;
if
(
StringUtil
.
isNotEmpty
(
memberId
))
{
field52a
=
memberId
+
Mx2MtConstants
.
NEW_LINE
+
name
;
}
int
adrLineCount
=
getXmlNodeCounts
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.DbtrAgt.FinInstnId.PstlAdr.AdrLine"
);
int
adrLineCount
=
getXmlNodeCounts
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.PstlAdr.AdrLine"
);
if
(
adrLineCount
>
0
){
for
(
int
i
=
0
;
i
<
adrLineCount
;
i
++)
{
if
(
i
==
3
)
{
break
;
}
String
adrLine
=
getXmlNodeValue
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.Rltd
Agts.DbtrAgt.FinInstnId
.PstlAdr.AdrLine("
+
i
+
")"
);
String
adrLine
=
getXmlNodeValue
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.Rltd
Pties.Dbtr.Pty
.PstlAdr.AdrLine("
+
i
+
")"
);
if
(
adrLine
.
length
()
>
35
)
adrLine
=
adrLine
.
substring
(
0
,
35
);
field52a
+=
Mx2MtConstants
.
NEW_LINE
+
adrLine
;
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2swiftdto/Mx2SwiftDtoCreatorManager.java
View file @
7f07038d
package
com
.
brilliance
.
swift
.
mx2swiftdto
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2swiftdto.bankcdbcdnf.Mx2SwiftDtoBTCDCNCreator
;
import
com.brilliance.swift.mx2swiftdto.custcdttsf.Mx2SwiftDtoCCTCreator
;
import
com.brilliance.swift.mx2swiftdto.fininstcdttsf.Mx2SwiftDtoFICTCreator
;
import
com.brilliance.swift.vo.SwiftDto
;
...
...
@@ -58,6 +59,8 @@ public class Mx2SwiftDtoCreatorManager {
return
new
Mx2SwiftDtoCCTCreator
();
}
else
if
(
"pacs009001"
.
equals
(
msgType
)){
return
new
Mx2SwiftDtoFICTCreator
();
}
else
if
(
"camt054001"
.
equals
(
msgType
)){
return
new
Mx2SwiftDtoBTCDCNCreator
();
}
else
{
throw
new
SwiftException
(
"Invalid message type"
);
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2swiftdto/bankcdbcdnf/Mx2SwiftDtoBTCDCNCreator.java
0 → 100644
View file @
7f07038d
package
com
.
brilliance
.
swift
.
mx2swiftdto
.
bankcdbcdnf
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mx2swiftdto.AbstractMx2SwiftDtoCreator
;
import
com.brilliance.swift.mx2swiftdto.Mx2SwiftDtoContextIdentifier
;
import
com.brilliance.swift.util.DateUtil
;
import
com.brilliance.swift.util.StringUtil
;
import
com.brilliance.swift.util.XmlUtil
;
import
com.brilliance.swift.vo.BankToCustomerDebitCreditNotification
;
import
com.brilliance.swift.vo.common.*
;
import
org.dom4j.Document
;
import
javax.xml.datatype.DatatypeConfigurationException
;
import
javax.xml.datatype.DatatypeFactory
;
import
javax.xml.datatype.XMLGregorianCalendar
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.Map
;
public
class
Mx2SwiftDtoBTCDCNCreator
extends
AbstractMx2SwiftDtoCreator
{
private
BankToCustomerDebitCreditNotification
bankToCustomerDebitCreditNotification
=
null
;
private
String
defaultFormate
=
"yyyy-MM-dd HH:mm:ss,SSS"
;
@Override
public
void
preProcess
()
throws
SwiftException
{
document
=
(
Document
)
context
.
get
(
Mx2SwiftDtoContextIdentifier
.
MX_XMl_DOCUMENT
,
true
);
Map
<
String
,
String
>
parentElementMaps
=
XmlUtil
.
getParentElementMaps
(
document
);
appHdrParentElementName
=
parentElementMaps
.
get
(
"AppHdr"
);
grpHdrParentElementName
=
parentElementMaps
.
get
(
"GrpHdr"
);
bodyHdrParentElementName
=
parentElementMaps
.
get
(
"Ntfctn"
);
bankToCustomerDebitCreditNotification
=
new
BankToCustomerDebitCreditNotification
();
bankToCustomerDebitCreditNotification
.
setMessageType
(
"camt.054.001"
);
}
@Override
public
void
appHeader
()
throws
SwiftException
{
try
{
String
sendBicCode
=
getBicCode
(
appHdrParentElementName
,
document
,
"AppHdr.Fr.FIId.FinInstnId"
);
String
receiverBicCode
=
getBicCode
(
appHdrParentElementName
,
document
,
"AppHdr.To.FIId.FinInstnId"
);
String
createDateStr
=
getXmlNodeValue
(
appHdrParentElementName
,
document
,
"AppHdr.CreDt"
);
if
(
StringUtil
.
isNotEmpty
(
createDateStr
))
{
XMLGregorianCalendar
createDt
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
createDateStr
);
Date
createDate
=
DateUtil
.
formatAndParseDate
(
createDt
.
toGregorianCalendar
().
getTime
(),
defaultFormate
);
bankToCustomerDebitCreditNotification
.
setCreateDate
(
createDate
);
}
String
messageId
=
getXmlNodeValue
(
appHdrParentElementName
,
document
,
"AppHdr.BizMsgIdr"
);
String
priority
=
getXmlNodeValue
(
appHdrParentElementName
,
document
,
"AppHdr.Prty"
);
if
(
StringUtil
.
isNotEmpty
(
priority
))
{
bankToCustomerDebitCreditNotification
.
setMessagePriority
(
MessagePriority
.
fromValue
(
priority
));
}
bankToCustomerDebitCreditNotification
.
setMessageId
(
messageId
);
bankToCustomerDebitCreditNotification
.
setSenderBic
(
sendBicCode
);
bankToCustomerDebitCreditNotification
.
setReceiverBic
(
receiverBicCode
);
}
catch
(
DatatypeConfigurationException
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
}
catch
(
ParseException
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
}
}
@Override
public
void
groupHeader
()
throws
SwiftException
{
}
@Override
public
void
messageBody
()
throws
SwiftException
{
try
{
//UETR
String
uetr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.Refs.UETR"
);
if
(
StringUtil
.
isNotEmpty
(
uetr
))
{
bankToCustomerDebitCreditNotification
.
setUetr
(
uetr
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><Refs><EndToEndId>
String
endToEndId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.Refs.EndToEndId"
);
bankToCustomerDebitCreditNotification
.
setEndToEndId
(
endToEndId
);
//<Ntfctn><Acct><Id><IBAN>
//<Ntfctn><Acct><Id><<Othr><Id>
String
iban
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Acct.Id.IBAN"
);
String
id
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Acct.Id.Othr.Id"
);
PartyAccount
partyAccount
=
new
PartyAccount
();
if
(
StringUtil
.
isNotEmpty
(
iban
)){
partyAccount
.
setIbanAcct
(
iban
);
}
else
{
partyAccount
.
setAccount
(
id
);
}
bankToCustomerDebitCreditNotification
.
setAccount
(
partyAccount
);
//<Ntfctn><Ntry><ValDt><Dt>
//<Ntfctn><Ntry><Amt Ccy="XXX">
String
dateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.ValDt.Dt"
);
String
amtStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.Amt"
);
String
ccyStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.Amt@Ccy"
);
if
(
StringUtil
.
isNotEmpty
(
dateStr
))
{
XMLGregorianCalendar
dt
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
dateStr
);
Date
date
=
DateUtil
.
formatAndParseDate
(
dt
.
toGregorianCalendar
().
getTime
(),
defaultFormate
);
bankToCustomerDebitCreditNotification
.
setValueDate
(
date
);
}
if
(
StringUtil
.
isNotEmpty
(
amtStr
)&&
StringUtil
.
isNotEmpty
(
ccyStr
))
{
CcyFormatAmount
ccyFormatAmount
=
new
CcyFormatAmount
();
ccyFormatAmount
.
setCcy
(
ccyStr
);
ccyFormatAmount
.
setAmt
(
new
BigDecimal
(
amtStr
));
bankToCustomerDebitCreditNotification
.
setValueAmount
(
ccyFormatAmount
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><Id><OrgId><AnyBIC>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><DbtrAcct><Id><IBAN>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><DbtrAcct><Id><Othr><Id>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><Nm>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><PstlAdr><AdrLine>
String
anyBic
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.Id.OrgId.AnyBIC"
);
String
name
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.Nm"
);
String
iban2
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.DbtrAcct.Id.IBAN"
);
String
id2
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.DbtrAcct.Id.Othr.Id"
);
PartyDto
partyDto1
=
new
PartyDto
();
if
(
anyBic
!=
null
){
partyDto1
.
setPartyBic
(
anyBic
);
if
(
id2
!=
null
||
iban
!=
null
){
PartyAccount
partyAccount1
=
new
PartyAccount
();
partyAccount1
.
setAccount
(
id2
);
partyAccount1
.
setIbanAcct
(
iban2
);
partyDto1
.
setPartyAcct
(
partyAccount1
);
}
bankToCustomerDebitCreditNotification
.
setDebitParty
(
partyDto1
);
}
else
if
(
name
!=
null
){
partyDto1
.
setPartyName
(
name
);
int
adrLineCount
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.PstlAdr.AdrLine"
);
if
(
adrLineCount
>
0
){
for
(
int
i
=
0
;
i
<
adrLineCount
;
i
++)
{
if
(
i
==
3
)
{
break
;
}
String
adrLine
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Pty.PstlAdr.AdrLine("
+
i
+
")"
);
if
(
adrLine
.
length
()
>
35
)
adrLine
=
adrLine
.
substring
(
0
,
35
);
partyDto1
.
addAddress
(
adrLine
);
}
}
if
(
id2
!=
null
||
iban
!=
null
){
PartyAccount
partyAccount1
=
new
PartyAccount
();
partyAccount1
.
setAccount
(
id2
);
partyAccount1
.
setIbanAcct
(
iban2
);
partyDto1
.
setPartyAcct
(
partyAccount1
);
}
bankToCustomerDebitCreditNotification
.
setDebitParty
(
partyDto1
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><Id><OrgId><AnyBIC>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><Nm>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Pty><PstlAdr><AdrLine>
String
bicfi2
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls("
+
1
+
").RltdAgts.DbtrAgt.FinInstnId.BICFI"
);
String
name2
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls("
+
1
+
").RltdAgts.DbtrAgt.FinInstnId.Nm"
);
String
mmbId2
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls("
+
1
+
").RltdAgts.DbtrAgt.FinInstnId.ClrSysMmbId.MmbId"
);
String
cd2
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls("
+
1
+
").RltdAgts.DbtrAgt.FinInstnId.ClrSysMmbId.ClrSysId.Cd"
);
PartyDto
partyDto
=
new
PartyDto
();
if
(
bicfi2
!=
null
){
partyDto
.
setPartyBic
(
bicfi2
);
if
(
mmbId2
!=
null
){
ClearingSystemMember
clrSysMmb2
=
new
ClearingSystemMember
();
clrSysMmb2
.
setId
(
mmbId2
);
clrSysMmb2
.
setCode
(
cd2
);
partyDto
.
setClrSysMmb
(
clrSysMmb2
);
}
bankToCustomerDebitCreditNotification
.
setDebitAgtParty
(
partyDto
);
}
else
if
(
name2
!=
null
){
partyDto
.
setPartyName
(
name2
);
int
adrLineCount
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls("
+
1
+
").RltdAgts.DbtrAgt.FinInstnId.PstlAdr.AdrLine"
);
if
(
adrLineCount
>
0
){
for
(
int
i
=
0
;
i
<
adrLineCount
;
i
++)
{
if
(
i
==
3
)
{
break
;
}
String
adrLine
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls("
+
1
+
").RltdAgts.DbtrAgt.FinInstnId.PstlAdr.AdrLine("
+
i
+
")"
);
if
(
adrLine
.
length
()
>
35
)
adrLine
=
adrLine
.
substring
(
0
,
35
);
partyDto
.
addAddress
(
adrLine
);
}
}
if
(
mmbId2
!=
null
){
ClearingSystemMember
clrSysMmb2
=
new
ClearingSystemMember
();
clrSysMmb2
.
setId
(
mmbId2
);
clrSysMmb2
.
setCode
(
cd2
);
partyDto
.
setClrSysMmb
(
clrSysMmb2
);
}
bankToCustomerDebitCreditNotification
.
setDebitAgtParty
(
partyDto
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><BICFI>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><ClrSysMmbId><ClrSysId><Cd>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><ClrSysMmbId><ClrSysId><Prtry>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><ClrSysMmbId><MmbId>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><Nm>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><PstlAdr><AdrLine>[1],<AdrLine>[2],<AdrLine>[3]
String
bicfi
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.IntrmyAgt1.FinInstnId.BICFI"
);
String
name3
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.IntrmyAgt1.FinInstnId.Nm"
);
String
mmbId
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.IntrmyAgt1.FinInstnId.ClrSysMmbId.MmbId"
);
String
cd3
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.IntrmyAgt1.FinInstnId.ClrSysMmbId.ClrSysId.Cd"
);
PartyDto
partyDto2
=
new
PartyDto
();
if
(
bicfi
!=
null
){
partyDto2
.
setPartyBic
(
bicfi
);
if
(
mmbId
!=
null
){
ClearingSystemMember
clrSysMmb
=
new
ClearingSystemMember
();
clrSysMmb
.
setId
(
mmbId
);
clrSysMmb
.
setCode
(
cd3
);
partyDto2
.
setClrSysMmb
(
clrSysMmb
);
}
bankToCustomerDebitCreditNotification
.
setIntrmyAgtParty
(
partyDto2
);
}
else
if
(
name3
!=
null
){
partyDto2
.
setPartyName
(
name3
);
int
adrLineCount
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.IntrmyAgt1.FinInstnId.PstlAdr.AdrLine"
);
if
(
adrLineCount
>
0
){
for
(
int
i
=
0
;
i
<
adrLineCount
;
i
++)
{
if
(
i
==
3
)
{
break
;
}
String
adrLine
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdAgts.IntrmyAgt1.FinInstnId.PstlAdr.AdrLine("
+
i
+
")"
);
if
(
adrLine
.
length
()
>
35
)
adrLine
=
adrLine
.
substring
(
0
,
35
);
partyDto2
.
addAddress
(
adrLine
);
}
}
if
(
mmbId
!=
null
){
ClearingSystemMember
clrSysMmb
=
new
ClearingSystemMember
();
clrSysMmb
.
setId
(
mmbId
);
clrSysMmb
.
setCode
(
cd3
);
partyDto2
.
setClrSysMmb
(
clrSysMmb
);
}
bankToCustomerDebitCreditNotification
.
setIntrmyAgtParty
(
partyDto2
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><AddtlTxInf>
String
addtlTxInf
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.AddtlTxInf"
);
bankToCustomerDebitCreditNotification
.
setAddtlTxInf
(
addtlTxInf
);
String
cdtDbtInd
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.CdtDbtInd"
);
bankToCustomerDebitCreditNotification
.
setCdtDbtCode
(
cdtDbtInd
);
}
catch
(
Exception
e
){
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
}
}
@Override
public
void
postProcess
()
throws
SwiftException
{
try
{
context
.
set
(
Mx2SwiftDtoContextIdentifier
.
MX_TO_SWIFTDTO_OBJ
,
bankToCustomerDebitCreditNotification
);
String
outputFilePath
=
(
String
)
context
.
get
(
Mx2SwiftDtoContextIdentifier
.
MX_TO_SWIFTDTO_OUTPUT_FILE_PATH
,
true
);
if
(
StringUtil
.
isNotEmpty
(
outputFilePath
))
{
bankToCustomerDebitCreditNotification
.
write
(
new
File
(
outputFilePath
));
}
}
catch
(
Exception
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/SwiftDto2MtContextIdentifier.java
View file @
7f07038d
...
...
@@ -10,22 +10,6 @@ public class SwiftDto2MtContextIdentifier {
public
static
final
String
MT_IO_TYPE
=
"mt.io.type"
;
public
static
final
String
MT_TYPE_900
=
"900"
;
public
static
final
String
MT_TYPE_910
=
"910"
;
public
static
final
String
MT_TYPE_940
=
"940"
;
public
static
final
String
MT_TYPE_950
=
"950"
;
public
static
final
String
DRCRMARK_C
=
"C"
;
public
static
final
String
DRCRMARK_D
=
"D"
;
public
static
final
String
DRCRMARK_RC
=
"RC"
;
public
static
final
String
DRCRMARK_RD
=
"RD"
;
public
static
final
String
CD_60F
=
"PRCD"
;
public
static
final
String
CD_60M
=
"ITBD"
;
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt900910/SwiftDto2Mt900910Creator.java
View file @
7f07038d
...
...
@@ -9,8 +9,8 @@ import com.brilliance.swift.vo.BankToCustomerDebitCreditNotification;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.
MT_TYPE_900
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.
MT_TYPE_910
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
MT_TYPE_900
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
MT_TYPE_910
;
public
class
SwiftDto2Mt900910Creator
extends
AbstractSwiftDto2MtCreator
{
@Override
...
...
@@ -31,7 +31,7 @@ public class SwiftDto2Mt900910Creator extends AbstractSwiftDto2MtCreator {
@Override
protected
String
getMtType
()
{
BankToCustomerDebitCreditNotification
bankToCustomerDebitCreditNotification
=
(
BankToCustomerDebitCreditNotification
)
context
.
get
(
SwiftDto2MtContextIdentifier
.
SWIFT_DTO_OBJ
,
true
);
if
(
bankToCustomerDebitCreditNotification
.
getCdtDbtCode
().
equals
(
"DBIT"
)){
if
(
"DBIT"
.
equals
(
bankToCustomerDebitCreditNotification
.
getCdtDbtCode
()
)){
return
MT_TYPE_900
;
}
else
{
return
MT_TYPE_910
;
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt900910/impl/Tag25aGenerate.java
View file @
7f07038d
...
...
@@ -20,8 +20,10 @@ public class Tag25aGenerate extends AbstractSwiftDto2MtTagGenerate {
BankToCustomerDebitCreditNotification
bankToCustomerDebitCreditNotification
=
(
BankToCustomerDebitCreditNotification
)
context
.
get
(
SwiftDto2MtContextIdentifier
.
SWIFT_DTO_OBJ
,
true
);
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
if
(
bankToCustomerDebitCreditNotification
.
getAccount
()!=
null
){
if
(
bankToCustomerDebitCreditNotification
.
getAccount
()
.
getAccount
()
!=
null
){
tags
.
add
(
new
Tag
(
name
,
bankToCustomerDebitCreditNotification
.
getAccount
().
getAccount
()));
}
else
if
(
bankToCustomerDebitCreditNotification
.
getAccount
().
getIbanAcct
()!=
null
){
tags
.
add
(
new
Tag
(
name
,
bankToCustomerDebitCreditNotification
.
getAccount
().
getIbanAcct
()));
}
}
catch
(
Exception
e
){
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/SwiftDto2Mt940950Creator.java
View file @
7f07038d
...
...
@@ -9,8 +9,8 @@ import com.brilliance.swift.vo.BankToCustomerStatement;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.
MT_TYPE_940
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.
MT_TYPE_950
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
MT_TYPE_940
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
MT_TYPE_950
;
public
class
SwiftDto2Mt940950Creator
extends
AbstractSwiftDto2MtCreator
{
@Override
...
...
@@ -32,7 +32,7 @@ public class SwiftDto2Mt940950Creator extends AbstractSwiftDto2MtCreator {
@Override
protected
String
getMtType
()
{
BankToCustomerStatement
bankToCustomerStatement
=
(
BankToCustomerStatement
)
context
.
get
(
SwiftDto2MtContextIdentifier
.
SWIFT_DTO_OBJ
,
true
);
if
(
bankToCustomerStatement
.
getCd
().
equals
(
"FWAV"
)||
bankToCustomerStatement
.
getAddtlStmtInf
()!=
null
){
if
(
"FWAV"
.
equals
(
bankToCustomerStatement
.
getCd
()
)||
bankToCustomerStatement
.
getAddtlStmtInf
()!=
null
){
return
MT_TYPE_940
;
}
else
{
return
MT_TYPE_950
;
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/impl/Tag60aGenerate.java
View file @
7f07038d
package
com
.
brilliance
.
swift
.
swiftdto2mt
.
mt940950
.
impl
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.swiftdto2mt.AbstractSwiftDto2MtTagGenerate
;
import
com.brilliance.swift.swiftdto2mt.SwiftDto2MtContextIdentifier
;
...
...
@@ -14,8 +15,10 @@ import java.math.BigDecimal;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.*;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_C
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_D
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.
CD_60F
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.
CD_60M
;
public
class
Tag60aGenerate
extends
AbstractSwiftDto2MtTagGenerate
{
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/impl/Tag61Generate.java
View file @
7f07038d
...
...
@@ -16,7 +16,7 @@ import java.math.BigDecimal;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.*;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.*;
public
class
Tag61Generate
extends
AbstractSwiftDto2MtTagGenerate
{
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/impl/Tag62aGenerate.java
View file @
7f07038d
...
...
@@ -4,7 +4,6 @@ import com.brilliance.swift.exception.SwiftException;
import
com.brilliance.swift.swiftdto2mt.AbstractSwiftDto2MtTagGenerate
;
import
com.brilliance.swift.swiftdto2mt.SwiftDto2MtContextIdentifier
;
import
com.brilliance.swift.util.DateUtil
;
import
com.brilliance.swift.util.StringUtil
;
import
com.brilliance.swift.vo.BankToCustomerStatement
;
import
com.brilliance.swift.vo.common.BalDto
;
import
com.prowidesoftware.swift.model.SwiftMessage
;
...
...
@@ -15,6 +14,8 @@ import java.math.BigDecimal;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_C
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_D
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.*;
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/impl/Tag64Generate.java
View file @
7f07038d
...
...
@@ -4,7 +4,6 @@ import com.brilliance.swift.exception.SwiftException;
import
com.brilliance.swift.swiftdto2mt.AbstractSwiftDto2MtTagGenerate
;
import
com.brilliance.swift.swiftdto2mt.SwiftDto2MtContextIdentifier
;
import
com.brilliance.swift.util.DateUtil
;
import
com.brilliance.swift.util.StringUtil
;
import
com.brilliance.swift.vo.BankToCustomerStatement
;
import
com.brilliance.swift.vo.common.BalDto
;
import
com.prowidesoftware.swift.model.SwiftMessage
;
...
...
@@ -16,7 +15,8 @@ import java.util.Date;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.*;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_C
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_D
;
public
class
Tag64Generate
extends
AbstractSwiftDto2MtTagGenerate
{
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/impl/Tag65Generate.java
View file @
7f07038d
...
...
@@ -5,20 +5,19 @@ import com.brilliance.swift.exception.SwiftException;
import
com.brilliance.swift.swiftdto2mt.AbstractSwiftDto2MtTagGenerate
;
import
com.brilliance.swift.swiftdto2mt.SwiftDto2MtContextIdentifier
;
import
com.brilliance.swift.util.DateUtil
;
import
com.brilliance.swift.util.StringUtil
;
import
com.brilliance.swift.vo.BankToCustomerStatement
;
import
com.brilliance.swift.vo.common.BalDto
;
import
com.prowidesoftware.swift.model.SwiftMessage
;
import
com.prowidesoftware.swift.model.Tag
;
import
com.prowidesoftware.swift.model.mx.dic.CreditDebitCode
;
import
com.prowidesoftware.swift.model.mx.dic.Value
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
brilliance
.
swift
.
swiftdto2mt
.
SwiftDto2MtContextIdentifier
.*;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_C
;
import
static
com
.
brilliance
.
swift
.
constants
.
Mx2MtConstants
.
DRCRMARK_D
;
public
class
Tag65Generate
extends
AbstractSwiftDto2MtTagGenerate
{
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mt/mt940950/impl/Tag86Generate.java
View file @
7f07038d
...
...
@@ -25,14 +25,8 @@ public class Tag86Generate extends AbstractSwiftDto2MtTagGenerate {
List
<
String
>
addtlStmtInfList
=
bankToCustomerStatement
.
getAddtlStmtInf
();
StringBuilder
sb
=
new
StringBuilder
();
if
(
addtlStmtInfList
.
size
()>
0
){
int
count
=
0
;
for
(
String
addtlStmtInf
:
addtlStmtInfList
)
{
if
(
count
>=
1
){
sb
.
append
(
Mx2MtConstants
.
NEW_LINE
).
append
(
":86:"
);
}
sb
.
append
(
StringUtil
.
getStringByEnter
(
addtlStmtInf
,
35
,
6
));
count
++;
}
String
addtlStmtInf
=
addtlStmtInfList
.
get
(
0
);
sb
.
append
(
StringUtil
.
getStringByEnter
(
addtlStmtInf
,
35
,
6
));
tags
.
add
(
new
Tag
(
name
,
sb
.
toString
()));
}
}
catch
(
Exception
e
){
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mx/SwiftDto2MxCreatorManager.java
View file @
7f07038d
package
com
.
brilliance
.
swift
.
swiftdto2mx
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.swiftdto2mx.camt054001.v08.SwiftDto2MxCamt054001Creator
;
import
com.brilliance.swift.swiftdto2mx.pacs008001.v09.SwiftDto2MxPacs008001Creator
;
import
com.brilliance.swift.swiftdto2mx.pacs009001.v09.SwiftDto2MxPacs009001Creator
;
import
com.brilliance.swift.vo.SwiftDto
;
...
...
@@ -22,6 +23,8 @@ public class SwiftDto2MxCreatorManager {
return
new
SwiftDto2MxPacs008001Creator
();
}
else
if
(
"pacs.009.001"
.
equals
(
messageType
))
{
return
new
SwiftDto2MxPacs009001Creator
();
}
else
if
(
"camt.054.001"
.
equals
(
messageType
)){
return
new
SwiftDto2MxCamt054001Creator
();
}
else
{
throw
new
SwiftException
(
"Invalid message type"
);
}
...
...
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mx/camt054001/v0
9
/SwiftDto2MxCamt054001Creator.java
→
swiftCore/src/main/java/com/brilliance/swift/swiftdto2mx/camt054001/v0
8
/SwiftDto2MxCamt054001Creator.java
View file @
7f07038d
package
com
.
brilliance
.
swift
.
swiftdto2mx
.
camt054001
.
v0
9
;
package
com
.
brilliance
.
swift
.
swiftdto2mx
.
camt054001
.
v0
8
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.swiftdto2mx.AbstractSwiftDto2MxCreator
;
...
...
@@ -11,6 +11,7 @@ import com.brilliance.swift.vo.common.MessagePriority;
import
com.brilliance.swift.vo.common.PartyDto
;
import
com.prowidesoftware.swift.model.mx.BusinessAppHdrV02
;
import
com.prowidesoftware.swift.model.mx.MxCamt05400102
;
import
com.prowidesoftware.swift.model.mx.MxCamt05400108
;
import
com.prowidesoftware.swift.model.mx.dic.*
;
import
javax.xml.datatype.XMLGregorianCalendar
;
...
...
@@ -30,7 +31,7 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
if
(
bankToCustomerDebitCreditNotification
==
null
)
{
return
;
}
MxCamt0540010
2
mxCamt05400102
=
new
MxCamt05400102
();
MxCamt0540010
8
mxCamt05400108
=
new
MxCamt05400108
();
//set AppHdr
BusinessAppHdrV02
businessAppHdrV02
=
new
BusinessAppHdrV02
();
//fr
...
...
@@ -58,51 +59,70 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
}
else
if
(
MessagePriority
.
HIGH
.
equals
(
bankToCustomerDebitCreditNotification
.
getMessagePriority
()))
{
businessAppHdrV02
.
setPrty
(
Priority2Code
.
HIGH
.
value
());
}
businessAppHdrV02
.
setMsgDefIdr
(
"camt.054.001.0
2
"
);
businessAppHdrV02
.
setMsgDefIdr
(
"camt.054.001.0
8
"
);
businessAppHdrV02
.
setBizMsgIdr
(
bankToCustomerDebitCreditNotification
.
getMessageId
());
mxCamt0540010
2
.
setAppHdr
(
businessAppHdrV02
);
mxCamt0540010
8
.
setAppHdr
(
businessAppHdrV02
);
//grpHdr
BankToCustomerDebitCreditNotificationV0
2
bkToCstmrDbtCdtNtfctn
=
new
BankToCustomerDebitCreditNotificationV02
();
mxCamt0540010
2
.
setBkToCstmrDbtCdtNtfctn
(
bkToCstmrDbtCdtNtfctn
);
GroupHeader
42
grpHdr
=
new
GroupHeader42
();
BankToCustomerDebitCreditNotificationV0
8
bkToCstmrDbtCdtNtfctn
=
new
BankToCustomerDebitCreditNotificationV08
();
mxCamt0540010
8
.
setBkToCstmrDbtCdtNtfctn
(
bkToCstmrDbtCdtNtfctn
);
GroupHeader
81
grpHdr
=
new
GroupHeader81
();
grpHdr
.
setMsgId
(
bankToCustomerDebitCreditNotification
.
getMessageId
());
grpHdr
.
setCreDtTm
(
DateUtil
.
parseXMLGregorianCalendar
(
bankToCustomerDebitCreditNotification
.
getCreateDate
()));
grpHdr
.
setAddtlInf
(
""
);
bkToCstmrDbtCdtNtfctn
.
setGrpHdr
(
grpHdr
);
//ntfcn
AccountNotification
2
ntfctn
=
new
AccountNotification2
();
AccountNotification
17
ntfctn
=
new
AccountNotification17
();
bkToCstmrDbtCdtNtfctn
.
addNtfctn
(
ntfctn
);
String
endToEndId
=
bankToCustomerDebitCreditNotification
.
getEndToEndId
();
//21
String
account
=
bankToCustomerDebitCreditNotification
.
getAccount
().
getAccount
();
//25
String
ibanAcct
=
bankToCustomerDebitCreditNotification
.
getAccount
().
getIbanAcct
();
//25
Date
valueDate
=
bankToCustomerDebitCreditNotification
.
getValueDate
();
//25a
CcyFormatAmount
valueAmount
=
bankToCustomerDebitCreditNotification
.
getValueAmount
();
//25a
PartyDto
debitParty
=
bankToCustomerDebitCreditNotification
.
getDebitParty
();
//50
PartyDto
debitAgtParty
=
bankToCustomerDebitCreditNotification
.
getDebitAgtParty
();
//52
String
cdtDbtCode
=
bankToCustomerDebitCreditNotification
.
getCdtDbtCode
();
PartyDto
intrmyAgtParty
=
bankToCustomerDebitCreditNotification
.
getIntrmyAgtParty
();
//56
String
addtlTxInf
=
bankToCustomerDebitCreditNotification
.
getAddtlTxInf
();
//72
//EndToEndId
ReportEntry
2
ntry
=
new
ReportEntry2
();
ReportEntry
10
ntry
=
new
ReportEntry10
();
ntfctn
.
addNtry
(
ntry
);
EntryDetails1
ntryDtls
=
new
EntryDetails1
();
if
(
CreditDebitCode
.
CRDT
.
value
().
equals
(
cdtDbtCode
)){
ntry
.
setCdtDbtInd
(
CreditDebitCode
.
CRDT
);
}
else
if
(
CreditDebitCode
.
DBIT
.
value
().
equals
(
cdtDbtCode
)){
ntry
.
setCdtDbtInd
(
CreditDebitCode
.
DBIT
);
}
EntryDetails9
ntryDtls
=
new
EntryDetails9
();
ntry
.
addNtryDtls
(
ntryDtls
);
EntryTransaction
2
txDtls
=
new
EntryTransaction2
();
EntryTransaction
10
txDtls
=
new
EntryTransaction10
();
ntryDtls
.
addTxDtls
(
txDtls
);
TransactionParties6
rltdPties
=
new
TransactionParties6
();
txDtls
.
setRltdPties
(
rltdPties
);
Party40Choice
dbtr
=
new
Party40Choice
();
rltdPties
.
setDbtr
(
dbtr
);
PartyIdentification135
pty
=
new
PartyIdentification135
();
dbtr
.
setPty
(
pty
);
if
(
endToEndId
!=
null
){
TransactionReferences
2
refs
=
new
TransactionReferences2
();
TransactionReferences
6
refs
=
new
TransactionReferences6
();
refs
.
setEndToEndId
(
endToEndId
);
txDtls
.
setRefs
(
refs
);
}
//IBAN Othr/Id
if
(
account
!=
null
){
CashAccount
20
acct
=
new
CashAccount20
();
if
(
account
!=
null
||
ibanAcct
!=
null
){
CashAccount
39
acct
=
new
CashAccount39
();
ntfctn
.
setAcct
(
acct
);
AccountIdentification4Choice
id
=
new
AccountIdentification4Choice
();
id
.
setIBAN
(
account
);
if
(
ibanAcct
!=
null
){
id
.
setIBAN
(
account
);
}
else
{
GenericAccountIdentification1
othr
=
new
GenericAccountIdentification1
();
othr
.
setId
(
account
);
id
.
setOthr
(
othr
);
}
acct
.
setId
(
id
);
}
//Dt Amt Ccy="XXX"
if
(
valueDate
!=
null
&&
valueAmount
!=
null
){
DateAndDateTime
Choice
valDt
=
new
DateAndDateTime
Choice
();
DateAndDateTime
2Choice
valDt
=
new
DateAndDateTime2
Choice
();
ntry
.
setValDt
(
valDt
);
XMLGregorianCalendar
dt
=
DateUtil
.
parseXMLGregorianCalendar
(
valueDate
);
valDt
.
setDt
(
dt
);
...
...
@@ -112,56 +132,56 @@ public class SwiftDto2MxCamt054001Creator extends AbstractSwiftDto2MxCreator {
ntry
.
setAmt
(
amt
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Nm>
TransactionParty2
rltdPties
=
new
TransactionParty2
();
txDtls
.
setRltdPties
(
rltdPties
);
PartyIdentification32
dbtr
=
new
PartyIdentification32
();
PostalAddress6
pstlAdr
=
new
PostalAddress6
();
dbtr
.
setPstlAdr
(
pstlAdr
);
rltdPties
.
setDbtr
(
dbtr
);
if
(
debitParty
!=
null
){
dbtr
.
setNm
(
debitParty
.
getPartyName
());
List
<
String
>
adrLineList
=
debitParty
.
getAddressList
();
for
(
String
adrLine
:
adrLineList
)
{
pstlAdr
.
addAdrLine
(
adrLine
);
if
(
debitParty
.
getPartyBic
()!=
null
){
Party38Choice
id
=
new
Party38Choice
();
pty
.
setId
(
id
);
OrganisationIdentification29
orgId
=
new
OrganisationIdentification29
();
orgId
.
setAnyBIC
(
bankToCustomerDebitCreditNotification
.
getDebitParty
().
getPartyBic
());
id
.
setOrgId
(
orgId
);
CashAccount38
dbtrAcct
=
new
CashAccount38
();
rltdPties
.
setDbtrAcct
(
dbtrAcct
);
AccountIdentification4Choice
aid
=
new
AccountIdentification4Choice
();
dbtrAcct
.
setId
(
aid
);
aid
.
setIBAN
(
bankToCustomerDebitCreditNotification
.
getDebitParty
().
getPartyAcct
().
getIbanAcct
());
GenericAccountIdentification1
othr
=
new
GenericAccountIdentification1
();
aid
.
setOthr
(
othr
);
othr
.
setId
(
bankToCustomerDebitCreditNotification
.
getDebitParty
().
getPartyAcct
().
getAccount
());
}
else
if
(
debitParty
.
getPartyName
()!=
null
){
pty
.
setNm
(
debitParty
.
getPartyName
());
PostalAddress24
pstlAdr
=
new
PostalAddress24
();
pty
.
setPstlAdr
(
pstlAdr
);
List
<
String
>
addressList
=
bankToCustomerDebitCreditNotification
.
getDebitParty
().
getAddressList
();
for
(
String
addAdrLine
:
addressList
)
{
pstlAdr
.
addAdrLine
(
addAdrLine
);
}
}
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdPties><Dbtr><Nm>
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><DbtrAgt><FinInstnId><BICFI>
if
(
debitAgtParty
!=
null
){
dbtr
.
setNm
(
debitAgtParty
.
getPartyName
());
List
<
String
>
adrLineList
=
debitAgtParty
.
getAddressList
();
for
(
String
adrLine
:
adrLineList
)
{
pstlAdr
.
addAdrLine
(
adrLine
);
}
CashAccount16
dbtrAcct
=
new
CashAccount16
();
rltdPties
.
setDbtrAcct
(
dbtrAcct
);
AccountIdentification4Choice
id
=
new
AccountIdentification4Choice
();
id
.
setIBAN
(
debitAgtParty
.
getPartyAcct
().
getIbanAcct
());
dbtrAcct
.
setId
(
id
);
EntryTransaction10
txDtls2
=
new
EntryTransaction10
();
ntryDtls
.
addTxDtls
(
txDtls2
);
TransactionAgents5
rltdAgts
=
new
TransactionAgents5
();
txDtls2
.
setRltdAgts
(
rltdAgts
);
BranchAndFinancialInstitutionIdentification6
dbtrAgt
=
partyDtoConvertAgt
(
debitAgtParty
);
rltdAgts
.
setDbtrAgt
(
dbtrAgt
);
}
//<Ntfctn><Ntry><NtryDtls><TxDtls><RltdAgts><IntrmyAgt1><FinInstnId><BICFI>
if
(
intrmyAgtParty
!=
null
){
TransactionAgents
2
rltdAgts
=
new
TransactionAgents2
();
TransactionAgents
5
rltdAgts
=
new
TransactionAgents5
();
txDtls
.
setRltdAgts
(
rltdAgts
);
BranchAndFinancialInstitutionIdentification
4
intrmyAgt1
=
new
BranchAndFinancialInstitutionIdentification4
(
);
BranchAndFinancialInstitutionIdentification
6
intrmyAgt1
=
partyDtoConvertAgt
(
intrmyAgtParty
);
rltdAgts
.
setIntrmyAgt1
(
intrmyAgt1
);
FinancialInstitutionIdentification7
finInstnId7
=
new
FinancialInstitutionIdentification7
();
intrmyAgt1
.
setFinInstnId
(
finInstnId7
);
finInstnId7
.
setNm
(
intrmyAgtParty
.
getPartyName
());
PostalAddress6
pstlAdr7
=
new
PostalAddress6
();
List
<
String
>
adrLineList7
=
intrmyAgtParty
.
getAddressList
();
for
(
String
adrLine
:
adrLineList7
)
{
pstlAdr7
.
addAdrLine
(
adrLine
);
}
finInstnId7
.
setPstlAdr
(
pstlAdr7
);
}
if
(
addtlTxInf
!=
null
){
txDtls
.
setAddtlTxInf
(
addtlTxInf
);
}
String
xmlStr
=
mxCamt0540010
2
.
message
();
String
xmlStr
=
mxCamt0540010
8
.
message
();
context
.
set
(
SwiftDto2MxContextIdentifier
.
MX_XML
,
xmlStr
);
String
outputFilePath
=
(
String
)
context
.
get
(
SwiftDto2MxContextIdentifier
.
MX_OUTPUT_FILE_PATH
,
true
);
if
(
StringUtil
.
isNotEmpty
(
outputFilePath
))
{
mxCamt0540010
2
.
write
(
new
File
(
outputFilePath
));
mxCamt0540010
8
.
write
(
new
File
(
outputFilePath
));
}
}
catch
(
Exception
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
...
...
swiftCore/src/main/resources/swiftJson/BankToCustomerCreditNotification.json
View file @
7f07038d
...
...
@@ -15,9 +15,18 @@
"TEST1"
,
"TEST2"
,
"TEST3"
]
},
"debitAgtParty"
:
{
"partyName"
:
"Creditor 2"
,
"addressList"
:
[
"TEST111"
,
"TEST222"
,
"TEST333"
],
"partyAcct"
:
{
"ibanAcct"
:
"FR7630588000010050000143176"
"clrSysMmb"
:
{
"code"
:
"ATBLZ"
,
"id"
:
"FR7630588000010050000143176"
}
},
"intrmyAgtParty"
:
{
...
...
@@ -27,16 +36,16 @@
"ADDRESS 2"
,
"ADDRESS 3"
],
"partyAcct"
:
{
"account"
:
"R7630588000010050000143176"
"clrSysMmb"
:
{
"code"
:
"ATBLZ"
,
"id"
:
"FR7630588000010050000143176"
}
},
"addtlTxInf"
:
"ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSE"
,
"messageType"
:
"camt.054.001"
,
"senderBic"
:
"DEUTDEFF"
,
"receiverBic"
:
"DEUTNL2A"
,
"createDate"
:
"2022-04-2
8 10:10:13,797
"
,
"createDate"
:
"2022-04-2
9 16:06:51,839
"
,
"messagePriority"
:
"NORM"
,
"messageId"
:
"FRDA000003421606"
,
"uetr"
:
"8a562c67-ca16-48ba-b074-65581be6f001"
}
\ No newline at end of file
"messageId"
:
"FRDA000003421606"
}
swiftCore/src/main/resources/swiftJson/BankToCustomerDebitNotification.json
View file @
7f07038d
...
...
@@ -9,12 +9,19 @@
"ccy"
:
"EUR"
,
"amt"
:
126
},
"debitAgtParty"
:
{
"partyName"
:
"Creditor 1"
,
"addressList"
:
[
"TEST1"
,
"TEST2"
,
"TEST3"
]
},
"addtlTxInf"
:
"ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSEENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METH"
,
"messageType"
:
"camt.054.001"
,
"senderBic"
:
"DEUTDEFF"
,
"receiverBic"
:
"DEUTNL2A"
,
"createDate"
:
"2022-04-2
8 10:10:09,688
"
,
"createDate"
:
"2022-04-2
9 16:06:27,410
"
,
"messagePriority"
:
"NORM"
,
"messageId"
:
"FRDA000003421606"
,
"uetr"
:
"8a562c67-ca16-48ba-b074-65581be6f001"
}
\ No newline at end of file
"messageId"
:
"FRDA000003421606"
}
swiftCore/src/main/resources/swiftJson/BankToCustomerStatement.json
View file @
7f07038d
...
...
@@ -38,8 +38,7 @@
"identificationCode"
:
"CHK"
,
"endToEndId"
:
"S100000189-735"
,
"acctSvcrRef"
:
"1309170100000390154395"
,
"addtlTxInf"
:
"PLACI LOVECNAMENSKIH STORITEV"
,
"addtlNtryInf"
:
"HELLO WORLD"
"addtlTxInf"
:
"PLACI LOVECNAMENSKIH STORITEV"
}
],
"closingBalance"
:
{
...
...
@@ -66,7 +65,6 @@
}
],
"addtlStmtInf"
:
[
"CHINESE BEIJING"
,
"HELLO WORLD"
],
"messageType"
:
"camt.053.001"
,
...
...
@@ -75,4 +73,4 @@
"createDate"
:
"2022-04-28 10:23:46,048"
,
"messagePriority"
:
"NORM"
,
"messageId"
:
"00010013800002001234"
}
\ No newline at end of file
}
swiftCore/src/main/resources/swiftTxt/MT900.txt
View file @
7f07038d
{1:F01DEUTNL2AAXXX
0607867083}{2:O9001010200908DEUTDEFFAXXX47870115341728220418N}{3:{121:8a562c67-ca16-48ba-b074-65581be6f001
}}{4:
{1:F01DEUTNL2AAXXX
3540051324}{2:O9001606220429DEUTDEFFAXXX76313442662205041740N}{3:{108:2205041740590623
}}{4:
:20:FRDA000003421606
:21:E2E1201
:25:S15612345678012345
:32A:220330EUR126,
:52D:Creditor 1
TEST1
TEST2
TEST3
:72:ENRICHED|TRUE SETT_METHOD|SEPA IAT_
IND|FALSE DOMESTIC_IND|FALSE PRIORI
TY_IND|FALSEENRICHED|TRUE SETT_METH
...
...
swiftCore/src/main/resources/swiftTxt/MT910.txt
View file @
7f07038d
{1:F01DEUTNL2AAXXX0
072268580}{2:O9101010200908DEUTDEFFAXXX21677573331728220418N}{3:{121:8a562c67-ca16-48ba-b074-65581be6f001
}}{4:
{1:F01DEUTNL2AAXXX0
508466280}{2:O9101606220429DEUTDEFFAXXX58867078842205041741N}{3:{108:2205041741090259
}}{4:
:20:FRDA000003421606
:21:E2E1201
:25:S15612345678012345
:32A:220330EUR126,
:50K:/FR7630588000010050000143176
Creditor 1
:50K:Creditor 1
TEST1
TEST2
TEST3
:56D:/FR7630588000010050000143176
:52D://ATFR7630588000010050000143176
Creditor 2
TEST111
TEST222
TEST333
:56D://ATFR7630588000010050000143176
81939316
ADDRESS 1
ADDRESS 2
...
...
@@ -16,4 +20,4 @@ ADDRESS 3
:72:ENRICHED|TRUE SETT_METHOD|SEPA IAT_
IND|FALSE DOMESTIC_IND|FALSE PRIORI
TY_IND|FALSE
-}
-}
\ No newline at end of file
swiftCore/src/main/resources/swiftXml/MxCamt05400102_CREDIT.xml
View file @
7f07038d
...
...
@@ -21,23 +21,23 @@
<CreDt>
2020-09-08T10:10:47+08:00
</CreDt>
</AppHdr>
<Document
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.054.001.02"
>
<BkToCstmrDbtCdtNtfctn>
<GrpHdr>
<BkToCstmrDbtCdtNtfctn>
<GrpHdr>
<MsgId>
FRDA000003421606
</MsgId>
<CreDtTm>
2022-03-30T15:15:40.483+08:00
</CreDtTm>
<AddtlInf>
BatchAccounting
</AddtlInf>
</GrpHdr>
<Ntfctn>
<Id>
AC730486180000000002
</Id>
<ElctrncSeqNb>
1234
</ElctrncSeqNb>
<CreDtTm>
2022-03-30T15:15:40.483+08:00
</CreDtTm>
<AddtlInf>
BatchAccounting
</AddtlInf>
</GrpHdr>
<Ntfctn>
<Id>
AC730486180000000002
</Id>
<ElctrncSeqNb>
1234
</ElctrncSeqNb>
<Acct>
<Id>
<IBAN>
S15612345678012345
</IBAN>
</Id>
<Svcr>
<FinInstnId>
<Svcr>
<FinInstnId>
<BIC>
DEUTNL2A
</BIC>
</FinInstnId>
</FinInstnId>
</Svcr>
<Ownr>
<Id>
...
...
@@ -45,134 +45,134 @@
<BICOrBEI>
DEUTDEFF
</BICOrBEI>
</OrgId>
</Id>
</Ownr>
</Acct>
<Ntry>
</Ownr>
</Acct>
<Ntry>
<ValDt>
<Dt>
2022-03-30+08:00
</Dt>
</ValDt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CdtDbtInd>
CRDT
</CdtDbtInd>
<Sts>
BOOK
</Sts>
<BkTxCd>
<Domn>
<Cd>
PMNT
</Cd>
<Fmly>
<Cd>
RDDT
</Cd>
<SubFmlyCd>
ESDD
</SubFmlyCd>
</Fmly>
</Domn>
<Prtry>
<Issr>
SWIFT
</Issr>
</Prtry>
</BkTxCd>
<AmtDtls>
<InstdAmt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CcyXchg/>
</InstdAmt>
<TxAmt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CcyXchg/>
</TxAmt>
<CntrValAmt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CcyXchg/>
</CntrValAmt>
</AmtDtls>
<Chrgs>
<TtlChrgsAndTaxAmt
Ccy=
"AAA"
>
0
</TtlChrgsAndTaxAmt>
<Amt
Ccy=
"AAA"
>
0
</Amt>
<CdtDbtInd>
DBIT
</CdtDbtInd>
<Tp>
<Cd>
COMM
</Cd>
</Tp>
<Rate>
0
</Rate>
<Br>
SLEV
</Br>
<Pty>
<FinInstnId>
<BIC>
AAAAAA20
</BIC>
<ClrSysMmbId>
<ClrSysId>
<Cd>
a
</Cd>
</ClrSysId>
<MmbId>
a
</MmbId>
</ClrSysMmbId>
<Nm>
a
</Nm>
<PstlAdr>
<AdrTp>
MLTO
</AdrTp>
<Dept>
a
</Dept>
<SubDept>
a
</SubDept>
<StrtNm>
a
</StrtNm>
<BldgNb>
a
</BldgNb>
<PstCd>
a
</PstCd>
<TwnNm>
a
</TwnNm>
<CtrySubDvsn>
a
</CtrySubDvsn>
<Ctry>
AA
</Ctry>
<AdrLine>
a
</AdrLine>
</PstlAdr>
<Othr>
<Id>
a
</Id>
<SchmeNm>
<Cd>
a
</Cd>
</SchmeNm>
<Issr>
a
</Issr>
</Othr>
</FinInstnId>
<BrnchId>
<Id>
a
</Id>
<Nm>
a
</Nm>
<PstlAdr>
<AdrTp>
ADDR
</AdrTp>
<Dept>
a
</Dept>
<SubDept>
a
</SubDept>
<StrtNm>
a
</StrtNm>
<BldgNb>
a
</BldgNb>
<PstCd>
a
</PstCd>
<TwnNm>
a
</TwnNm>
<CtrySubDvsn>
a
</CtrySubDvsn>
<Ctry>
AA
</Ctry>
<AdrLine>
a
</AdrLine>
</PstlAdr>
</BrnchId>
</Pty>
<Tax>
<Id>
a
</Id>
<Rate>
0
</Rate>
<Amt
Ccy=
"AAA"
>
0
</Amt>
</Tax>
</Chrgs>
<NtryDtls>
<Btch>
<MsgId>
FG00000000000y88sd
</MsgId>
<NbOfTxs>
1
</NbOfTxs>
</Btch>
<TxDtls>
<Refs>
<AcctSvcrRef>
FRDA00000343
</AcctSvcrRef>
<EndToEndId>
E2E1201
</EndToEndId>
<TxId>
FRDA00003343
</TxId>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CdtDbtInd>
CRDT
</CdtDbtInd>
<Sts>
BOOK
</Sts>
<BkTxCd>
<Domn>
<Cd>
PMNT
</Cd>
<Fmly>
<Cd>
RDDT
</Cd>
<SubFmlyCd>
ESDD
</SubFmlyCd>
</Fmly>
</Domn>
<Prtry>
<Issr>
SWIFT
</Issr>
</Prtry>
</BkTxCd>
<AmtDtls>
<InstdAmt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CcyXchg/>
</InstdAmt>
<TxAmt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CcyXchg/>
</TxAmt>
<CntrValAmt>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CcyXchg/>
</CntrValAmt>
</AmtDtls>
<Chrgs>
<TtlChrgsAndTaxAmt
Ccy=
"AAA"
>
0
</TtlChrgsAndTaxAmt>
<Amt
Ccy=
"AAA"
>
0
</Amt>
<CdtDbtInd>
CRDT
</CdtDbtInd>
<Tp>
<Cd>
COMM
</Cd>
</Tp>
<Rate>
0
</Rate>
<Br>
SLEV
</Br>
<Pty>
<FinInstnId>
<BIC>
AAAAAA20
</BIC>
<ClrSysMmbId>
<ClrSysId>
<Cd>
a
</Cd>
</ClrSysId>
<MmbId>
a
</MmbId>
</ClrSysMmbId>
<Nm>
a
</Nm>
<PstlAdr>
<AdrTp>
MLTO
</AdrTp>
<Dept>
a
</Dept>
<SubDept>
a
</SubDept>
<StrtNm>
a
</StrtNm>
<BldgNb>
a
</BldgNb>
<PstCd>
a
</PstCd>
<TwnNm>
a
</TwnNm>
<CtrySubDvsn>
a
</CtrySubDvsn>
<Ctry>
AA
</Ctry>
<AdrLine>
a
</AdrLine>
</PstlAdr>
<Othr>
<Id>
a
</Id>
<SchmeNm>
<Cd>
a
</Cd>
</SchmeNm>
<Issr>
a
</Issr>
</Othr>
</FinInstnId>
<BrnchId>
<Id>
a
</Id>
<Nm>
a
</Nm>
<PstlAdr>
<AdrTp>
ADDR
</AdrTp>
<Dept>
a
</Dept>
<SubDept>
a
</SubDept>
<StrtNm>
a
</StrtNm>
<BldgNb>
a
</BldgNb>
<PstCd>
a
</PstCd>
<TwnNm>
a
</TwnNm>
<CtrySubDvsn>
a
</CtrySubDvsn>
<Ctry>
AA
</Ctry>
<AdrLine>
a
</AdrLine>
</PstlAdr>
</BrnchId>
</Pty>
<Tax>
<Id>
a
</Id>
<Rate>
0
</Rate>
<Amt
Ccy=
"AAA"
>
0
</Amt>
</Tax>
</Chrgs>
<NtryDtls>
<Btch>
<MsgId>
FG00000000000y88sd
</MsgId>
<NbOfTxs>
1
</NbOfTxs>
</Btch>
<TxDtls>
<Refs>
<AcctSvcrRef>
FRDA00000343
</AcctSvcrRef>
<EndToEndId>
E2E1201
</EndToEndId>
<TxId>
FRDA00003343
</TxId>
<MndtId>
MANFRST1COR1201003
</MndtId>
<UETR>
8a562c67-ca16-48ba-b074-65581be6f001
</UETR>
</Refs>
<AmtDtls/>
<RltdPties>
<Dbtr>
<Nm>
Creditor 1
</Nm>
<PstlAdr>
<Ctry>
PT
</Ctry>
<AdrLine>
TEST1
</AdrLine>
</Refs>
<AmtDtls/>
<RltdPties>
<Dbtr>
<Nm>
Creditor 1
</Nm>
<PstlAdr>
<Ctry>
PT
</Ctry>
<AdrLine>
TEST1
</AdrLine>
<AdrLine>
TEST2
</AdrLine>
<AdrLine>
TEST3
</AdrLine>
<AdrLine>
TEST4
</AdrLine>
</PstlAdr>
<CtryOfRes>
PT
</CtryOfRes>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>
FR7630588000010050000143176
</IBAN>
</Id>
</DbtrAcct>
<AdrLine>
TEST4
</AdrLine>
</PstlAdr>
<CtryOfRes>
PT
</CtryOfRes>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>
FR7630588000010050000143176
</IBAN>
</Id>
</DbtrAcct>
</RltdPties>
<RltdAgts>
<DbtrAgt>
...
...
@@ -186,25 +186,25 @@
<IntrmyAgt1>
<FinInstnId>
<Nm>
81939316
</Nm>
<PstlAdr>
<AdrLine>
ADDRESS 1
</AdrLine>
<PstlAdr>
<AdrLine>
ADDRESS 1
</AdrLine>
<AdrLine>
ADDRESS 2
</AdrLine>
<AdrLine>
ADDRESS 3
</AdrLine>
<AdrLine>
ADDRESS 4
</AdrLine>
<AdrLine>
ADDRESS 4
</AdrLine>
</PstlAdr>
</FinInstnId>
</IntrmyAgt1>
</RltdAgts>
<RltdDts>
<AccptncDtTm>
2016-12-06T04:01:10
</AccptncDtTm>
<IntrBkSttlmDt>
2016-12-07
</IntrBkSttlmDt>
</RltdDts>
</RltdAgts>
<RltdDts>
<AccptncDtTm>
2016-12-06T04:01:10
</AccptncDtTm>
<IntrBkSttlmDt>
2016-12-07
</IntrBkSttlmDt>
</RltdDts>
<AddtlTxInf>
ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSE
</AddtlTxInf>
</TxDtls>
</NtryDtls>
<AddtlNtryInf>
ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSE
</AddtlNtryInf>
</Ntry>
</Ntfctn>
</BkToCstmrDbtCdtNtfctn>
</TxDtls>
</NtryDtls>
<AddtlNtryInf>
ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSE
</AddtlNtryInf>
</Ntry>
</Ntfctn>
</BkToCstmrDbtCdtNtfctn>
</Document>
</Envelope>
\ No newline at end of file
</Envelope>
swiftCore/src/main/resources/swiftXml/MxCamt05400108_CREDIT.xml
0 → 100644
View file @
7f07038d
<?xml version="1.0" encoding="UTF-8" ?>
<RequestPayload>
<AppHdr
xmlns=
"urn:iso:std:iso:20022:tech:xsd:head.001.001.02"
>
<Fr>
<FIId>
<FinInstnId>
<BICFI>
DEUTDEFF
</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>
DEUTNL2A
</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>
FRDA000003421606
</BizMsgIdr>
<MsgDefIdr>
camt.054.001.08
</MsgDefIdr>
<CreDt>
2022-04-29T16:06:51.839+08:00
</CreDt>
<Prty>
NORM
</Prty>
</AppHdr>
<Document
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.054.001.08"
>
<BkToCstmrDbtCdtNtfctn>
<GrpHdr>
<MsgId>
FRDA000003421606
</MsgId>
<CreDtTm>
2022-04-29T16:06:51.839+08:00
</CreDtTm>
<AddtlInf></AddtlInf>
</GrpHdr>
<Ntfctn>
<Acct>
<Id>
<Othr>
<Id>
S15612345678012345
</Id>
</Othr>
</Id>
</Acct>
<Ntry>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CdtDbtInd>
CRDT
</CdtDbtInd>
<ValDt>
<Dt>
2022-03-30+08:00
</Dt>
</ValDt>
<NtryDtls>
<TxDtls>
<Refs>
<EndToEndId>
E2E1201
</EndToEndId>
</Refs>
<RltdPties>
<Dbtr>
<Pty>
<Nm>
Creditor 1
</Nm>
<PstlAdr>
<AdrLine>
TEST1
</AdrLine>
<AdrLine>
TEST2
</AdrLine>
<AdrLine>
TEST3
</AdrLine>
</PstlAdr>
</Pty>
</Dbtr>
</RltdPties>
<RltdAgts>
<IntrmyAgt1>
<FinInstnId>
<ClrSysMmbId>
<ClrSysId>
<Cd>
ATBLZ
</Cd>
</ClrSysId>
<MmbId>
FR7630588000010050000143176
</MmbId>
</ClrSysMmbId>
<Nm>
81939316
</Nm>
<PstlAdr>
<AdrLine>
ADDRESS 1
</AdrLine>
<AdrLine>
ADDRESS 2
</AdrLine>
<AdrLine>
ADDRESS 3
</AdrLine>
</PstlAdr>
</FinInstnId>
</IntrmyAgt1>
</RltdAgts>
<AddtlTxInf>
ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSE
</AddtlTxInf>
</TxDtls>
<TxDtls>
<RltdAgts>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<ClrSysId>
<Cd>
ATBLZ
</Cd>
</ClrSysId>
<MmbId>
FR7630588000010050000143176
</MmbId>
</ClrSysMmbId>
<Nm>
Creditor 2
</Nm>
<PstlAdr>
<AdrLine>
TEST111
</AdrLine>
<AdrLine>
TEST222
</AdrLine>
<AdrLine>
TEST333
</AdrLine>
</PstlAdr>
</FinInstnId>
</DbtrAgt>
</RltdAgts>
</TxDtls>
</NtryDtls>
</Ntry>
</Ntfctn>
</BkToCstmrDbtCdtNtfctn>
</Document>
</RequestPayload>
\ No newline at end of file
swiftCore/src/main/resources/swiftXml/MxCamt05400108_DEBIT.xml
0 → 100644
View file @
7f07038d
<?xml version="1.0" encoding="UTF-8" ?>
<RequestPayload>
<AppHdr
xmlns=
"urn:iso:std:iso:20022:tech:xsd:head.001.001.02"
>
<Fr>
<FIId>
<FinInstnId>
<BICFI>
DEUTDEFF
</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>
DEUTNL2A
</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>
FRDA000003421606
</BizMsgIdr>
<MsgDefIdr>
camt.054.001.08
</MsgDefIdr>
<CreDt>
2022-04-29T16:06:27.410+08:00
</CreDt>
<Prty>
NORM
</Prty>
</AppHdr>
<Document
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.054.001.08"
>
<BkToCstmrDbtCdtNtfctn>
<GrpHdr>
<MsgId>
FRDA000003421606
</MsgId>
<CreDtTm>
2022-04-29T16:06:27.410+08:00
</CreDtTm>
<AddtlInf></AddtlInf>
</GrpHdr>
<Ntfctn>
<Acct>
<Id>
<Othr>
<Id>
S15612345678012345
</Id>
</Othr>
</Id>
</Acct>
<Ntry>
<Amt
Ccy=
"EUR"
>
126
</Amt>
<CdtDbtInd>
DBIT
</CdtDbtInd>
<ValDt>
<Dt>
2022-03-30+08:00
</Dt>
</ValDt>
<NtryDtls>
<TxDtls>
<Refs>
<EndToEndId>
E2E1201
</EndToEndId>
</Refs>
<RltdPties>
<Dbtr>
<Pty></Pty>
</Dbtr>
</RltdPties>
<AddtlTxInf>
ENRICHED|TRUE SETT_METHOD|SEPA IAT_IND|FALSE DOMESTIC_IND|FALSE PRIORITY_IND|FALSEENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METHOD|SEPA IAT_ENRICHED|TRUE SETT_METH
</AddtlTxInf>
</TxDtls>
<TxDtls>
<RltdAgts>
<DbtrAgt>
<FinInstnId>
<Nm>
Creditor 1
</Nm>
<PstlAdr>
<AdrLine>
TEST1
</AdrLine>
<AdrLine>
TEST2
</AdrLine>
<AdrLine>
TEST3
</AdrLine>
</PstlAdr>
</FinInstnId>
</DbtrAgt>
</RltdAgts>
</TxDtls>
</NtryDtls>
</Ntry>
</Ntfctn>
</BkToCstmrDbtCdtNtfctn>
</Document>
</RequestPayload>
\ No newline at end of file
swiftCore/src/test/java/com/brilliance/mt2swiftdto/camt054001/Test900Camt054001.java
View file @
7f07038d
...
...
@@ -9,7 +9,7 @@ public class Test900Camt054001 {
public
static
void
main
(
String
[]
args
)
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftTxt\\MT900.txt"
);
SwiftDto
swiftDto
=
new
SwiftTransfer
().
mt2SwiftDto
(
file
,
"D:/
test1
/BankToCustomerDebitNotification.json"
,
null
);
SwiftDto
swiftDto
=
new
SwiftTransfer
().
mt2SwiftDto
(
file
,
"D:/
MtToSwift
/BankToCustomerDebitNotification.json"
,
null
);
System
.
out
.
println
(
swiftDto
.
toString
());
}
}
swiftCore/src/test/java/com/brilliance/mt2swiftdto/camt054001/Test910Camt054001.java
View file @
7f07038d
...
...
@@ -9,7 +9,7 @@ public class Test910Camt054001 {
public
static
void
main
(
String
[]
args
)
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftTxt\\MT910.txt"
);
SwiftDto
swiftDto
=
new
SwiftTransfer
().
mt2SwiftDto
(
file
,
"D:/
test1
/BankToCustomerCreditNotification.json"
,
null
);
SwiftDto
swiftDto
=
new
SwiftTransfer
().
mt2SwiftDto
(
file
,
"D:/
MtToSwift
/BankToCustomerCreditNotification.json"
,
null
);
System
.
out
.
println
(
swiftDto
.
toString
());
}
}
swiftCore/src/test/java/com/brilliance/mx2swiftdto/bankcdbcdnf/Test900.java
0 → 100644
View file @
7f07038d
package
com
.
brilliance
.
mx2swiftdto
.
bankcdbcdnf
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.vo.SwiftDto
;
import
java.io.File
;
public
class
Test900
{
public
static
void
main
(
String
[]
args
)
{
SwiftDto
swiftDto
=
SwiftTransfer
.
mx2SwiftDto
(
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05400108_DEBIT.xml"
),
"D:/MxToSwift/BankToCustomerDebitNotification.json"
,
null
);
System
.
out
.
println
(
swiftDto
);
}
}
swiftCore/src/test/java/com/brilliance/mx2swiftdto/bankcdbcdnf/Test910.java
0 → 100644
View file @
7f07038d
package
com
.
brilliance
.
mx2swiftdto
.
bankcdbcdnf
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.vo.SwiftDto
;
import
java.io.File
;
public
class
Test910
{
public
static
void
main
(
String
[]
args
)
{
SwiftDto
swiftDto
=
SwiftTransfer
.
mx2SwiftDto
(
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05400108_CREDIT.xml"
),
"D:/MxToSwift/BankToCustomerCreditNotification.json"
,
null
);
System
.
out
.
println
(
swiftDto
);
}
}
swiftCore/src/test/java/com/brilliance/swiftdto2mt/mt900/Test.java
View file @
7f07038d
...
...
@@ -8,7 +8,7 @@ public class Test {
public
static
void
main
(
String
[]
args
)
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftJson\\BankToCustomerDebitNotification.json"
);
String
mtStr
=
new
SwiftDto2MtCreatorManager
().
swiftDto2Mt
(
file
,
"D:/
test2
/MT900.txt"
,
null
);
String
mtStr
=
new
SwiftDto2MtCreatorManager
().
swiftDto2Mt
(
file
,
"D:/
SwiftToMt
/MT900.txt"
,
null
);
System
.
out
.
println
(
mtStr
);
}
}
swiftCore/src/test/java/com/brilliance/swiftdto2mt/mt910/Test.java
View file @
7f07038d
...
...
@@ -8,7 +8,7 @@ public class Test {
public
static
void
main
(
String
[]
args
)
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftJson\\BankToCustomerCreditNotification.json"
);
String
mtStr
=
new
SwiftDto2MtCreatorManager
().
swiftDto2Mt
(
file
,
"D:/
test2
/MT910.txt"
,
null
);
String
mtStr
=
new
SwiftDto2MtCreatorManager
().
swiftDto2Mt
(
file
,
"D:/
SwiftToMt
/MT910.txt"
,
null
);
System
.
out
.
println
(
mtStr
);
}
}
swiftCore/src/test/java/com/brilliance/swiftdto2mx/camt054001/Text900camt054001.java
0 → 100644
View file @
7f07038d
package
com
.
brilliance
.
swiftdto2mx
.
camt054001
;
import
com.brilliance.swift.SwiftTransfer
;
import
com.brilliance.swift.swiftdto2mt.SwiftDto2MtCreatorManager
;
import
com.brilliance.swift.swiftdto2mx.SwiftDto2MxCreatorManager
;
import
com.prowidesoftware.swift.model.mt9xx.MT900
;
import
java.io.File
;
/**
* @author zh
* @create 2022-04-29 10:12
*/
public
class
Text900camt054001
{
public
static
void
main
(
String
[]
args
)
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftJson\\BankToCustomerDebitNotification.json"
);
String
mtStr
=
SwiftTransfer
.
swiftDto2Mx
(
file
,
"D:/SwiftToMx/MxCamt05400108_DEBIT.xml"
);
System
.
out
.
println
(
mtStr
);
}
}
swiftCore/src/test/java/com/brilliance/swiftdto2mx/camt054001/Text910camt054001.java
0 → 100644
View file @
7f07038d
package
com
.
brilliance
.
swiftdto2mx
.
camt054001
;
import
com.brilliance.swift.SwiftTransfer
;
import
java.io.File
;
/**
* @author zh
* @create 2022-04-29 10:12
*/
public
class
Text910camt054001
{
public
static
void
main
(
String
[]
args
)
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\swiftCore\\src\\main\\resources\\swiftJson\\BankToCustomerCreditNotification.json"
);
String
mtStr
=
SwiftTransfer
.
swiftDto2Mx
(
file
,
"D:/SwiftToMx/MxCamt05400108_CREDIT.xml"
);
System
.
out
.
println
(
mtStr
);
}
}
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