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
6ac276fa
Commit
6ac276fa
authored
Jul 04, 2022
by
chengzhuoshen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交公共函数截取地方的警告代码
parent
2d8c7b15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
10 deletions
+47
-10
AbstractMx2MtTagsGenerate.java
...com/brilliance/swift/mx2mt/AbstractMx2MtTagsGenerate.java
+47
-10
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2mt/AbstractMx2MtTagsGenerate.java
View file @
6ac276fa
...
...
@@ -153,7 +153,10 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
list
.
add
(
tmpCode
);
String
remainTxt
=
instructionInformation
.
replace
(
"/"
+
chqbCode
+
"/"
+
tmpCodeText
,
""
);
if
(
remainTxt
.
length
()
>
30
)
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
if
(
remainTxt
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
remainTxt
);
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
}
if
(
chqbCode
.
equals
(
code
))
{
list
.
add
(
code
);
}
else
{
...
...
@@ -176,9 +179,16 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
tmpCodeText
=
instructionInformation
.
substring
(
firstIndexOf
+
6
,
lastIndexOf
);
}
String
remainTxt
=
instructionInformation
.
replace
(
"/"
+
holdCode
+
"/"
+
tmpCodeText
,
""
);
if
(
tmpCodeText
.
length
()
>
30
)
tmpCodeText
=
tmpCodeText
.
substring
(
0
,
29
)
+
"+"
;
if
(
tmpCodeText
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
tmpCodeText
);
tmpCodeText
=
tmpCodeText
.
substring
(
0
,
29
)
+
"+"
;
}
list
.
add
(
tmpCode
+
"/"
+
tmpCodeText
);
if
(
remainTxt
.
length
()
>
30
)
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
if
(
remainTxt
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
remainTxt
);
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
}
if
(
chqbCode
.
equals
(
code
))
{
list
.
add
(
code
);
}
else
{
...
...
@@ -202,7 +212,10 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
list
.
add
(
tmpCode
);
String
remainTxt
=
instructionInformation
.
replace
(
"/"
+
phobCode
+
"/"
+
tmpCodeText
,
""
);
if
(
remainTxt
.
length
()
>
30
)
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
if
(
remainTxt
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
remainTxt
);
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
}
if
(
chqbCode
.
equals
(
code
))
{
list
.
add
(
code
);
}
else
{
...
...
@@ -226,7 +239,10 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
list
.
add
(
tmpCode
);
String
remainTxt
=
instructionInformation
.
replace
(
"/"
+
telbCode
+
"/"
+
tmpCodeText
,
""
);
if
(
remainTxt
.
length
()
>
30
)
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
if
(
remainTxt
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
remainTxt
);
remainTxt
=
remainTxt
.
substring
(
0
,
29
)
+
"+"
;
}
if
(
chqbCode
.
equals
(
code
))
{
list
.
add
(
code
);
}
else
{
...
...
@@ -276,7 +292,10 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
else
{
codeText
=
instructionInformation
.
substring
(
firstIndex
,
lastIndexOf
);
}
if
(
codeText
.
length
()
>
30
)
codeText
=
codeText
.
substring
(
0
,
29
)
+
"+"
;
if
(
codeText
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
codeText
);
codeText
=
codeText
.
substring
(
0
,
29
)
+
"+"
;
}
list
.
add
(
holdCode
+
"/"
+
codeText
);
}
int
phobCodeIndex
=
instructionInformation
.
indexOf
(
"/"
+
phobCode
+
"/"
);
...
...
@@ -289,14 +308,20 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
else
{
codeText
=
instructionInformation
.
substring
(
firstIndex
,
lastIndexOf
);
}
if
(
codeText
.
length
()
>
30
)
codeText
=
codeText
.
substring
(
0
,
29
)
+
"+"
;
if
(
codeText
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
codeText
);
codeText
=
codeText
.
substring
(
0
,
29
)
+
"+"
;
}
list
.
add
(
phobCode
+
"/"
+
codeText
);
}
int
telbCodeIndex
=
instructionInformation
.
indexOf
(
"/"
+
telbCode
+
"/"
);
if
(
telbCodeIndex
>
-
1
)
{
int
firstIndex
=
phobCodeIndex
+
6
;
String
codeText
=
instructionInformation
.
substring
(
firstIndex
);
if
(
codeText
.
length
()
>
30
)
codeText
=
codeText
.
substring
(
0
,
29
)
+
"+"
;
if
(
codeText
.
length
()
>
30
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
codeText
);
codeText
=
codeText
.
substring
(
0
,
29
)
+
"+"
;
}
list
.
add
(
telbCode
+
"/"
+
codeText
);
}
return
list
;
...
...
@@ -883,20 +908,27 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
mtLei
=
leiPrefix
+
countryCode
+
"/LEIC"
+
mxLei
;
}
if
(
addressLineCount
>=
3
)
{
if
(
mxName
.
length
()
>
33
)
mxName
=
"1/"
+
mxName
.
substring
(
0
,
32
)
+
"+"
;
if
(
mxName
.
length
()
>
33
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxName
);
mxName
=
"1/"
+
mxName
.
substring
(
0
,
32
)
+
"+"
;
}
mtNameAddress
=
mxName
+
Mx2MtConstants
.
NEW_LINE
+
XmlUtil
.
getXmlNodeValue
(
document
,
partyPath
+
".PstlAdr.AdrLine("
+
0
+
")"
)
+
Mx2MtConstants
.
NEW_LINE
+
XmlUtil
.
getXmlNodeValue
(
document
,
partyPath
+
".PstlAdr.AdrLine("
+
1
+
")"
)
+
Mx2MtConstants
.
NEW_LINE
+
XmlUtil
.
getXmlNodeValue
(
document
,
partyPath
+
".PstlAdr.AdrLine("
+
2
+
")"
);
}
else
if
(
addressLineCount
==
2
){
if
(
StringUtil
.
isNotEmpty
(
mtLei
))
{
if
(
mxName
.
length
()
>
33
)
mxName
=
"1/"
+
mxName
.
substring
(
0
,
32
)
+
"+"
;
if
(
mxName
.
length
()
>
33
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxName
);
mxName
=
"1/"
+
mxName
.
substring
(
0
,
32
)
+
"+"
;
}
mtNameAddress
=
mxName
+
Mx2MtConstants
.
NEW_LINE
+
XmlUtil
.
getXmlNodeValue
(
document
,
partyPath
+
".PstlAdr.AdrLine("
+
0
+
")"
)
+
Mx2MtConstants
.
NEW_LINE
+
XmlUtil
.
getXmlNodeValue
(
document
,
partyPath
+
".PstlAdr.AdrLine("
+
1
+
")"
)
+
Mx2MtConstants
.
NEW_LINE
+
mtLei
;
}
else
{
if
(
mxName
.
length
()
>
66
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxName
);
mxName
=
"1/"
+
mxName
.
substring
(
0
,
33
)
+
Mx2MtConstants
.
NEW_LINE
+
"1/"
+
mxName
.
substring
(
33
,
65
)
+
"+"
;
}
else
if
(
mxName
.
length
()
>
33
)
{
...
...
@@ -911,6 +943,7 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
}
else
{
//addressLineCount == 1
if
(
mxName
.
length
()
>
66
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxName
);
mxName
=
"1/"
+
mxName
.
substring
(
0
,
33
)
+
Mx2MtConstants
.
NEW_LINE
+
"1/"
+
mxName
.
substring
(
33
,
65
)
+
"+"
;
}
else
if
(
mxName
.
length
()
>
33
)
{
...
...
@@ -1062,6 +1095,7 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
int
maxNameLength
=
35
-
mxCodeLength
+
33
;
if
(
StringUtil
.
isNotEmpty
(
mxCountryCode
))
{
if
(
mxName
.
length
()
>
maxCCNameLength
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxName
);
mtAgent
=
mxName
.
substring
(
0
,
maxCCNameLength
-
1
)
+
"+"
;
}
else
{
if
(
StringUtil
.
isNotEmpty
(
mxTownName
))
{
...
...
@@ -1072,6 +1106,7 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
}
else
{
if
(
mxName
.
length
()
>
maxNameLength
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxName
);
mtAgent
=
mxName
.
substring
(
0
,
maxNameLength
-
1
)
+
"+"
;
}
else
{
mtAgent
=
mxName
;
...
...
@@ -1111,6 +1146,7 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
}
if
(
StringUtil
.
isNotEmpty
(
mtAgent
))
{
if
(
mtAgent
.
length
()
>
maxLength
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mtAgent
);
mtAgent
=
mtAgent
.
substring
(
0
,
maxLength
-
1
)
+
"+"
;
}
}
...
...
@@ -2017,6 +2053,7 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
return
Mx2MtConstants
.
MX_TO_MT_DEFAULT_VALUE
;
}
if
(
mxId
.
length
()
>
16
)
{
buildSTErrorInfo
(
ERROR
.
T0000T
,
null
,
mxId
);
mxId
=
mxId
.
substring
(
0
,
15
)
+
"+"
;
}
String
mtId
=
mxId
;
...
...
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