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
6db5389f
Commit
6db5389f
authored
Mar 06, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
编辑暂存任务&创建任务 See merge request
!129
parents
8f3c0eda
726a2fdf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+1
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+6
-3
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
6db5389f
...
...
@@ -18,7 +18,7 @@ public interface TaskService extends IService<Task> {
*/
List
<
Task
>
findList
(
TaskListRequest
request
);
void
createTask
(
TaskCreateRequest
request
);
void
createTask
(
TaskCreateRequest
request
,
Long
userId
);
/**
* 查询进行中的任务
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
6db5389f
...
...
@@ -92,7 +92,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
@Override
public
void
createTask
(
TaskCreateRequest
request
)
{
public
void
createTask
(
TaskCreateRequest
request
,
Long
userId
)
{
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
...
...
@@ -167,6 +167,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
TaskGetInfoResponse
temporaryStorageTask
=
taskService
.
getByUserId
(
userId
);
taskMapper
.
deleteById
(
temporaryStorageTask
.
getId
());
}
@Override
...
...
@@ -492,7 +495,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 保存关联的整车样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
PART
_VEHICLE_SAMPLE
);
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE
_VEHICLE_SAMPLE
);
taskSampleRelationService
.
removeBatchByIds
(
partRelationList
);
List
<
TaskSampleRelation
>
relations
=
request
.
getSample
();
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
...
...
@@ -504,7 +507,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
// 保存关联的零部件样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE
_VEHICLE_SAMPLE
);
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
PART
_VEHICLE_SAMPLE
);
taskSampleRelationService
.
removeBatchByIds
(
relationList
);
List
<
TaskSampleRelation
>
partRelations
=
request
.
getPartSample
();
if
(
partRelations
.
size
()
!=
0
&&
partRelations
!=
null
)
{
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
6db5389f
...
...
@@ -58,7 +58,7 @@ public class TaskController extends BaseController {
@Log
(
title
=
"总任务"
,
businessType
=
BusinessType
.
INSERT
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
public
R
<
String
>
createTask
(
@Validated
@RequestBody
TaskCreateRequest
request
)
{
taskService
.
createTask
(
request
);
taskService
.
createTask
(
request
,
getUserId
()
);
return
R
.
ok
();
}
...
...
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