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
96fde8fb
Commit
96fde8fb
authored
Apr 15, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改Mx2Mt900910Creator类中的方法
parent
182bca3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
28 deletions
+10
-28
Mx2Mt900910Creator.java
...oftware/brilliance/mx2mt/mt900910/Mx2Mt900910Creator.java
+10
-28
No files found.
src/main/java/com/prowidesoftware/brilliance/mx2mt/mt900910/Mx2Mt900910Creator.java
View file @
96fde8fb
...
...
@@ -43,13 +43,7 @@ public class Mx2Mt900910Creator extends AbstractMx2MtCreator {
}
@Override
public
String
generateMtMsg
()
{
validate
();
String
outPutFilePath
=
(
String
)
map
.
get
(
Mx2MtConstants
.
OUT_PUT_FILE_PATH
);
return
TemplateUtil
.
makeFileByTemplate
(
"swift_mt_900_910.vm"
,
map
,
outPutFilePath
,
"utf-8"
);
}
public
void
validate
()
{
public
void
postProcess
()
{
String
mtType
=
(
String
)
map
.
get
(
Mx2MtConstants
.
MT_TYPE
);
if
(
Mx2MtConstants
.
MT_TYPE_910
.
equals
(
mtType
))
{
String
field50a
=
(
String
)
map
.
get
(
"field50a"
);
...
...
@@ -59,35 +53,23 @@ public class Mx2Mt900910Creator extends AbstractMx2MtCreator {
}
}
}
@Override
protected
String
getMtType
()
{
try
{
String
mtType
=
""
;
MxCamt05400102
mxCamt05400102
=
(
MxCamt05400102
)
map
.
get
(
Mx2MtConstants
.
MX_OBJECT
);
if
(
mxCamt05400102
==
null
||
mxCamt05400102
.
getBkToCstmrDbtCdtNtfctn
()
==
null
)
{
return
mtType
;
}
BankToCustomerDebitCreditNotificationV02
bkToCstmrDbtCdtNtfctn
=
mxCamt05400102
.
getBkToCstmrDbtCdtNtfctn
();
List
<
AccountNotification2
>
ntfctnList
=
bkToCstmrDbtCdtNtfctn
.
getNtfctn
();
if
(
ntfctnList
!=
null
&&
ntfctnList
.
size
()
>
0
)
{
AccountNotification2
ntfctn
=
ntfctnList
.
get
(
0
);
List
<
ReportEntry2
>
ntryList
=
ntfctn
.
getNtry
();
if
(
ntryList
!=
null
&&
ntryList
.
size
()
>
0
)
{
ReportEntry2
ntry
=
ntryList
.
get
(
0
);
//judge 900 or 910
if
(
CreditDebitCode
.
DBIT
.
equals
(
ntry
.
getCdtDbtInd
()))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_900
;
}
else
if
(
CreditDebitCode
.
CRDT
.
equals
(
ntry
.
getCdtDbtInd
()))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_910
;
}
map
.
put
(
Mx2MtConstants
.
MT_TYPE
,
mtType
);
}
Document
document
=
(
Document
)
map
.
get
(
Mx2MtConstants
.
MX_XML_DOCUMENT
);
String
cdtDbtInd
=
getXmlNodeValue
(
Mx2MtConstants
.
MAINBODY_PARENT_ELEMENT_NAME
,
document
,
"Ntfctn.Ntry.CdtDbtInd"
);
//judge 900 or 910
if
(
CreditDebitCode
.
DBIT
.
equals
(
CreditDebitCode
.
valueOf
(
cdtDbtInd
)))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_900
;
}
else
if
(
CreditDebitCode
.
CRDT
.
equals
(
CreditDebitCode
.
valueOf
(
cdtDbtInd
)))
{
mtType
=
Mx2MtConstants
.
MT_TYPE_910
;
}
map
.
put
(
Mx2MtConstants
.
MT_TYPE
,
mtType
);
return
mtType
;
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
throw
new
SwiftException
(
"ERROR"
,
"getMtType error."
);
throw
new
SwiftException
(
"ERROR"
,
e
.
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