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
6b723a62
Commit
6b723a62
authored
Aug 25, 2022
by
chengzhuoshen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MX转MT无用节点添加到转换报告中
parent
5e90966d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
132 additions
and
31 deletions
+132
-31
Mx2MtConstants.java
...n/java/com/brilliance/swift/constants/Mx2MtConstants.java
+2
-2
AbstractMx2MtCreator.java
...java/com/brilliance/swift/mx2mt/AbstractMx2MtCreator.java
+103
-27
AbstractMx2MtTagsGenerate.java
...com/brilliance/swift/mx2mt/AbstractMx2MtTagsGenerate.java
+0
-0
Mx2MtCreatorManager.java
.../java/com/brilliance/swift/mx2mt/Mx2MtCreatorManager.java
+1
-0
Mx2MtListener.java
...c/main/java/com/brilliance/swift/mx2mt/Mx2MtListener.java
+1
-0
Mx2Mt202Creator.java
...m/brilliance/swift/mx2mt/mt202cov202/Mx2Mt202Creator.java
+6
-0
Field32AGenerate.java
...rilliance/swift/mx2mt/mt900910/impl/Field32AGenerate.java
+3
-0
Field52aFor900Generate.java
...nce/swift/mx2mt/mt900910/impl/Field52aFor900Generate.java
+4
-1
Field52aFor910Generate.java
...nce/swift/mx2mt/mt900910/impl/Field52aFor910Generate.java
+6
-1
Field61Generate.java
...brilliance/swift/mx2mt/mt941942/impl/Field61Generate.java
+6
-0
ErrorCodeList.xlsx
swiftCore/src/main/resources/ErrorCodeList.xlsx
+0
-0
No files found.
swiftCore/src/main/java/com/brilliance/swift/constants/Mx2MtConstants.java
View file @
6b723a62
...
@@ -59,8 +59,6 @@ public class Mx2MtConstants {
...
@@ -59,8 +59,6 @@ public class Mx2MtConstants {
public
static
final
String
MX_XML_DOCUMENT
=
"xmlDocument"
;
public
static
final
String
MX_XML_DOCUMENT
=
"xmlDocument"
;
public
static
final
String
MT_TYPE
=
"mtType"
;
public
static
final
String
MT_IO_TYPE
=
"mtIOType"
;
public
static
final
String
MT_IO_TYPE
=
"mtIOType"
;
public
static
final
String
MT_IO_TYPE_INPUT
=
"I"
;
public
static
final
String
MT_IO_TYPE_INPUT
=
"I"
;
...
@@ -145,6 +143,8 @@ public class Mx2MtConstants {
...
@@ -145,6 +143,8 @@ public class Mx2MtConstants {
public
static
final
String
BLOCK5_PDE
=
"Block5_PDE"
;
public
static
final
String
BLOCK5_PDE
=
"Block5_PDE"
;
public
static
final
String
MT_TYPE
=
"MtType"
;
public
static
final
String
YES
=
"Y"
;
public
static
final
String
YES
=
"Y"
;
public
static
final
String
NO
=
"N"
;
public
static
final
String
NO
=
"N"
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/AbstractMx2MtCreator.java
View file @
6b723a62
...
@@ -15,17 +15,18 @@ import com.prowidesoftware.swift.io.IConversionService;
...
@@ -15,17 +15,18 @@ import com.prowidesoftware.swift.io.IConversionService;
import
com.prowidesoftware.swift.io.writer.SwiftWriter
;
import
com.prowidesoftware.swift.io.writer.SwiftWriter
;
import
com.prowidesoftware.swift.model.*
;
import
com.prowidesoftware.swift.model.*
;
import
com.prowidesoftware.swift.model.field.*
;
import
com.prowidesoftware.swift.model.field.*
;
import
com.prowidesoftware.swift.model.mx.AbstractMX
;
import
org.apache.commons.lang3.Validate
;
import
org.apache.commons.lang3.Validate
;
import
org.dom4j.Attribute
;
import
org.dom4j.Document
;
import
org.dom4j.Document
;
import
org.dom4j.Element
;
import
javax.xml.datatype.DatatypeConfigurationException
;
import
javax.xml.datatype.DatatypeFactory
;
import
javax.xml.datatype.XMLGregorianCalendar
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
public
abstract
class
AbstractMx2MtCreator
implements
Mx2MtCreator
{
public
abstract
class
AbstractMx2MtCreator
implements
Mx2MtCreator
{
...
@@ -39,7 +40,6 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -39,7 +40,6 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
this
.
context
=
context
;
this
.
context
=
context
;
}
}
/**
/**
* 封装报文转换详细报告
* 封装报文转换详细报告
* @param errorCode
* @param errorCode
...
@@ -126,7 +126,14 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -126,7 +126,14 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
if
(
StringUtil
.
isNotEmpty
(
parentPath
))
{
if
(
StringUtil
.
isNotEmpty
(
parentPath
))
{
path
=
parentPath
+
"."
+
path
;
path
=
parentPath
+
"."
+
path
;
}
}
return
XmlUtil
.
getXmlNodeValue
(
document
,
path
);
String
value
=
XmlUtil
.
getXmlNodeValue
(
document
,
path
);
if
(
StringUtil
.
isNotEmpty
(
value
))
{
Mx2MtListener
mx2MtListener
=
(
Mx2MtListener
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_TO_MT_LISTENER_CLASS
,
true
);
if
(
mx2MtListener
!=
null
)
{
mx2MtListener
.
process
(
path
);
//如果存在监听器且得到的值不为空,则执行监听操作
}
}
return
value
;
}
}
protected
int
getXmlNodeCounts
(
String
parentPath
,
Document
document
,
String
path
)
{
protected
int
getXmlNodeCounts
(
String
parentPath
,
Document
document
,
String
path
)
{
...
@@ -136,6 +143,53 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -136,6 +143,53 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
return
XmlUtil
.
getChildrenCount
(
document
,
path
,
null
);
return
XmlUtil
.
getChildrenCount
(
document
,
path
,
null
);
}
}
/**
* 将xml所有节点全路径放在list里面
* 除了AppHdr以外
* @param list
* @param element
* @param path
*/
public
static
void
parseDocument
(
List
<
String
>
list
,
Element
element
,
String
path
)
{
if
(
element
!=
null
)
{
if
(
element
.
isTextOnly
())
{
list
.
add
(
path
);
List
<
Attribute
>
attributes
=
element
.
attributes
();
if
(
attributes
!=
null
&&
attributes
.
size
()
>
0
)
{
for
(
Attribute
attribute
:
attributes
)
{
list
.
add
(
path
+
"@"
+
attribute
.
getName
());
}
}
}
else
{
List
<
Element
>
elementList
=
element
.
elements
();
Map
<
String
,
List
<
Element
>>
maps
=
new
LinkedHashMap
<>();
for
(
Element
e
:
elementList
)
{
if
(
maps
.
containsKey
(
e
.
getName
()))
{
List
<
Element
>
eList
=
maps
.
get
(
e
.
getName
());
eList
.
add
(
e
);
}
else
{
List
<
Element
>
eList
=
new
ArrayList
<>();
eList
.
add
(
e
);
maps
.
put
(
e
.
getName
(),
eList
);
}
}
for
(
List
<
Element
>
eList
:
maps
.
values
())
{
if
(
eList
.
size
()
==
1
)
{
parseDocument
(
list
,
eList
.
get
(
0
),
path
+
"."
+
eList
.
get
(
0
).
getName
());
}
else
{
for
(
int
i
=
0
;
i
<
eList
.
size
();
i
++)
{
if
(
i
==
0
)
{
parseDocument
(
list
,
eList
.
get
(
i
),
path
+
"."
+
eList
.
get
(
i
).
getName
());
//第一条的数据不带下标
}
else
{
parseDocument
(
list
,
eList
.
get
(
i
),
path
+
"."
+
eList
.
get
(
i
).
getName
()
+
"("
+
i
+
")"
);
}
}
}
}
}
}
}
public
abstract
List
<
Mx2MtTagsGenerate
>
getGenerateTagList
();
public
abstract
List
<
Mx2MtTagsGenerate
>
getGenerateTagList
();
protected
abstract
String
getMtType
();
protected
abstract
String
getMtType
();
...
@@ -151,15 +205,19 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -151,15 +205,19 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
@Override
@Override
public
void
withBlock1
()
throws
SwiftException
{
public
void
withBlock1
()
throws
SwiftException
{
SwiftBlock1
block1
=
new
SwiftBlock1
();
SwiftBlock1
block1
=
new
SwiftBlock1
();
AbstractMX
abstractMX
=
(
AbstractMX
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_OBJ
,
true
);
Document
document
=
(
Document
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_XMl_DOCUMENT
,
true
);
String
appHdrParentPath
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
APPHDR_PARENT_ELEMENT_NAME
,
true
);
String
senderBic
=
(
String
)
context
.
get
(
Mx2MtConstants
.
SENDERS_ADDRESS
,
true
);
String
senderBic
=
(
String
)
context
.
get
(
Mx2MtConstants
.
SENDERS_ADDRESS
,
true
);
if
(
StringUtil
.
isEmpty
(
senderBic
)
&&
abstractMX
.
getAppHdr
()
!=
null
)
{
if
(
StringUtil
.
isEmpty
(
senderBic
))
{
senderBic
=
abstractMX
.
getAppHdr
().
from
(
);
senderBic
=
getXmlNodeValue
(
appHdrParentPath
,
document
,
"AppHdr.Fr.FIId.FinInstnId.BICFI"
);
}
}
context
.
set
(
Mx2MtContextIdentifier
.
MX_SENDER_BIC
,
senderBic
);
String
receiverBic
=
(
String
)
context
.
get
(
Mx2MtConstants
.
RECEIVERS_ADDRESS
,
true
);
String
receiverBic
=
(
String
)
context
.
get
(
Mx2MtConstants
.
RECEIVERS_ADDRESS
,
true
);
if
(
StringUtil
.
isEmpty
(
receiverBic
)
&&
abstractMX
.
getAppHdr
()
!=
null
)
{
if
(
StringUtil
.
isEmpty
(
receiverBic
))
{
receiverBic
=
abstractMX
.
getAppHdr
().
to
(
);
receiverBic
=
getXmlNodeValue
(
appHdrParentPath
,
document
,
"AppHdr.To.FIId.FinInstnId.BICFI"
);
}
}
context
.
set
(
Mx2MtContextIdentifier
.
MX_RECEIVER_BIC
,
receiverBic
);
String
applicationMode
=
(
String
)
context
.
get
(
Mx2MtConstants
.
APPLICATION_MODE
,
true
);
String
applicationMode
=
(
String
)
context
.
get
(
Mx2MtConstants
.
APPLICATION_MODE
,
true
);
if
(
"O"
.
equalsIgnoreCase
(
applicationMode
))
{
if
(
"O"
.
equalsIgnoreCase
(
applicationMode
))
{
block1
.
setLogicalTerminal
(
processBicCode
(
receiverBic
));
block1
.
setLogicalTerminal
(
processBicCode
(
receiverBic
));
...
@@ -173,27 +231,26 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -173,27 +231,26 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
@Override
@Override
public
void
withBlock2
()
throws
SwiftException
{
public
void
withBlock2
()
throws
SwiftException
{
AbstractMX
abstractMX
=
(
AbstractMX
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_OBJ
,
true
);
String
senderBic
=
(
String
)
context
.
get
(
Mx2MtConstants
.
SENDERS_ADDRESS
,
true
);
if
(
StringUtil
.
isEmpty
(
senderBic
)
&&
abstractMX
.
getAppHdr
()
!=
null
)
{
senderBic
=
abstractMX
.
getAppHdr
().
from
();
}
context
.
set
(
Mx2MtContextIdentifier
.
MX_SENDER_BIC
,
senderBic
);
String
receiverBic
=
(
String
)
context
.
get
(
Mx2MtConstants
.
RECEIVERS_ADDRESS
,
true
);
if
(
StringUtil
.
isEmpty
(
receiverBic
)
&&
abstractMX
.
getAppHdr
()
!=
null
)
{
receiverBic
=
abstractMX
.
getAppHdr
().
to
();
}
context
.
set
(
Mx2MtContextIdentifier
.
MX_RECEIVER_BIC
,
receiverBic
);
String
messagePriority
=
(
String
)
context
.
get
(
Mx2MtConstants
.
MESSAGE_PRIORITY
,
true
);
if
(
StringUtil
.
isEmpty
(
messagePriority
))
{
Document
document
=
(
Document
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_XMl_DOCUMENT
,
true
);
Document
document
=
(
Document
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_XMl_DOCUMENT
,
true
);
String
appHdrParentPath
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
APPHDR_PARENT_ELEMENT_NAME
,
true
);
String
appHdrParentPath
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
APPHDR_PARENT_ELEMENT_NAME
,
true
);
String
senderBic
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_SENDER_BIC
,
true
);
String
receiverBic
=
(
String
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_RECEIVER_BIC
,
true
);
String
messagePriority
=
(
String
)
context
.
get
(
Mx2MtConstants
.
MESSAGE_PRIORITY
,
true
);
if
(
StringUtil
.
isEmpty
(
messagePriority
))
{
String
xmlMessagePriority
=
getXmlNodeValue
(
appHdrParentPath
,
document
,
"AppHdr.Prty"
);
String
xmlMessagePriority
=
getXmlNodeValue
(
appHdrParentPath
,
document
,
"AppHdr.Prty"
);
messagePriority
=
MessagePriority
.
HIGH
.
equals
(
xmlMessagePriority
)
?
"U"
:
"N"
;
messagePriority
=
MessagePriority
.
HIGH
.
equals
(
xmlMessagePriority
)
?
"U"
:
"N"
;
}
}
Date
inputDate
=
(
Date
)
context
.
get
(
Mx2MtConstants
.
INTPUT_DATE
,
true
);
Date
inputDate
=
(
Date
)
context
.
get
(
Mx2MtConstants
.
INTPUT_DATE
,
true
);
if
(
inputDate
==
null
&&
abstractMX
.
getAppHdr
()
!=
null
)
{
if
(
inputDate
==
null
)
{
inputDate
=
DateUtil
.
parseDate
(
abstractMX
.
getAppHdr
().
creationDate
());
String
createDateStr
=
getXmlNodeValue
(
appHdrParentPath
,
document
,
"AppHdr.CreDt"
);
if
(
StringUtil
.
isNotEmpty
(
createDateStr
))
{
try
{
XMLGregorianCalendar
createDate
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
createDateStr
);
inputDate
=
DateUtil
.
parseDate
(
createDate
);
}
catch
(
DatatypeConfigurationException
e
)
{
throw
new
SwiftException
(
e
.
getMessage
());
}
}
}
}
Date
outputDate
=
(
Date
)
context
.
get
(
Mx2MtConstants
.
OUTPUT_DATE
,
true
);
Date
outputDate
=
(
Date
)
context
.
get
(
Mx2MtConstants
.
OUTPUT_DATE
,
true
);
if
(
outputDate
==
null
)
{
if
(
outputDate
==
null
)
{
...
@@ -307,6 +364,25 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
...
@@ -307,6 +364,25 @@ public abstract class AbstractMx2MtCreator implements Mx2MtCreator {
if
(
StringUtil
.
isNotEmpty
(
outputFilePath
))
{
if
(
StringUtil
.
isNotEmpty
(
outputFilePath
))
{
write
(
swiftMessage
,
new
File
(
outputFilePath
));
write
(
swiftMessage
,
new
File
(
outputFilePath
));
}
}
//处理没翻译节点值的警告信息
Mx2MtListener
mx2MtListener
=
(
Mx2MtListener
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_TO_MT_LISTENER_CLASS
,
true
);
if
(
mx2MtListener
!=
null
)
{
Map
<
String
,
Boolean
>
maps
=
mx2MtListener
.
getMaps
();
List
<
String
>
pathList
=
new
ArrayList
<>();
Document
document
=
(
Document
)
context
.
get
(
Mx2MtContextIdentifier
.
MX_XMl_DOCUMENT
,
true
);
parseDocument
(
pathList
,
document
.
getRootElement
(),
document
.
getRootElement
().
getName
());
if
(
pathList
.
size
()
>
0
)
{
for
(
String
path
:
pathList
)
{
if
(!
maps
.
containsKey
(
path
))
{
String
originalValue
=
XmlUtil
.
getXmlNodeValue
(
document
,
path
);
if
(
StringUtil
.
isNotEmpty
(
originalValue
))
{
buildSTErrorInfo
(
ERROR
.
T0000M
,
path
,
originalValue
);
}
}
}
}
}
}
}
public
void
write
(
SwiftMessage
swiftMessage
,
File
file
)
throws
SwiftException
{
public
void
write
(
SwiftMessage
swiftMessage
,
File
file
)
throws
SwiftException
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/AbstractMx2MtTagsGenerate.java
View file @
6b723a62
This diff is collapsed.
Click to expand it.
swiftCore/src/main/java/com/brilliance/swift/mx2mt/Mx2MtCreatorManager.java
View file @
6b723a62
...
@@ -39,6 +39,7 @@ public class Mx2MtCreatorManager {
...
@@ -39,6 +39,7 @@ public class Mx2MtCreatorManager {
.
trim
();
.
trim
();
Mx2MtContext
context
=
new
Mx2MtContext
();
Mx2MtContext
context
=
new
Mx2MtContext
();
Document
document
=
DocumentHelper
.
parseText
(
xml
);
Document
document
=
DocumentHelper
.
parseText
(
xml
);
context
.
set
(
Mx2MtContextIdentifier
.
MX_TO_MT_LISTENER_CLASS
,
new
Mx2MtListener
());
//注册监听器
context
.
set
(
Mx2MtContextIdentifier
.
MX_XMl_DOCUMENT
,
document
);
context
.
set
(
Mx2MtContextIdentifier
.
MX_XMl_DOCUMENT
,
document
);
context
.
set
(
Mx2MtContextIdentifier
.
MX_TO_MT_OUTPUT_FILE_PATH
,
fileOutputPath
);
context
.
set
(
Mx2MtContextIdentifier
.
MX_TO_MT_OUTPUT_FILE_PATH
,
fileOutputPath
);
context
.
set
(
Mx2MtContextIdentifier
.
MX_OBJ
,
abstractMX
);
context
.
set
(
Mx2MtContextIdentifier
.
MX_OBJ
,
abstractMX
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/Mx2MtListener.java
View file @
6b723a62
...
@@ -24,6 +24,7 @@ public class Mx2MtListener {
...
@@ -24,6 +24,7 @@ public class Mx2MtListener {
* @param usedPath
* @param usedPath
*/
*/
public
void
process
(
String
usedPath
)
{
public
void
process
(
String
usedPath
)
{
usedPath
=
usedPath
.
replace
(
"(0)"
,
""
);
//第一条的数据不带下标
if
(!
maps
.
containsKey
(
usedPath
))
{
if
(!
maps
.
containsKey
(
usedPath
))
{
maps
.
put
(
usedPath
,
true
);
maps
.
put
(
usedPath
,
true
);
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt202cov202/Mx2Mt202Creator.java
View file @
6b723a62
...
@@ -89,7 +89,12 @@ public class Mx2Mt202Creator extends AbstractMx2MtCreator {
...
@@ -89,7 +89,12 @@ public class Mx2Mt202Creator extends AbstractMx2MtCreator {
@Override
@Override
protected
String
getMtType
()
{
protected
String
getMtType
()
{
String
mtType
=
(
String
)
context
.
get
(
Mx2MtConstants
.
MT_TYPE
,
true
);
if
(
StringUtil
.
isNotEmpty
(
mtType
))
{
return
mtType
;
}
else
{
return
Mx2MtConstants
.
MT_TYPE_202
;
return
Mx2MtConstants
.
MT_TYPE_202
;
}
}
}
}
}
\ No newline at end of file
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt900910/impl/Field32AGenerate.java
View file @
6b723a62
...
@@ -33,6 +33,9 @@ public class Field32AGenerate extends AbstractMx2MtTagsGenerate {
...
@@ -33,6 +33,9 @@ public class Field32AGenerate extends AbstractMx2MtTagsGenerate {
String
intrBkSttlmccy
=
""
;
String
intrBkSttlmccy
=
""
;
String
intrBkSttlmDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.ValDt.Dt"
);
String
intrBkSttlmDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.ValDt.Dt"
);
if
(
StringUtil
.
isEmpty
(
intrBkSttlmDtValue
))
{
if
(
StringUtil
.
isEmpty
(
intrBkSttlmDtValue
))
{
intrBkSttlmDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.ValDt.DtTm"
);
}
if
(
StringUtil
.
isEmpty
(
intrBkSttlmDtValue
))
{
intrBkSttlmDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdDts.IntrBkSttlmDt"
);
intrBkSttlmDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Ntfctn.Ntry.NtryDtls.TxDtls.RltdDts.IntrBkSttlmDt"
);
}
}
if
(
StringUtil
.
isNotEmpty
(
intrBkSttlmDtValue
))
{
if
(
StringUtil
.
isNotEmpty
(
intrBkSttlmDtValue
))
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt900910/impl/Field52aFor900Generate.java
View file @
6b723a62
...
@@ -87,7 +87,10 @@ public class Field52aFor900Generate extends AbstractMx2MtTagsGenerate {
...
@@ -87,7 +87,10 @@ public class Field52aFor900Generate extends AbstractMx2MtTagsGenerate {
}
else
if
(
StringUtil
.
isNotEmpty
(
name
))
{
}
else
if
(
StringUtil
.
isNotEmpty
(
name
))
{
mtNameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
bodyHdrParentElementName
+
".Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Agt.FinInstnId"
);
mtNameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
bodyHdrParentElementName
+
".Ntfctn.Ntry.NtryDtls.TxDtls.RltdPties.Dbtr.Agt.FinInstnId"
);
}
}
if
(
StringUtil
.
isEmpty
(
mtNameAddress
))
return
;
//如果name和地址不存在,返回。
if
(
StringUtil
.
isEmpty
(
mtNameAddress
))
{
buildSTErrorInfo
(
ERROR
.
T20064
,
"Block4/52a"
,
null
);
return
;
}
if
(
StringUtil
.
isNotEmpty
(
account
))
{
if
(
StringUtil
.
isNotEmpty
(
account
))
{
value
=
account
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
;
value
=
account
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
;
}
else
{
}
else
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt900910/impl/Field52aFor910Generate.java
View file @
6b723a62
...
@@ -52,7 +52,12 @@ public class Field52aFor910Generate extends AbstractMx2MtTagsGenerate {
...
@@ -52,7 +52,12 @@ public class Field52aFor910Generate extends AbstractMx2MtTagsGenerate {
}
else
if
(
StringUtil
.
isNotEmpty
(
name
))
{
}
else
if
(
StringUtil
.
isNotEmpty
(
name
))
{
mtNameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
agtPath
+
".FinInstnId"
);
mtNameAddress
=
mx_to_mtFinancialInstitutionNameAndUnstructuredAddress
(
agtPath
+
".FinInstnId"
);
}
}
if
(
StringUtil
.
isEmpty
(
mtNameAddress
))
return
;
//如果name和地址不存在,返回。
if
(
StringUtil
.
isEmpty
(
mtNameAddress
))
{
if
(
exist50a
(
tags
))
{
buildSTErrorInfo
(
ERROR
.
T20064
,
"Block4/52a"
,
null
);
}
return
;
}
if
(
StringUtil
.
isNotEmpty
(
mtClearSystemId
))
{
if
(
StringUtil
.
isNotEmpty
(
mtClearSystemId
))
{
value
=
mtClearSystemId
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
;
value
=
mtClearSystemId
+
Mx2MtConstants
.
NEW_LINE
+
mtNameAddress
;
}
else
{
}
else
{
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt941942/impl/Field61Generate.java
View file @
6b723a62
...
@@ -46,11 +46,17 @@ public class Field61Generate extends AbstractMx2MtTagsGenerate {
...
@@ -46,11 +46,17 @@ public class Field61Generate extends AbstractMx2MtTagsGenerate {
for
(
int
i
=
0
;
i
<
entryCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
entryCount
;
i
++)
{
String
value
=
""
;
String
value
=
""
;
String
valueDateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").ValDt.Dt"
);
String
valueDateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").ValDt.Dt"
);
if
(
StringUtil
.
isEmpty
(
valueDateStr
))
{
valueDateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").ValDt.DtTm"
);
}
if
(
StringUtil
.
isNotEmpty
(
valueDateStr
))
{
if
(
StringUtil
.
isNotEmpty
(
valueDateStr
))
{
XMLGregorianCalendar
valueDate
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
valueDateStr
);
XMLGregorianCalendar
valueDate
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
valueDateStr
);
value
+=
DateUtil
.
format
(
valueDate
,
"yyMMdd"
);
value
+=
DateUtil
.
format
(
valueDate
,
"yyMMdd"
);
}
}
String
bookDateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").BookgDt.Dt"
);
String
bookDateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").BookgDt.Dt"
);
if
(
StringUtil
.
isEmpty
(
bookDateStr
))
{
bookDateStr
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Rpt.Ntry("
+
i
+
").BookgDt.DtTm"
);
}
if
(
StringUtil
.
isNotEmpty
(
bookDateStr
))
{
if
(
StringUtil
.
isNotEmpty
(
bookDateStr
))
{
XMLGregorianCalendar
bookDate
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
bookDateStr
);
XMLGregorianCalendar
bookDate
=
DatatypeFactory
.
newInstance
().
newXMLGregorianCalendar
(
bookDateStr
);
value
+=
DateUtil
.
format
(
bookDate
,
"MMdd"
);
value
+=
DateUtil
.
format
(
bookDate
,
"MMdd"
);
...
...
swiftCore/src/main/resources/ErrorCodeList.xlsx
View file @
6b723a62
No preview for this file type
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