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
9d5a3052
Commit
9d5a3052
authored
Jul 21, 2022
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了camt05300108的Mx2ElementCamt053001Creator方法,和修改了25,28和86的部分逻辑
parent
06393a03
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
64 deletions
+56
-64
Camt052001Parse25Field.java
...e/swift/mt2mx/camt052001/impl/Camt052001Parse25Field.java
+2
-3
Camt052001Parse28CField.java
.../swift/mt2mx/camt052001/impl/Camt052001Parse28CField.java
+0
-3
Camt052001Parse86Field.java
...e/swift/mt2mx/camt052001/impl/Camt052001Parse86Field.java
+2
-1
Camt052001Parse90CField.java
.../swift/mt2mx/camt052001/impl/Camt052001Parse90CField.java
+1
-2
Camt052001Parse90DField.java
.../swift/mt2mx/camt052001/impl/Camt052001Parse90DField.java
+1
-2
Camt053001Parse25Field.java
...e/swift/mt2mx/camt053001/impl/Camt053001Parse25Field.java
+2
-3
Camt053001Parse28CField.java
.../swift/mt2mx/camt053001/impl/Camt053001Parse28CField.java
+0
-3
Camt053001Parse86Field.java
...e/swift/mt2mx/camt053001/impl/Camt053001Parse86Field.java
+2
-1
Camt054001Parse25Field.java
...e/swift/mt2mx/camt054001/impl/Camt054001Parse25Field.java
+2
-3
Mx2ElementCamt053001Creator.java
...ft/mx2element/camt053001/Mx2ElementCamt053001Creator.java
+44
-43
No files found.
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt052001/impl/Camt052001Parse25Field.java
View file @
9d5a3052
...
...
@@ -37,15 +37,14 @@ public class Camt052001Parse25Field extends AbstractMt2MxCamt052001ParseField {
}
if
(
tag25P
!=
null
){
field25P
=
(
Field25P
)
tag25P
.
asField
();
mt_to_mxAccount35
(
field25P
.
get
Value
(),
acctMaps
,
"Rpt/Acct/Id/Othr/Id"
);
mt_to_mxAccount35
(
field25P
.
get
Account
(),
acctMaps
,
"Rpt/Acct/Id/Othr/Id"
);
Map
<
String
,
Object
>
ownrMaps
=
new
HashMap
<>();
acctMaps
.
put
(
"ownr"
,
ownrMaps
);
Map
<
String
,
Object
>
idMaps
=
new
HashMap
<>();
ownrMaps
.
put
(
"id"
,
idMaps
);
Map
<
String
,
Object
>
orgIdMaps
=
new
HashMap
<>();
idMaps
.
put
(
"orgId"
,
orgIdMaps
);
String
sendBic
=
(
String
)
context
.
get
(
Mt2MxContextIdentifier
.
MT_SEND_BIC
,
true
);
orgIdMaps
.
put
(
"anyBIC"
,
sendBic
);
orgIdMaps
.
put
(
"anyBIC"
,
field25P
.
getBIC
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt052001/impl/Camt052001Parse28CField.java
View file @
9d5a3052
...
...
@@ -27,9 +27,6 @@ public class Camt052001Parse28CField extends AbstractMt2MxCamt052001ParseField {
rptPgntnMaps
=
new
HashMap
<>();
rptMaps
.
put
(
"rptPgntn"
,
rptPgntnMaps
);
}
if
(
field28C
.
getSequenceNumber
().
equals
(
"1"
)){
rptPgntnMaps
.
put
(
"lastPgInd"
,
Boolean
.
TRUE
);
}
rptPgntnMaps
.
put
(
"pgNb"
,
field28C
.
getSequenceNumber
());
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt052001/impl/Camt052001Parse86Field.java
View file @
9d5a3052
package
com
.
brilliance
.
swift
.
mt2mx
.
camt052001
.
impl
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mt2mx.camt052001.AbstractMt2MxCamt052001ParseField
;
import
com.prowidesoftware.swift.model.Tag
;
...
...
@@ -21,7 +22,7 @@ public class Camt052001Parse86Field extends AbstractMt2MxCamt052001ParseField {
for
(
int
i
=
1
;
i
<
tags
.
size
();
i
++)
{
if
(!
tags
.
get
(
i
-
1
).
getName
().
equals
(
"61"
)&&
tags
.
get
(
i
).
getName
().
equals
(
"86"
)){
Field86
field86
=
(
Field86
)
tag86
[
tag86
.
length
-
1
].
asField
();
rptMaps
.
put
(
"addtlRptInf"
,
field86
.
getValue
().
replace
(
"\r\n"
,
""
));
rptMaps
.
put
(
"addtlRptInf"
,
field86
.
getValue
().
replace
(
Mx2MtConstants
.
NEW_LINE
,
""
));
}
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt052001/impl/Camt052001Parse90CField.java
View file @
9d5a3052
...
...
@@ -34,8 +34,7 @@ public class Camt052001Parse90CField extends AbstractMt2MxCamt052001ParseField {
txsSummryMaps
.
put
(
"ttlCdtNtries"
,
ttlCdtNtriesMaps
);
}
ttlCdtNtriesMaps
.
put
(
"nbOfNtries"
,
field90C
.
getNumber
());
String
sum
=
field90C
.
getAmount
();
ttlCdtNtriesMaps
.
put
(
"sum"
,
sum
.
substring
(
0
,
sum
.
length
()-
1
));
ttlCdtNtriesMaps
.
put
(
"sum"
,
field90C
.
amount
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt052001/impl/Camt052001Parse90DField.java
View file @
9d5a3052
...
...
@@ -34,8 +34,7 @@ public class Camt052001Parse90DField extends AbstractMt2MxCamt052001ParseField {
txsSummryMaps
.
put
(
"ttlDbtNtries"
,
ttlDbtNtriesMaps
);
}
ttlDbtNtriesMaps
.
put
(
"nbOfNtries"
,
field90D
.
getNumber
());
String
sum
=
field90D
.
getAmount
();
ttlDbtNtriesMaps
.
put
(
"sum"
,
sum
.
substring
(
0
,
sum
.
length
()-
1
));
ttlDbtNtriesMaps
.
put
(
"sum"
,
field90D
.
amount
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt053001/impl/Camt053001Parse25Field.java
View file @
9d5a3052
...
...
@@ -37,15 +37,14 @@ public class Camt053001Parse25Field extends AbstractMt2MxCamt053001ParseField {
}
if
(
tag25P
!=
null
){
field25P
=
(
Field25P
)
tag25P
.
asField
();
mt_to_mxAccount35
(
field25P
.
get
Value
(),
acctMaps
,
"Ntfctn/Acct/Id/Othr/Id"
);
mt_to_mxAccount35
(
field25P
.
get
Account
(),
acctMaps
,
"Ntfctn/Acct/Id/Othr/Id"
);
Map
<
String
,
Object
>
ownrMaps
=
new
HashMap
<>();
acctMaps
.
put
(
"ownr"
,
ownrMaps
);
Map
<
String
,
Object
>
idMaps
=
new
HashMap
<>();
ownrMaps
.
put
(
"id"
,
idMaps
);
Map
<
String
,
Object
>
orgIdMaps
=
new
HashMap
<>();
idMaps
.
put
(
"orgId"
,
orgIdMaps
);
String
sendBic
=
(
String
)
context
.
get
(
Mt2MxContextIdentifier
.
MT_SEND_BIC
,
true
);
orgIdMaps
.
put
(
"anyBIC"
,
sendBic
);
orgIdMaps
.
put
(
"anyBIC"
,
field25P
.
getBIC
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt053001/impl/Camt053001Parse28CField.java
View file @
9d5a3052
...
...
@@ -27,9 +27,6 @@ public class Camt053001Parse28CField extends AbstractMt2MxCamt053001ParseField {
stmtPgntnMaps
=
new
HashMap
<>();
stmtMaps
.
put
(
"stmtPgntn"
,
stmtPgntnMaps
);
}
if
(
field28C
.
getSequenceNumber
().
equals
(
"1"
)){
stmtPgntnMaps
.
put
(
"lastPgInd"
,
Boolean
.
TRUE
);
}
stmtPgntnMaps
.
put
(
"pgNb"
,
field28C
.
getSequenceNumber
());
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt053001/impl/Camt053001Parse86Field.java
View file @
9d5a3052
package
com
.
brilliance
.
swift
.
mt2mx
.
camt053001
.
impl
;
import
com.brilliance.swift.constants.Mx2MtConstants
;
import
com.brilliance.swift.exception.SwiftException
;
import
com.brilliance.swift.mt2mx.camt053001.AbstractMt2MxCamt053001ParseField
;
import
com.prowidesoftware.swift.model.Tag
;
...
...
@@ -24,7 +25,7 @@ public class Camt053001Parse86Field extends AbstractMt2MxCamt053001ParseField {
for
(
int
i
=
1
;
i
<
tags
.
size
();
i
++)
{
if
(!
tags
.
get
(
i
-
1
).
getName
().
equals
(
"61"
)&&
tags
.
get
(
i
).
getName
().
equals
(
"86"
)){
Field86
field86
=
(
Field86
)
tag86
[
tag86
.
length
-
1
].
asField
();
stmtMaps
.
put
(
"addtlStmtInf"
,
field86
.
getValue
().
replace
(
"\r\n"
,
""
));
stmtMaps
.
put
(
"addtlStmtInf"
,
field86
.
getValue
().
replace
(
Mx2MtConstants
.
NEW_LINE
,
""
));
}
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt054001/impl/Camt054001Parse25Field.java
View file @
9d5a3052
...
...
@@ -37,15 +37,14 @@ public class Camt054001Parse25Field extends AbstractMt2MxCamt054001ParseField {
}
if
(
tag25P
!=
null
){
field25P
=
(
Field25P
)
tag25P
.
asField
();
mt_to_mxAccount35
(
field25P
.
get
Value
(),
acctMaps
,
"Ntfctn/Acct/Id/Othr/Id"
);
mt_to_mxAccount35
(
field25P
.
get
Account
(),
acctMaps
,
"Ntfctn/Acct/Id/Othr/Id"
);
Map
<
String
,
Object
>
ownrMaps
=
new
HashMap
<>();
acctMaps
.
put
(
"ownr"
,
ownrMaps
);
Map
<
String
,
Object
>
idMaps
=
new
HashMap
<>();
ownrMaps
.
put
(
"id"
,
idMaps
);
Map
<
String
,
Object
>
orgIdMaps
=
new
HashMap
<>();
idMaps
.
put
(
"orgId"
,
orgIdMaps
);
String
sendBic
=
(
String
)
context
.
get
(
Mt2MxContextIdentifier
.
MT_SEND_BIC
,
true
);
orgIdMaps
.
put
(
"anyBIC"
,
sendBic
);
orgIdMaps
.
put
(
"anyBIC"
,
field25P
.
getBIC
());
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2element/camt053001/Mx2ElementCamt053001Creator.java
View file @
9d5a3052
...
...
@@ -79,49 +79,6 @@ public class Mx2ElementCamt053001Creator extends AbstractMx2ElementCreator {
}
}
}
if
(
path
.
lastIndexOf
(
"#"
)>
0
){
JSONArray
array
=
(
JSONArray
)
getXmlValue
(
jsonMaps
,
path
.
split
(
"#"
)[
0
],
0
);
String
key
=
path
.
substring
(
path
.
indexOf
(
"#"
)+
1
);
String
fileName
=
"/template/"
+
key
+
".properties"
;
InputStream
resourceAsStream
=
AbstractMx2ElementCreator
.
class
.
getResourceAsStream
(
fileName
);
List
<
String
>
properties
=
StringUtil
.
inputStreamToLines
(
resourceAsStream
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
String
>
keyList
=
new
ArrayList
<>();
List
<
String
>
valueList
=
new
ArrayList
<>();
if
(
properties
.
size
()
>
0
)
{
for
(
String
property
:
properties
)
{
if
(
property
.
startsWith
(
"#"
))
{
continue
;
//过滤注释
}
String
[]
strArr
=
property
.
split
(
"="
);
if
(
strArr
.
length
!=
2
)
{
continue
;
//过滤掉不符合规则的配置
}
String
key1
=
strArr
[
0
];
String
value1
=
strArr
[
1
];
if
(
StringUtil
.
isNotEmpty
(
key1
)&&
StringUtil
.
isNotEmpty
(
value1
)){
keyList
.
add
(
key1
);
valueList
.
add
(
value1
);
}
}
}
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
Map
<
String
,
Object
>
entryMaps
=
new
LinkedHashMap
<>();
for
(
int
j
=
0
;
j
<
valueList
.
size
();
j
++)
{
Object
xmlValue
=
getXmlValue
((
Map
<
String
,
Object
>)
array
.
get
(
i
),
valueList
.
get
(
j
),
0
);
if
(
xmlValue
!=
null
){
entryMaps
.
put
(
keyList
.
get
(
j
),
xmlValue
);
}
}
list
.
add
(
entryMaps
);
}
if
(
list
.
size
()>
0
){
return
list
;
}
else
{
return
null
;
}
//清空ntry中的值将list存入ntry中
}
//获取数据类型,&分隔,默认是string
String
type
=
"string"
;
if
(
path
.
indexOf
(
"&"
)
>
-
1
)
{
...
...
@@ -139,6 +96,50 @@ public class Mx2ElementCamt053001Creator extends AbstractMx2ElementCreator {
for
(
int
i
=
0
;
i
<
paths
.
length
;
i
++)
{
int
j
=
0
;
String
p
=
paths
[
i
];
if
(!
p
.
contains
(
"\\."
)&&
p
.
indexOf
(
"#"
)>
0
){
String
key
=
p
.
split
(
"#"
)[
0
];
System
.
out
.
println
(
tmpMaps
);
JSONArray
array
=
(
JSONArray
)
tmpMaps
.
get
(
key
);
String
fileName
=
"/template/"
+
p
.
split
(
"#"
)[
1
]+
".properties"
;
InputStream
resourceAsStream
=
AbstractMx2ElementCreator
.
class
.
getResourceAsStream
(
fileName
);
List
<
String
>
properties
=
StringUtil
.
inputStreamToLines
(
resourceAsStream
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
String
>
keyList
=
new
ArrayList
<>();
List
<
String
>
valueList
=
new
ArrayList
<>();
if
(
properties
.
size
()
>
0
)
{
for
(
String
property
:
properties
)
{
if
(
property
.
startsWith
(
"#"
))
{
continue
;
//过滤注释
}
String
[]
strArr
=
property
.
split
(
"="
);
if
(
strArr
.
length
!=
2
)
{
continue
;
//过滤掉不符合规则的配置
}
String
key1
=
strArr
[
0
];
String
value1
=
strArr
[
1
];
if
(
StringUtil
.
isNotEmpty
(
key1
)&&
StringUtil
.
isNotEmpty
(
value1
)){
keyList
.
add
(
key1
);
valueList
.
add
(
value1
);
}
}
}
for
(
int
i1
=
0
;
i1
<
array
.
size
();
i1
++)
{
Map
<
String
,
Object
>
entryMaps
=
new
LinkedHashMap
<>();
for
(
int
j1
=
0
;
j1
<
valueList
.
size
();
j1
++)
{
Object
xmlValue
=
getXmlValue
((
Map
<
String
,
Object
>)
array
.
get
(
i1
),
valueList
.
get
(
j1
),
0
);
if
(
xmlValue
!=
null
){
entryMaps
.
put
(
keyList
.
get
(
j1
),
xmlValue
);
}
}
list
.
add
(
entryMaps
);
}
if
(
list
.
size
()>
0
){
return
list
;
}
else
{
return
null
;
}
//清空ntry中的值将list存入ntry中
}
if
(
p
.
contains
(
"("
)&&
p
.
contains
(
")"
)){
JSONArray
array
=
(
JSONArray
)
tmpMaps
.
get
(
p
.
substring
(
0
,
p
.
indexOf
(
"("
)));
String
[]
split
=
p
.
split
(
":"
);
...
...
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