Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5b731da3
authored
Sep 26, 2023
by
tiger
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
清理执行次数
1 parent
fe0e451c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/impl/SopInstExecuteJobHandler.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopService.java
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/impl/SopInstExecuteJobHandler.java
View file @
5b731da
...
...
@@ -31,11 +31,10 @@ public class SopInstExecuteJobHandler {
SopStruct
sop
=
sopService
.
loadSop
(
instId
);
// 创建执行批次
SopInstBatch
batch
=
sopService
.
createBatch
(
sop
.
getInst
());
sop
.
setBatch
(
batch
);
// 重置节点执行次数
sopService
.
resetNodeDailyCount
(
sop
);
if
(
sop
.
getInst
().
getInstStatus
()
==
1
)
{
SopInstBatch
batch
=
sopService
.
createBatch
(
sop
.
getInst
());
sop
.
setBatch
(
batch
);
}
// 创建所有节点任务
SopXxlJobUtil
.
initSopNodesJob
(
sop
);
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/service/SopService.java
View file @
5b731da
...
...
@@ -176,6 +176,9 @@ public class SopService {
instMapper
.
updateInstBatchNo
(
sopInst
.
getInstId
(),
batch
.
getBatchNo
(),
batch
.
getSnapshot
());
// 重置节点执行次数
instNodeMapper
.
resetInstNodeDailyCount
(
sopInst
.
getInstId
());
return
batch
;
}
...
...
@@ -202,13 +205,15 @@ public class SopService {
instBatchMapper
.
updateByPrimaryKey
(
batch
);
}
// 过期机制
if
(
sopInst
.
getExpireTime
()
!=
null
&&
sopInst
.
getExpireTime
().
before
(
new
Date
()))
{
sopInst
.
setInstStatus
((
byte
)
-
1
);
}
instMapper
.
updateByPrimaryKey
(
sopInst
);
// 更新快照
instNodeMapper
.
updateByPrimaryKey
(
node
);
// 更新执行次数
}
public
void
resetNodeDailyCount
(
SopStruct
sop
)
{
instNodeMapper
.
resetInstNodeDailyCount
(
sop
.
getInst
().
getInstId
());
}
/** 从实例倒推出模板,主要用于开发阶段 */
@Transactional
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment