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
8dbeac81
Commit
8dbeac81
authored
Mar 12, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into gaoying
parents
86e82397
354b5c59
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+15
-5
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
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+2
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
8dbeac81
...
@@ -116,7 +116,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -116,7 +116,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
Task
task
=
new
Task
();
Task
task
=
new
Task
();
task
.
setTaskInitiatorId
(
loginUser
.
getUserId
());
task
.
setTaskInitiatorId
(
loginUser
.
getUserId
());
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiator
(
initiator
.
getNickName
());
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
if
(
initiator
.
getDept
()
!=
null
)
{
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
}
task
.
setTaskStatus
(
Task
.
TASK_STATUS_NEW
);
task
.
setTaskStatus
(
Task
.
TASK_STATUS_NEW
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeaderId
(
leader
.
getUserId
());
...
@@ -336,10 +338,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -336,10 +338,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
response
.
setSystemReview
((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
));
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
);
response
.
setSystemReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
if
(
response
.
getCarReviewTaskId
()
!=
null
)
{
response
.
setCarReview
((
double
)
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
));
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
))
*
100
);
response
.
setCarReview
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
}
}
}
return
responses
;
return
responses
;
...
@@ -686,7 +690,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -686,7 +690,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
SystemReviewTask
task
=
new
SystemReviewTask
()
SystemReviewTask
task
=
new
SystemReviewTask
()
.
setTaskNo
(
request
.
getTaskNo
())
.
setTaskNo
(
request
.
getTaskNo
())
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
())
.
setTaskStatus
(
SystemReviewTask
.
STATUS_NEW
)
.
setTaskStatus
(
SystemReviewTask
.
STATUS_NEW
)
.
setLeaderId
(
leader
.
getUserId
())
.
setLeaderId
(
leader
.
getUserId
())
.
setLeader
(
leader
.
getName
())
.
setLeader
(
leader
.
getName
())
...
@@ -696,6 +699,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -696,6 +699,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
.
setStandardNo
(
standard
.
getStandardNo
())
.
setStandardNo
(
standard
.
getStandardNo
())
.
setFile
(
standard
.
getFile
());
.
setFile
(
standard
.
getFile
());
if
(
initiator
.
getDept
()
!=
null
)
{
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
}
systemReviewTaskService
.
save
(
task
);
systemReviewTaskService
.
save
(
task
);
return
task
.
getId
();
return
task
.
getId
();
}
}
...
@@ -708,7 +715,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -708,7 +715,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
CarReviewTask
task
=
new
CarReviewTask
()
CarReviewTask
task
=
new
CarReviewTask
()
.
setTaskNo
(
request
.
getTaskNo
())
.
setTaskNo
(
request
.
getTaskNo
())
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
())
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_NEW
)
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_NEW
)
.
setLeaderId
(
leader
.
getUserId
())
.
setLeaderId
(
leader
.
getUserId
())
.
setLeader
(
leader
.
getName
())
.
setLeader
(
leader
.
getName
())
...
@@ -718,6 +724,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -718,6 +724,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
.
setStandardNo
(
standard
.
getStandardNo
())
.
setStandardNo
(
standard
.
getStandardNo
())
.
setFile
(
standard
.
getFile
());
.
setFile
(
standard
.
getFile
());
if
(
initiator
.
getDept
()
!=
null
)
{
task
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
());
}
carReviewTaskService
.
save
(
task
);
carReviewTaskService
.
save
(
task
);
return
task
.
getId
();
return
task
.
getId
();
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStateAdapter.java
View file @
8dbeac81
...
@@ -10,6 +10,7 @@ import com.ruoyi.service.TaskState;
...
@@ -10,6 +10,7 @@ import com.ruoyi.service.TaskState;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.Objects
;
import
java.util.Objects
;
@Component
@Component
...
@@ -42,6 +43,10 @@ public abstract class TaskStateAdapter implements TaskState {
...
@@ -42,6 +43,10 @@ public abstract class TaskStateAdapter implements TaskState {
if
(
task
.
getPointer
()
+
1
<=
task
.
getMaxPointer
()
)
{
if
(
task
.
getPointer
()
+
1
<=
task
.
getMaxPointer
()
)
{
task
.
setPointer
(
task
.
getPointer
()
+
1
);
task
.
setPointer
(
task
.
getPointer
()
+
1
);
}
}
if
(
task
.
getTaskBeginTime
()
==
null
)
{
task
.
setTaskBeginTime
(
new
Date
());
}
taskService
.
updateById
(
task
);
taskService
.
updateById
(
task
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStatePending.java
View file @
8dbeac81
...
@@ -17,6 +17,7 @@ import org.springframework.context.ApplicationContext;
...
@@ -17,6 +17,7 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -57,6 +58,7 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
...
@@ -57,6 +58,7 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
}
else
{
}
else
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_FINISH
);
task
.
setTaskStatus
(
Task
.
TASK_STATUS_FINISH
);
task
.
setTaskEndTime
(
new
Date
());
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_STATUS_RUNNING
);
}
}
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
8dbeac81
...
@@ -130,6 +130,7 @@
...
@@ -130,6 +130,7 @@
t.task_no,t.task_name,t.task_status,t.name,
t.task_no,t.task_name,t.task_status,t.name,
t.product_model,
t.product_model,
t.standard_no,
t.standard_no,
t.task_list,
t.leader_id,t.leader,
t.leader_id,t.leader,
t.task_begin_time,t.task_end_time
t.task_begin_time,t.task_end_time
FROM t_task t
FROM t_task t
...
@@ -216,6 +217,7 @@
...
@@ -216,6 +217,7 @@
t.task_no,t.task_name,t.task_status,t.name,
t.task_no,t.task_name,t.task_status,t.name,
t.standard_no,
t.standard_no,
t.product_model,
t.product_model,
t.task_list,
t.leader_id,t.leader,
t.leader_id,t.leader,
t.task_begin_time,t.task_end_time
t.task_begin_time,t.task_end_time
FROM t_task t
FROM t_task t
...
...
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