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
98debfde
Commit
98debfde
authored
Jul 30, 2024
by
lixinyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ack逻辑修改
parent
c8727197
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
Mx2ElementCreatorManager.java
...brilliance/swift/mx2element/Mx2ElementCreatorManager.java
+14
-1
SwiftTransferUtil.java
...ain/java/com/brilliance/swift/util/SwiftTransferUtil.java
+10
-1
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2element/Mx2ElementCreatorManager.java
View file @
98debfde
...
@@ -14,12 +14,14 @@ import com.brilliance.swift.mx2element.pacs008001.Mx2ElementPacs008001Creator;
...
@@ -14,12 +14,14 @@ import com.brilliance.swift.mx2element.pacs008001.Mx2ElementPacs008001Creator;
import
com.brilliance.swift.mx2element.pacs009001.Mx2ElementPacs009001Creator
;
import
com.brilliance.swift.mx2element.pacs009001.Mx2ElementPacs009001Creator
;
import
com.brilliance.swift.mx2element.xsys011001.Mx2ElementXsys011001Creator
;
import
com.brilliance.swift.mx2element.xsys011001.Mx2ElementXsys011001Creator
;
import
com.brilliance.swift.mx2element.xsys01200101.Mx2ElementXsys012001Creator
;
import
com.brilliance.swift.mx2element.xsys01200101.Mx2ElementXsys012001Creator
;
import
com.brilliance.swift.util.SwiftTransferUtil
;
import
com.brilliance.swift.util.XmlUtil
;
import
com.brilliance.swift.util.XmlUtil
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.GsonBuilder
;
import
com.google.gson.GsonBuilder
;
import
com.prowidesoftware.swift.model.MxId
;
import
com.prowidesoftware.swift.model.MxId
;
import
com.prowidesoftware.swift.model.mx.AbstractMX
;
import
com.prowidesoftware.swift.model.mx.AbstractMX
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -34,10 +36,21 @@ public class Mx2ElementCreatorManager {
...
@@ -34,10 +36,21 @@ public class Mx2ElementCreatorManager {
public
Map
<
String
,
Object
>
mx2ElementMaps
(
String
xmlStr
)
throws
SwiftException
{
public
Map
<
String
,
Object
>
mx2ElementMaps
(
String
xmlStr
)
throws
SwiftException
{
xmlStr
=
XmlUtil
.
handlingXml
(
xmlStr
);
xmlStr
=
XmlUtil
.
handlingXml
(
xmlStr
);
MxId
mxId
=
XmlUtil
.
getMxMessageType
(
xmlStr
);
MxId
mxId
=
XmlUtil
.
getMxMessageType
(
xmlStr
);
String
messageType
=
mxId
.
getBusinessProcess
().
name
()
String
messageType
=
""
;
//增加ISO ACK/NAK处理逻辑
Map
<
String
,
String
>
ackNakMap
=
SwiftTransferUtil
.
anasyIsoACKNAK
(
xmlStr
);
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
if
(
ackNakMap
!=
null
){
for
(
Map
.
Entry
<
String
,
String
>
entry
:
ackNakMap
.
entrySet
())
{
objectMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
}
return
objectMap
;
}
else
{
messageType
=
mxId
.
getBusinessProcess
().
name
()
+
mxId
.
getFunctionality
()
+
mxId
.
getFunctionality
()
+
mxId
.
getVariant
()
+
mxId
.
getVariant
()
+
mxId
.
getVersion
();
+
mxId
.
getVersion
();
}
if
(
mxId
==
null
)
{
if
(
mxId
==
null
)
{
throw
new
SwiftException
(
"找不到MX报文类型"
);
throw
new
SwiftException
(
"找不到MX报文类型"
);
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/util/SwiftTransferUtil.java
View file @
98debfde
...
@@ -934,13 +934,21 @@ public class SwiftTransferUtil {
...
@@ -934,13 +934,21 @@ public class SwiftTransferUtil {
throw
new
SwiftException
(
"parse iso xml error:"
+
e
.
getMessage
());
throw
new
SwiftException
(
"parse iso xml error:"
+
e
.
getMessage
());
}
}
String
mtAckNakStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Interventions.Intervention.Contents.AckNack.PseudoAckNack"
);
String
mtAckNakStr
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Interventions.Intervention.Contents.AckNack.PseudoAckNack"
);
String
valdat
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Interventions.Intervention.CreationTime"
);
String
senderReference
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Message.SenderReference"
);
String
senderReference
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Message.SenderReference"
);
String
messageIdentifier
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Message.MessageIdentifier"
);
String
messageIdentifier
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Message.MessageIdentifier"
);
String
uetr
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.NetworkInfo.SWIFTNetNetworkInfo.Reference"
);
String
sndbic
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Message.Sender.FullName.X1"
);
String
rcvbic
=
XmlUtil
.
getXmlNodeValue
(
document
,
"DataPDU.Header.TransmissionReport.Message.Receiver.FullName.X1"
);
Map
<
String
,
String
>
maps
=
new
HashMap
<>();
Map
<
String
,
String
>
maps
=
new
HashMap
<>();
String
result
=
""
;
String
result
=
""
;
maps
.
put
(
"mtAckNakStr"
,
mtAckNakStr
);
maps
.
put
(
"mtAckNakStr"
,
mtAckNakStr
);
maps
.
put
(
"senderReference"
,
senderReference
);
maps
.
put
(
"senderReference"
,
senderReference
);
maps
.
put
(
"messageIdentifier"
,
messageIdentifier
);
maps
.
put
(
"messageIdentifier"
,
messageIdentifier
);
maps
.
put
(
"UETR"
,
uetr
);
maps
.
put
(
"sndbic"
,
sndbic
);
maps
.
put
(
"rcvbic"
,
rcvbic
);
maps
.
put
(
"valdat"
,
valdat
);
if
(
StringUtil
.
isNotEmpty
(
mtAckNakStr
)){
if
(
StringUtil
.
isNotEmpty
(
mtAckNakStr
)){
if
(
mtAckNakStr
.
contains
(
"{311:ACK"
)){
if
(
mtAckNakStr
.
contains
(
"{311:ACK"
)){
result
=
"ACK"
;
result
=
"ACK"
;
...
@@ -948,7 +956,8 @@ public class SwiftTransferUtil {
...
@@ -948,7 +956,8 @@ public class SwiftTransferUtil {
result
=
"NAK"
;
result
=
"NAK"
;
}
}
}
}
maps
.
put
(
"result"
,
result
);
maps
.
put
(
"mty"
,
result
);
maps
.
put
(
"messageType"
,
result
);
// System.out.println("maps="+maps);
// System.out.println("maps="+maps);
return
maps
;
return
maps
;
}
}
...
...
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