Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
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
reyun
manager
Commits
a96649e9
Commit
a96649e9
authored
4 years ago
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同编号格式化取数字bugfix
parent
39d0bf62
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
TrackingFlowTask.java
src/main/java/track/task/TrackingFlowTask.java
+4
-3
StringUtil.java
src/main/java/util/StringUtil.java
+17
-0
No files found.
src/main/java/track/task/TrackingFlowTask.java
View file @
a96649e9
...
...
@@ -15,6 +15,7 @@ import tkio.repository.AccountRepository;
import
tkio.repository.AppRepository
;
import
tkio.service.AccountFlowRestrictService
;
import
util.DateUtil
;
import
util.StringUtil
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
...
...
@@ -55,7 +56,6 @@ public class TrackingFlowTask {
tkioFlowRepository
.
deleteByEmail
(
calculationFlow
.
getEmail
());
String
email
=
calculationFlow
.
getEmail
();
//查询用户下所有appkey
try
{
Account
account
=
accountRepository
.
findByEmail
(
email
);
List
<
Account
>
accountList
=
accountRepository
.
findByRootParent
(
account
.
getRootParent
());
...
...
@@ -325,8 +325,9 @@ public class TrackingFlowTask {
contractsArray
[
j
]
=
contractsArray
[
j
+
1
];
contractsArray
[
j
+
1
]
=
temp
;
}
else
if
(
DateUtil
.
getDate
(
contractsArray
[
j
].
getStartDate
()).
getTime
()
==
DateUtil
.
getDate
(
contractsArray
[
j
+
1
].
getStartDate
()).
getTime
()){
String
contractCode
=
contractsArray
[
j
].
getContractCode
().
replaceAll
(
"BJ-TKIO-"
,
""
).
replaceAll
(
"-"
,
""
);
String
contractCodeMin
=
contractsArray
[
j
+
1
].
getContractCode
().
replaceAll
(
"BJ-TKIO-"
,
""
).
replaceAll
(
"-"
,
""
);
String
contractCode
=
StringUtil
.
matchNumber
(
contractsArray
[
j
].
getContractCode
());
String
contractCodeMin
=
StringUtil
.
matchNumber
(
contractsArray
[
j
+
1
].
getContractCode
());
if
(
Long
.
valueOf
(
contractCode
)>
Long
.
valueOf
(
contractCodeMin
)){
Contract
temp
=
contractsArray
[
j
];
contractsArray
[
j
]
=
contractsArray
[
j
+
1
];
...
...
This diff is collapsed.
Click to expand it.
src/main/java/util/StringUtil.java
View file @
a96649e9
...
...
@@ -302,4 +302,21 @@ public class StringUtil {
return
resultList
;
}
/**
* 功能描述:
* @author liyin
* @date 2020/10/30
*/
public
static
String
matchNumber
(
String
str
)
{
str
=
str
.
trim
();
String
str2
=
""
;
if
(
str
!=
null
&&
!
""
.
equals
(
str
))
{
for
(
int
i
=
0
;
i
<
str
.
length
();
i
++)
{
if
(
str
.
charAt
(
i
)
>=
48
&&
str
.
charAt
(
i
)
<=
57
)
{
str2
+=
str
.
charAt
(
i
);
}
}
}
return
str2
;
}
}
This diff is collapsed.
Click to expand it.
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