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
5de4250c
Commit
5de4250c
authored
Mar 04, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方法复用
parent
baf324b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
42 deletions
+54
-42
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+54
-42
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
5de4250c
...
...
@@ -302,25 +302,24 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
TaskGetInfoResponse
response
=
new
TaskGetInfoResponse
();
Task
task
=
taskService
.
getById
(
request
.
getId
());
if
(
task
!=
null
)
{
BeanUtils
.
copyBeanProp
(
response
,
task
);
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
request
.
getId
(
));
response
.
setAuditors
(
relation
);
response
.
setAuditors
(
setAuditors
(
request
.
getId
()
));
// 整车样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
relationList
.
size
()
!=
0
&&
relationList
!=
null
)
{
List
<
Sample
>
completeVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
);
response
.
setCompleteVehicleSample
(
completeVehicleSampleList
);
}
response
.
setCompleteVehicleSample
(
setSampleList
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
));
// 零部件样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
);
if
(
partRelationList
.
size
()
!=
0
&&
partRelationList
!=
null
)
{
List
<
Sample
>
partVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
partRelationList
);
response
.
setPartVehicleSample
(
partVehicleSampleList
);
}
response
.
setPartVehicleSample
(
setSampleList
(
request
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
));
return
response
;
}
else
{
return
null
;
}
}
@Override
...
...
@@ -408,22 +407,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
if
(
task
!=
null
&&
task
.
getId
()
!=
null
)
{
BeanUtils
.
copyBeanProp
(
response
,
task
);
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
task
.
getId
(
));
response
.
setAuditors
(
relation
);
response
.
setAuditors
(
setAuditors
(
task
.
getId
()
));
// 整车样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
task
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
relationList
.
size
()
!=
0
&&
relationList
!=
null
)
{
List
<
Sample
>
completeVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
);
response
.
setCompleteVehicleSample
(
completeVehicleSampleList
);
}
response
.
setCompleteVehicleSample
(
setSampleList
(
task
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
));
// 零部件样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
task
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
);
if
(
partRelationList
.
size
()
!=
0
&&
partRelationList
!=
null
)
{
List
<
Sample
>
partVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
partRelationList
);
response
.
setPartVehicleSample
(
partVehicleSampleList
);
}
response
.
setPartVehicleSample
(
setSampleList
(
task
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
));
return
response
;
}
else
{
return
null
;
...
...
@@ -436,25 +429,44 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
public
TaskGetInfoResponse
getBySubtaskId
(
TaskSubGetInfoRequest
request
)
{
TaskGetInfoResponse
response
=
new
TaskGetInfoResponse
();
Task
task
=
taskMapper
.
getBySubtaskId
(
request
.
getId
());
if
(
task
!=
null
)
{
BeanUtils
.
copyBeanProp
(
response
,
task
);
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
task
.
getId
(
));
response
.
setAuditors
(
relation
);
response
.
setAuditors
(
setAuditors
(
task
.
getId
()
));
// 整车样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
task
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
relationList
.
size
()
!=
0
&&
relationList
!=
null
)
{
List
<
Sample
>
completeVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
);
response
.
setCompleteVehicleSample
(
completeVehicleSampleList
);
}
response
.
setCompleteVehicleSample
(
setSampleList
(
task
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
));
// 零部件样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
task
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
);
if
(
partRelationList
.
size
()
!=
0
&&
partRelationList
!=
null
)
{
List
<
Sample
>
partVehicleSampleList
=
sampleManagementMapper
.
findByIdList
(
partRelationList
);
response
.
setPartVehicleSample
(
partVehicleSampleList
);
}
response
.
setPartVehicleSample
(
setSampleList
(
task
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
));
return
response
;
}
else
{
return
null
;
}
}
public
List
<
TaskUserRelation
>
setAuditors
(
Long
id
)
{
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
id
);
return
relation
;
}
public
List
<
Sample
>
setSampleList
(
Long
id
,
String
type
)
{
// 样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
id
,
type
);
if
(
relationList
.
size
()
!=
0
&&
relationList
!=
null
)
{
List
<
Sample
>
SampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
);
return
SampleList
;
}
else
{
return
null
;
}
}
public
Long
saveSystemReview
(
TaskCreateRequest
request
,
SysUser
initiator
,
Standard
standard
,
TaskUserRelation
leader
)
{
...
...
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