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
0da79133
Commit
0da79133
authored
Jun 24, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了camt02900109到mt196,mt296的逻辑
parent
78fa6e3c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
12 deletions
+51
-12
Mx2MtConstants.java
...n/java/com/brilliance/swift/constants/Mx2MtConstants.java
+2
-0
AbstractMt2MxParseField.java
...a/com/brilliance/swift/mt2mx/AbstractMt2MxParseField.java
+6
-1
AbstractMt2MxCamt029001ParseField.java
...t/mt2mx/camt029001/AbstractMt2MxCamt029001ParseField.java
+6
-1
Mt2MxCamt029001Creator.java
...liance/swift/mt2mx/camt029001/Mt2MxCamt029001Creator.java
+23
-4
Camt029001Parse11RField.java
.../swift/mt2mx/camt029001/impl/Camt029001Parse11RField.java
+2
-0
Camt029001Parse76Field.java
...e/swift/mt2mx/camt029001/impl/Camt029001Parse76Field.java
+4
-1
Camt029001Parse77AField.java
.../swift/mt2mx/camt029001/impl/Camt029001Parse77AField.java
+4
-2
MT296.txt
swiftCore/src/main/resources/swiftTxt/MT296.txt
+4
-3
No files found.
swiftCore/src/main/java/com/brilliance/swift/constants/Mx2MtConstants.java
View file @
0da79133
...
...
@@ -114,6 +114,8 @@ public class Mx2MtConstants {
public
static
final
String
MX_END_TO_END_ID_DEFAULT_VALUE
=
"NOTPROVIDED"
;
public
static
final
String
MX_TO_MT_DEFAULT_VALUE
=
"NOTPROVIDED"
;
public
static
final
String
MT_TO_MX_DEFAULT_VALUE
=
"NOTPROVIDED"
;
/**
* 外部参数名称
*/
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/AbstractMt2MxParseField.java
View file @
0da79133
...
...
@@ -1423,7 +1423,7 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
}
}
protected
void
mt_To_mxField76
(
String
mt76
,
Map
<
String
,
Object
>
maps
){
protected
String
mt_To_mxField76
(
String
mt76
,
Map
<
String
,
Object
>
maps
){
String
mt76Value
=
mt76
.
replace
(
"\r\n//"
,
""
).
trim
();
String
status
=
""
;
String
reason
=
""
;
...
...
@@ -1498,6 +1498,11 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
cxlStsRsnInfMaps
.
put
(
"addtlInf"
,
addtlInfJsonArray
);
}
addtlInfJsonArray
.
addAll
(
list
);
if
(
StringUtil
.
isNotEmpty
(
status
)){
return
status
;
}
else
{
return
""
;
}
}
protected
String
getMxType
(
String
mtType
){
String
mxType
=
""
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt029001/AbstractMt2MxCamt029001ParseField.java
View file @
0da79133
...
...
@@ -22,7 +22,12 @@ public abstract class AbstractMt2MxCamt029001ParseField extends AbstractMt2MxPar
appHdrMaps
=
(
Map
<
String
,
Object
>)
jsonMaps
.
get
(
"appHdr"
);
Map
<
String
,
Object
>
rsltnOfInvstgtnMaps
=
(
Map
<
String
,
Object
>)
jsonMaps
.
get
(
"rsltnOfInvstgtn"
);
assgnmtMaps
=
(
Map
<
String
,
Object
>)
rsltnOfInvstgtnMaps
.
get
(
"assgnmt"
);
stsMaps
=
(
Map
<
String
,
Object
>)
rsltnOfInvstgtnMaps
.
get
(
"sts"
);
if
(
rsltnOfInvstgtnMaps
.
containsKey
(
"sts"
)){
stsMaps
=
(
Map
<
String
,
Object
>)
rsltnOfInvstgtnMaps
.
get
(
"sts"
);
}
else
{
stsMaps
=
new
HashMap
<>();
rsltnOfInvstgtnMaps
.
put
(
"sts"
,
stsMaps
);
}
JSONArray
cxlDtlsJsonArray
=
(
JSONArray
)
rsltnOfInvstgtnMaps
.
get
(
"cxlDtls"
);
cxlDtlsMaps
=
(
Map
<
String
,
Object
>)
cxlDtlsJsonArray
.
get
(
0
);
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt029001/Mt2MxCamt029001Creator.java
View file @
0da79133
package
com
.
brilliance
.
swift
.
mt2mx
.
camt029001
;
import
com.alibaba.fastjson.JSONArray
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.mt2mx.AbstractMt2MxCreator
;
import
com.brilliance.swift.mt2mx.Mt2MxContextIdentifier
;
import
com.brilliance.swift.mt2mx.Mt2MxParseField
;
import
com.brilliance.swift.mt2mx.camt029001.impl.*
;
import
com.brilliance.swift.util.StringUtil
;
import
com.prowidesoftware.swift.model.mt.AbstractMT
;
import
org.sss.common.model.IFactory
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -54,13 +56,30 @@ public class Mt2MxCamt029001Creator extends AbstractMt2MxCreator {
String
receiverBic
=
(
String
)
context
.
get
(
Mt2MxContextIdentifier
.
MT_RECEIVE_BIC
,
true
);
if
(
StringUtil
.
isNotEmpty
(
receiverBic
))
{
Map
<
String
,
Object
>
assgneMaps
=
new
HashMap
<>();
assgnmtMaps
.
put
(
"assgn
r
"
,
assgneMaps
);
assgnmtMaps
.
put
(
"assgn
e
"
,
assgneMaps
);
Map
<
String
,
Object
>
agtMaps
=
new
HashMap
<>();
assgneMaps
.
put
(
"agt"
,
agtMaps
);
mt_to_mxBICFI
(
send
Bic
,
agtMaps
);
mt_to_mxBICFI
(
receiver
Bic
,
agtMaps
);
}
Map
<
String
,
Object
>
rslvdCaseMaps
=
null
;
if
(
txInfAndStsMaps
.
containsKey
(
"rslvdCase"
)){
rslvdCaseMaps
=
(
Map
<
String
,
Object
>)
txInfAndStsMaps
.
get
(
"rslvdCase"
);
}
else
{
rslvdCaseMaps
=
new
HashMap
<>();
txInfAndStsMaps
.
put
(
"rslvdCase"
,
rslvdCaseMaps
);
}
Map
<
String
,
Object
>
cretrMaps
=
new
HashMap
<>();
Map
<
String
,
Object
>
agtMaps
=
new
HashMap
<>();
Map
<
String
,
Object
>
finInstnIdMaps
=
new
HashMap
<>();
Map
<
String
,
Object
>
pstlAdrMaps
=
new
HashMap
<>();
rslvdCaseMaps
.
put
(
"cretr"
,
cretrMaps
);
cretrMaps
.
put
(
"agt"
,
agtMaps
);
agtMaps
.
put
(
"finInstnId"
,
finInstnIdMaps
);
finInstnIdMaps
.
put
(
"nm"
,
Mx2MtConstants
.
MT_TO_MX_DEFAULT_VALUE
);
finInstnIdMaps
.
put
(
"pstlAdr"
,
pstlAdrMaps
);
JSONArray
adrLineJsonArray
=
new
JSONArray
();
pstlAdrMaps
.
put
(
"adrLine"
,
adrLineJsonArray
);
adrLineJsonArray
.
add
(
Mx2MtConstants
.
MT_TO_MX_DEFAULT_VALUE
);
}
@Override
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt029001/impl/Camt029001Parse11RField.java
View file @
0da79133
package
com
.
brilliance
.
swift
.
mt2mx
.
camt029001
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mt2mx.camt029001.AbstractMt2MxCamt029001ParseField
;
import
com.brilliance.swift.util.DateUtil
;
...
...
@@ -40,6 +41,7 @@ public class Camt029001Parse11RField extends AbstractMt2MxCamt029001ParseField {
String
mxType
=
getMxType
(
mtType
);
orgnlGrpInfMaps
.
put
(
"orgnlMsgNmId"
,
mxType
);
orgnlGrpInfMaps
.
put
(
"orgnlCreDtTm"
,
dateStr
+
"T00:00:00+00:00"
);
orgnlGrpInfMaps
.
put
(
"orgnlMsgId"
,
Mx2MtConstants
.
MT_TO_MX_DEFAULT_VALUE
);
}
}
catch
(
ParseException
e
)
{
throw
new
SwiftException
(
"ERROR"
,
e
.
getMessage
());
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt029001/impl/Camt029001Parse76Field.java
View file @
0da79133
...
...
@@ -20,7 +20,10 @@ public class Camt029001Parse76Field extends AbstractMt2MxCamt029001ParseField {
if
(
tag76
!=
null
)
{
Field76
field76
=
(
Field76
)
tag76
.
asField
();
Map
<
String
,
Object
>
txInfAndStsMaps
=
getTxInfAndStsMaps
();
mt_To_mxField76
(
field76
.
getValue
(),
txInfAndStsMaps
);
String
sts
=
mt_To_mxField76
(
field76
.
getValue
(),
txInfAndStsMaps
);
if
(
"CNCL"
.
equals
(
sts
)||
"PDCR"
.
equals
(
sts
)||
"RJCR"
.
equals
(
sts
)){
stsMaps
.
put
(
"conf"
,
sts
);
}
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt029001/impl/Camt029001Parse77AField.java
View file @
0da79133
...
...
@@ -22,8 +22,10 @@ public class Camt029001Parse77AField extends AbstractMt2MxCamt029001ParseField {
Field77A
field77A
=
(
Field77A
)
tag77A
.
asField
();
String
String77A
=
field77A
.
getValue
().
replace
(
"\r\n//"
,
""
).
replace
(
"\r\n"
,
""
);
int
index
=
String77A
.
indexOf
(
"/UETR/"
);
String
uetr
=
String77A
.
substring
(
index
+
6
);
txInfAndStsMaps
.
put
(
"orgnlUETR"
,
uetr
);
if
(
index
>-
1
){
String
uetr
=
String77A
.
substring
(
index
+
6
);
txInfAndStsMaps
.
put
(
"orgnlUETR"
,
uetr
);
}
}
}
}
swiftCore/src/main/resources/swiftTxt/MT296.txt
View file @
0da79133
{1:F01NDEAFIHHXXXX0000000000}{2:O2960000991231HELSFIHHXXXX00000000009912310000N}{3:{121:8a562c67-ca16-48ba-b074-65581be6f001}}{4:
:20:CNCL-ID001
:21:CSE-001
:76:/
CNCL/AGNT
/HELLO,WORLD.HELLO,WORLD.
:76:/
RJCR/ASDF
/HELLO,WORLD.HELLO,WORLD.
//HELLO,WORLD.HELLO,WORLD.HELLO,WOR
//
LD.HELLO,WORLD.HELLO,WORLD.HELLO,
//
HELLO,WORLD.HELLO,WORLD.
//WORLD.HELLO,WORLD.HELLO,WORLD.HEL
//LO,WORLD.HELLO,WORLD.HELLO,WORLD.
//HELLO,WORLD.HELLO,WORLD.HELLO,WOR
...
...
@@ -15,4 +15,4 @@
//be6f001
:11R:202
210217
-}
-}
\ No newline at end of file
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