Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
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
胡园园
yanxuan-qc-change-system
Commits
37520635
Commit
37520635
authored
Nov 24, 2022
by
jx-art
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature-changeFlow-221110' into feature-changeFlow-221110
parents
4b564183
880d1e97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
AutoSubmit.java
.../com/netease/mail/yanxuan/change/biz/task/AutoSubmit.java
+13
-7
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/task/AutoSubmit.java
View file @
37520635
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
*/
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
biz
.
task
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
biz
.
task
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -17,12 +18,9 @@ import org.springframework.stereotype.Component;
...
@@ -17,12 +18,9 @@ import org.springframework.stereotype.Component;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.netease.mail.yanxuan.change.biz.biz.ChangeFlowBiz
;
import
com.netease.mail.yanxuan.change.biz.biz.ChangeFlowBiz
;
import
com.netease.mail.yanxuan.change.biz.meta.exception.ExceptionFactory
;
import
com.netease.mail.yanxuan.change.biz.service.ChangeFlowService
;
import
com.netease.mail.yanxuan.change.biz.service.ChangeFlowService
;
import
com.netease.mail.yanxuan.change.common.bean.CommonConstants
;
import
com.netease.mail.yanxuan.change.common.bean.CommonConstants
;
import
com.netease.mail.yanxuan.change.common.bean.ResponseCode
;
import
com.netease.mail.yanxuan.change.common.enums.ChangeFlowEnum
;
import
com.netease.mail.yanxuan.change.common.enums.ChangeFlowEnum
;
import
com.netease.mail.yanxuan.change.common.enums.ChangeStatusEnum
;
import
com.netease.mail.yanxuan.change.common.enums.FlowOperationTypeEnum
;
import
com.netease.mail.yanxuan.change.common.enums.FlowOperationTypeEnum
;
import
com.netease.mail.yanxuan.change.common.util.DateUtils
;
import
com.netease.mail.yanxuan.change.common.util.DateUtils
;
import
com.netease.mail.yanxuan.change.dal.entity.ChangeRecord
;
import
com.netease.mail.yanxuan.change.dal.entity.ChangeRecord
;
...
@@ -51,20 +49,28 @@ public class AutoSubmit extends IJobHandler {
...
@@ -51,20 +49,28 @@ public class AutoSubmit extends IJobHandler {
@Override
@Override
public
ReturnT
<
String
>
execute
(
String
...
strings
)
throws
Exception
{
public
ReturnT
<
String
>
execute
(
String
...
strings
)
throws
Exception
{
log
.
info
(
"AutoSubmit start"
);
log
.
info
(
"AutoSubmit start"
);
// 查询今天时间之前的数据
long
startTime
=
DateUtils
.
getCurrentTime
();
long
currentTime
=
DateUtils
.
getCurrentTime
();
List
<
Long
>
count
=
new
ArrayList
<>
();
Long
entityId
=
0L
;
Long
entityId
=
0L
;
// 查询今天时间之前的数据
try
{
while
(
true
)
{
while
(
true
)
{
List
<
ChangeRecord
>
records
=
changeFlowService
.
getByStatusAndTime
(
entityId
,
ChangeFlowEnum
.
CHANGE_FLOW_EXE
.
getNodeId
(),
List
<
ChangeRecord
>
records
=
changeFlowService
.
getByStatusAndTime
(
entityId
,
ChangeFlowEnum
.
CHANGE_FLOW_EXE
.
getNodeId
(),
ChangeFlowEnum
.
CHANGE_FLOW_CONFIRM
.
getNodeId
(),
curren
tTime
);
ChangeFlowEnum
.
CHANGE_FLOW_CONFIRM
.
getNodeId
(),
star
tTime
);
if
(
CollectionUtils
.
isEmpty
(
records
))
{
if
(
CollectionUtils
.
isEmpty
(
records
))
{
break
;
break
;
}
}
records
.
forEach
(
this
::
progressRecord
);
records
.
forEach
(
this
::
progressRecord
);
List
<
Long
>
idList
=
records
.
stream
().
map
(
ChangeRecord:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
idList
=
records
.
stream
().
map
(
ChangeRecord:
:
getId
).
collect
(
Collectors
.
toList
());
entityId
=
idList
.
stream
().
max
(
Long:
:
compare
).
get
();
entityId
=
idList
.
stream
().
max
(
Long:
:
compare
).
get
();
count
.
addAll
(
idList
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"error on AutoSubmit"
);
}
}
return
null
;
log
.
info
(
"AutoSubmit end, count:{}, maxId:{}, usedTime:{}"
,
count
.
size
(),
entityId
,
DateUtils
.
getCurrentTime
()
-
startTime
);
return
ReturnT
.
SUCCESS
;
}
}
private
void
progressRecord
(
ChangeRecord
changeRecord
)
{
private
void
progressRecord
(
ChangeRecord
changeRecord
)
{
...
...
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