Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
2e50a7d4
Commit
2e50a7d4
authored
Mar 11, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务开始结束时间
parent
bd26a669
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
TaskStateAdapter.java
...rc/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
+5
-0
TaskStatePending.java
...rc/main/java/com/ruoyi/service/impl/TaskStatePending.java
+2
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
View file @
2e50a7d4
...
...
@@ -10,6 +10,7 @@ import com.ruoyi.service.TaskState;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.Objects
;
@Component
...
...
@@ -42,6 +43,10 @@ public abstract class TaskStateAdapter implements TaskState {
if
(
task
.
getPointer
()
+
1
<=
task
.
getMaxPointer
()
)
{
task
.
setPointer
(
task
.
getPointer
()
+
1
);
}
if
(
task
.
getTaskBeginTime
()
==
null
)
{
task
.
setTaskBeginTime
(
new
Date
());
}
taskService
.
updateById
(
task
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStatePending.java
View file @
2e50a7d4
...
...
@@ -17,6 +17,7 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -57,6 +58,7 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
}
else
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_FINISH
);
task
.
setTaskEndTime
(
new
Date
());
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
}
...
...
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