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
6df6ef3d
Commit
6df6ef3d
authored
Jun 26, 2023
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改的errorcode
parent
e246d27b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
32 deletions
+42
-32
AbstractMt2MxParseField.java
...a/com/brilliance/swift/mt2mx/AbstractMt2MxParseField.java
+22
-2
Camt056001Parse11SField.java
.../swift/mt2mx/camt056001/impl/Camt056001Parse11SField.java
+10
-0
Field71AGenerate.java
...m/brilliance/swift/mx2mt/mt103/impl/Field71AGenerate.java
+5
-1
Field11SGenerate.java
...rilliance/swift/mx2mt/mt192292/impl/Field11SGenerate.java
+3
-0
Field21Generate.java
...brilliance/swift/mx2mt/mt192292/impl/Field21Generate.java
+1
-1
Field50aGenerate.java
...rilliance/swift/mx2mt/mt900910/impl/Field50aGenerate.java
+1
-1
ErrorCodeList.xlsx
swiftCore/src/main/resources/ErrorCodeList.xlsx
+0
-0
MxPacs004001_full.xml
swiftCore/src/main/resources/swiftXml/MxPacs004001_full.xml
+0
-27
No files found.
swiftCore/src/main/java/com/brilliance/swift/mt2mx/AbstractMt2MxParseField.java
View file @
6df6ef3d
...
...
@@ -165,7 +165,8 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
MapUtil
.
puts
(
maps
,
"id/othr/id"
,
mtAccount
.
substring
(
4
));
MapUtil
.
puts
(
maps
,
"id/othr/schmeNm/cd"
,
"CUID"
);
}
else
if
(
mtAccount
.
length
()
>
34
)
{
buildSTErrorInfo
(
116
,
path
,
null
);
buildSTErrorInfo
(
116
,
path
,
mtAccount
);
buildSTErrorInfo
(
12
,
path
,
mtAccount
);
MapUtil
.
puts
(
maps
,
"id/othr/id"
,
mtAccount
.
substring
(
0
,
33
)
+
"+"
);
}
else
{
if
(
SwiftTransferUtil
.
checkIbanAccount
(
mtAccount
))
{
...
...
@@ -982,7 +983,9 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
String
mtIssuer
=
""
;
String
mtId
=
""
;
boolean
flagOrgId
=
false
;
boolean
flagPrivID
=
false
;
String
mxOrgSchemeCode
=
""
;
String
mXPrivSchemeCode
=
""
;
if
(
"CUST"
.
equals
(
mtFATFCode
)
||
"EMPL"
.
equals
(
mtFATFCode
)
||
"DRLC"
.
equals
(
mtFATFCode
))
{
mtCountry
=
mtFATFId
.
substring
(
0
,
2
);
String
regex
=
"(.*)/(.*)"
;
...
...
@@ -1005,6 +1008,17 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
flagOrgId
=
true
;
}
}
if
(
mtIssuer
.
length
()
>
4
&&
"CUST"
.
equals
(
mtFATFCode
))
{
PersonIdentificationCode
code
=
SwiftTransferUtil
.
getPersonIdentificationCodeByCode
(
mtIssuer
.
substring
(
0
,
4
));
if
(
code
!=
null
&&
!
PersonIdentificationCode
.
CUST
.
equals
(
code
)
&&
!
PersonIdentificationCode
.
TXID
.
equals
(
code
)
&&
!
PersonIdentificationCode
.
EMPL
.
equals
(
code
))
{
mXPrivSchemeCode
=
code
.
value
();
mtIssuer
=
mtIssuer
.
substring
(
5
);
flagPrivID
=
true
;
}
}
}
else
{
mtId
=
mtFATFId
.
substring
(
3
);
}
...
...
@@ -1043,7 +1057,7 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
||
PersonIdentificationCode
.
NIDN
.
value
().
equals
(
mtFATFCode
)
||
PersonIdentificationCode
.
SOSE
.
value
().
equals
(
mtFATFCode
)
||
PersonIdentificationCode
.
TXID
.
value
().
equals
(
mtFATFCode
)
||
(
PersonIdentificationCode
.
CUST
.
value
().
equals
(
mtFATFCode
)
&&
!
flagOrgId
))
{
||
(
PersonIdentificationCode
.
CUST
.
value
().
equals
(
mtFATFCode
)
&&
!
flagOrgId
&&!
flagPrivID
))
{
Map
<
String
,
Object
>
othrMaps
=
new
HashMap
<
String
,
Object
>();
MapUtil
.
adds
(
prvtIdMaps
,
"othr"
,
othrMaps
);
MapUtil
.
puts
(
othrMaps
,
"schmeNm/cd"
,
mtFATFCode
);
...
...
@@ -1055,6 +1069,12 @@ public abstract class AbstractMt2MxParseField implements Mt2MxParseField {
MapUtil
.
puts
(
othrMaps
,
"schmeNm/cd"
,
mxOrgSchemeCode
);
othrMaps
.
put
(
"id"
,
mtId
);
othrMaps
.
put
(
"issr"
,
mxIssuer
);
}
else
if
(
PersonIdentificationCode
.
CUST
.
value
().
equals
(
mtFATFCode
)
&&
flagPrivID
)
{
Map
<
String
,
Object
>
othrMaps
=
new
HashMap
<
String
,
Object
>();
MapUtil
.
adds
(
prvtIdMaps
,
"othr"
,
othrMaps
);
MapUtil
.
puts
(
othrMaps
,
"schmeNm/cd"
,
mXPrivSchemeCode
);
othrMaps
.
put
(
"id"
,
mtId
);
othrMaps
.
put
(
"issr"
,
mxIssuer
);
}
if
(
orgIdMaps
.
size
()
>
0
)
{
maps
.
put
(
"orgId"
,
orgIdMaps
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mt2mx/camt056001/impl/Camt056001Parse11SField.java
View file @
6df6ef3d
...
...
@@ -8,6 +8,9 @@ import com.prowidesoftware.swift.model.Tag;
import
com.prowidesoftware.swift.model.field.Field11S
;
import
com.prowidesoftware.swift.model.mt.AbstractMT
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
//这个域的作用就是将原始消息的名称和原始消息的创建时间存入map集合
public
class
Camt056001Parse11SField
extends
AbstractMt2MxCamt056001ParseField
{
...
...
@@ -19,6 +22,13 @@ public class Camt056001Parse11SField extends AbstractMt2MxCamt056001ParseField {
Tag
tag11S
=
swiftMessage
.
getBlock4
().
getTagByName
(
NAME
);
if
(
tag11S
!=
null
)
{
Field11S
field11S
=
(
Field11S
)
tag11S
.
asField
();
String
mtType
=
field11S
.
getMT
();
Pattern
r
=
Pattern
.
compile
(
"[1,2]0[0-9]"
);
Matcher
m
=
r
.
matcher
(
mtType
);
if
(!
m
.
matches
()){
buildSTErrorInfo
(
122
,
"Block4:11S:"
,
mtType
);
return
;
}
//TR003
MapUtil
.
puts
(
txInfMaps
,
"orgnlGrpInf/orgnlMsgNmId"
,
getMxType
(
field11S
.
getMT
()));
//TR001
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt103/impl/Field71AGenerate.java
View file @
6df6ef3d
...
...
@@ -51,8 +51,12 @@ public class Field71AGenerate extends AbstractMx2MtTagsGenerate {
String
intrBkSttlmAmtCcy
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"CdtTrfTxInf.IntrBkSttlmAmt@Ccy"
);
BigDecimal
sumAmt
=
BigDecimal
.
ZERO
;
for
(
int
i
=
0
;
i
<
chrgsInfCount
;
i
++)
{
BigDecimal
tmpAmt
=
new
BigDecimal
(
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"CdtTrfTxInf.ChrgsInf("
+
i
+
").Amt"
));
if
(
tmpAmt
.
equals
(
BigDecimal
.
ZERO
)){
buildSTErrorInfo
(
121
,
"Block4/:"
+
name_G
+
":"
,
null
);
return
;
}
if
(
intrBkSttlmAmtCcy
.
equals
(
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"CdtTrfTxInf.ChrgsInf("
+
i
+
").Amt@Ccy"
)))
{
BigDecimal
tmpAmt
=
new
BigDecimal
(
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"CdtTrfTxInf.ChrgsInf("
+
i
+
").Amt"
));
sumAmt
=
sumAmt
.
add
(
tmpAmt
);
}
else
{
buildSTErrorInfo
(
39
,
"Block4/:"
+
name_G
+
":"
,
null
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field11SGenerate.java
View file @
6df6ef3d
...
...
@@ -54,6 +54,9 @@ public class Field11SGenerate extends AbstractMx2MtTagsGenerate {
throw
new
SwiftException
(
e
.
getMessage
());
}
}
if
(
"991231"
.
equals
(
mtDate
)){
buildSTErrorInfo
(
119
,
"Block4/:11S:"
,
mtDate
);
}
if
(
StringUtil
.
isNotEmpty
(
mtNumber
))
{
tags
.
add
(
new
Tag
(
name
,
mtNumber
+
Mx2MtConstants
.
NEW_LINE
+
mtDate
));
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt192292/impl/Field21Generate.java
View file @
6df6ef3d
...
...
@@ -28,7 +28,7 @@ public class Field21Generate extends AbstractMx2MtTagsGenerate {
}
}
if
(
StringUtil
.
isEmpty
(
orgnlInstrId
)
||
(
orgnlInstrId
.
startsWith
(
"/"
)
||
orgnlInstrId
.
endsWith
(
"/"
)
||
orgnlInstrId
.
contains
(
"//"
)))
{
buildSTErrorInfo
(
73
,
"Block4/:21:"
,
orgnlInstrId
);
buildSTErrorInfo
(
42
,
"Block4/:21:"
,
orgnlInstrId
);
orgnlInstrId
=
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
}
tags
.
add
(
new
Tag
(
name
,
orgnlInstrId
));
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt900910/impl/Field50aGenerate.java
View file @
6df6ef3d
...
...
@@ -111,7 +111,7 @@ public class Field50aGenerate extends AbstractMx2MtTagsGenerate {
}
tags
.
add
(
new
Tag
(
name_K
,
value
));
}
else
{
buildSTErrorInfo
(
113
,
"Block4/50a"
,
null
);
buildSTErrorInfo
(
34
,
"Block4/50a"
,
null
);
if
(
StringUtil
.
isNotEmpty
(
account
))
{
value
=
account
+
Mx2MtConstants
.
NEW_LINE
+
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
}
else
{
...
...
swiftCore/src/main/resources/ErrorCodeList.xlsx
View file @
6df6ef3d
No preview for this file type
swiftCore/src/main/resources/swiftXml/MxPacs004001_full.xml
View file @
6df6ef3d
...
...
@@ -162,15 +162,6 @@ Change Log
</Pty>
</UltmtDbtr>
<Dbtr>
<Pty>
<Nm>
testName2
</Nm>
<PstlAdr>
<Ctry>
US
</Ctry>
<AdrLine>
line1
</AdrLine>
<AdrLine>
line2
</AdrLine>
<AdrLine>
line3
</AdrLine>
</PstlAdr>
</Pty>
<Agt>
<FinInstnId>
<BICFI>
BOFSGB2L
</BICFI>
...
...
@@ -245,24 +236,6 @@ Change Log
</BrnchId>
</CdtrAgt>
<Cdtr>
<Pty>
<Nm>
test Nm
</Nm>
<PstlAdr>
<Ctry>
US
</Ctry>
<AdrLine>
line567
</AdrLine>
<AdrLine>
line568
</AdrLine>
<AdrLine>
line569
</AdrLine>
</PstlAdr>
<Id>
<OrgId>
<AnyBIC>
CHASUS33
</AnyBIC>
<Othr>
<Id>
TID
</Id>
</Othr>
</OrgId>
</Id>
<CtryOfRes>
US
</CtryOfRes>
</Pty>
<Agt>
<FinInstnId>
<BICFI>
CLYDGB2S
</BICFI>
...
...
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