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
9c8f132d
Commit
9c8f132d
authored
Mar 12, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
自动获取第一个样品信息 See merge request
!167
parents
3d40a9f4
a91f3e1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
26 deletions
+28
-26
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+1
-1
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+1
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+26
-24
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
9c8f132d
...
...
@@ -99,7 +99,7 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
List
<
ReviewSceneChangeTask
>
lastChanges
=
reviewSceneChangeTaskService
.
findLastChangeByTaskId
(
carReviewTask
.
getId
());
List
<
TaskSampleRelation
>
sampleRelations
=
taskSampleRelationMapper
.
selectByTaskId
(
taskMapper
.
findByCarReviewTaskId
(
carReviewTask
.
getId
()),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
sampleRelations
.
size
()
-
1
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
carReviewTask
.
setEnterpriseName
(
sample
.
getManufacturingEnterprise
());
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
9c8f132d
...
...
@@ -143,7 +143,7 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
List
<
TaskSampleRelation
>
sampleRelations
=
taskSampleRelationMapper
.
selectByTaskId
(
taskMapper
.
findBySystemReviewTaskId
(
systemReviewTask
.
getId
()),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
sampleRelations
.
size
()
-
1
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
systemReviewTask
.
setEnterpriseName
(
sample
.
getManufacturingEnterprise
());
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
9c8f132d
...
...
@@ -264,37 +264,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
taskUserRelationService
.
saveBatch
(
auditors
);
// 保存关联的整车样品信息
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
)
{
for
(
TaskSampleRelation
sampleRelation
:
relations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
saveBatch
(
relations
);
}
// 保存关联的零部件样品信息
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
)
{
for
(
TaskSampleRelation
partSampleRelation
:
partRelations
)
{
partSampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
saveBatch
(
partRelations
);
}
// 任务样品关系
List
<
TaskSampleRelation
>
sampleRelations
=
taskSampleRelationMapper
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
// 获取之前的第一个企业名称
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
sampleRelations
.
size
()
-
1
);
Sample
oldSample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
// 获取编辑任务后的第一个企业名称
...
...
@@ -316,6 +294,30 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
// 保存关联的整车样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
taskSampleRelationService
.
removeBatchByIds
(
partRelationList
);
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
for
(
TaskSampleRelation
sampleRelation
:
relations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
saveBatch
(
relations
);
}
// 保存关联的零部件样品信息
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
)
{
for
(
TaskSampleRelation
partSampleRelation
:
partRelations
)
{
partSampleRelation
.
setTaskId
(
task
.
getId
());
}
taskSampleRelationService
.
saveBatch
(
partRelations
);
}
}
@Override
...
...
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