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
b9641c30
Commit
b9641c30
authored
Mar 07, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑任务
parent
35c7511d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+7
-16
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
b9641c30
...
@@ -283,31 +283,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -283,31 +283,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
// 获取之前的第一个企业名称
// 获取之前的第一个企业名称
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
s
ample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
Sample
oldS
ample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
// 获取编辑任务后的第一个企业名称
// 获取编辑任务后的第一个企业名称
TaskSampleRelation
taskSampleRelation1
=
relations
.
get
(
0
);
TaskSampleRelation
newTaskSampleRelation
=
relations
.
get
(
0
);
Sample
sample1
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation1
.
getSampleId
());
Sample
newSample
=
sampleManagementMapper
.
selectSampleManagementById
(
newTaskSampleRelation
.
getSampleId
());
// 第一个企业名称不相同则修改
// 第一个企业名称不相同则修改
if
(!
Objects
.
equals
(
sample
.
getManufacturingEnterprise
(),
sample1
.
getManufacturingEnterprise
())){
if
(!
Objects
.
equals
(
oldSample
.
getManufacturingEnterprise
(),
newSample
.
getManufacturingEnterprise
())){
Task
task1
=
taskMapper
.
selectById
(
request
.
getId
());
// 留档文件
// 体系审查对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
request
.
getId
());
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getSystemReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
:
reviewEnterpriseArchiveList
)
{
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
:
reviewEnterpriseArchiveList
)
{
reviewEnterpriseArchive
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
reviewEnterpriseArchive
.
setEnterpriseName
(
newSample
.
getManufacturingEnterprise
());
}
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList
);
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList
);
// 车辆对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList1
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getCarReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive1
:
reviewEnterpriseArchiveList1
)
{
reviewEnterpriseArchive1
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList1
);
}
}
}
}
}
}
...
...
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