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
40a0e8b1
Commit
40a0e8b1
authored
Feb 28, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标准库查询参数修改&检查编辑任务时第一个样品信息对应的生成企业有无变化
parent
02ee576c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
7 deletions
+44
-7
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+43
-6
StandardGetInfoRequest.java
...in/java/com/ruoyi/web/request/StandardGetInfoRequest.java
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
40a0e8b1
...
@@ -66,6 +66,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -66,6 +66,15 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
@Autowired
@Autowired
private
SampleManagementMapper
sampleManagementMapper
;
private
SampleManagementMapper
sampleManagementMapper
;
@Autowired
private
TaskSampleRelationMapper
taskSampleRelationMapper
;
@Autowired
private
ReviewEnterpriseArchiveMapper
reviewEnterpriseArchiveMapper
;
@Autowired
private
ReviewEnterpriseArchiveService
reviewEnterpriseArchiveService
;
@Override
@Override
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
...
@@ -198,27 +207,55 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
...
@@ -198,27 +207,55 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
taskUserRelationService
.
saveBatch
(
auditors
);
taskUserRelationService
.
saveBatch
(
auditors
);
// 保存关联的整车样品信息
// 保存关联的整车样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
taskSampleRelationService
.
removeBatchByIds
(
relationList
);
List
<
TaskSampleRelation
>
relations
=
request
.
getSample
();
List
<
TaskSampleRelation
>
relations
=
request
.
getSample
();
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
if
(
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
for
(
TaskSampleRelation
sampleRelation
:
relations
)
{
for
(
TaskSampleRelation
sampleRelation
:
relations
)
{
sampleRelation
.
setTaskId
(
task
.
getId
());
sampleRelation
.
setTaskId
(
task
.
getId
());
}
}
taskSampleRelationService
.
saveBatch
(
relations
);
taskSampleRelationService
.
updateBatchById
(
relations
);
}
// 任务样品关系
List
<
TaskSampleRelation
>
sampleRelations
=
taskSampleRelationMapper
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
// 获取之前的第一个企业名称
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
// 获取编辑任务后的第一个企业名称
TaskSampleRelation
taskSampleRelation1
=
relations
.
get
(
0
);
Sample
sample1
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation1
.
getSampleId
());
// 第一个企业名称不相同则修改
if
(!
Objects
.
equals
(
sample
.
getManufacturingEnterprise
(),
sample1
.
getManufacturingEnterprise
())){
Task
task1
=
taskMapper
.
selectById
(
request
.
getId
());
// 体系审查对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getSystemReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive
:
reviewEnterpriseArchiveList
)
{
reviewEnterpriseArchive
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList
);
// 车辆对应的留档文件
List
<
ReviewEnterpriseArchive
>
reviewEnterpriseArchiveList1
=
reviewEnterpriseArchiveMapper
.
findList
(
task1
.
getCarReviewTaskId
());
for
(
ReviewEnterpriseArchive
reviewEnterpriseArchive1
:
reviewEnterpriseArchiveList1
)
{
reviewEnterpriseArchive1
.
setEnterpriseName
(
sample1
.
getManufacturingEnterprise
());
}
reviewEnterpriseArchiveService
.
updateBatchById
(
reviewEnterpriseArchiveList1
);
}
}
// 保存关联的零部件样品信息
// 保存关联的零部件样品信息
List
<
TaskSampleRelation
>
partRelationList
=
taskSampleRelationService
.
selectByTaskId
(
request
.
getId
(),
TaskSampleRelation
.
PART_VEHICLE_SAMPLE
);
taskSampleRelationService
.
removeBatchByIds
(
partRelationList
);
List
<
TaskSampleRelation
>
partRelations
=
request
.
getPartSample
();
List
<
TaskSampleRelation
>
partRelations
=
request
.
getPartSample
();
if
(
partRelations
.
size
()
!=
0
&&
partRelations
!=
null
)
{
if
(
partRelations
.
size
()
!=
0
&&
partRelations
!=
null
)
{
for
(
TaskSampleRelation
partSampleRelation
:
partRelations
)
{
for
(
TaskSampleRelation
partSampleRelation
:
partRelations
)
{
partSampleRelation
.
setTaskId
(
task
.
getId
());
partSampleRelation
.
setTaskId
(
task
.
getId
());
}
}
taskSampleRelationService
.
saveBatch
(
partRelations
);
taskSampleRelationService
.
updateBatchById
(
partRelations
);
}
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/StandardGetInfoRequest.java
View file @
40a0e8b1
...
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModel;
...
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
@ApiModel
(
value
=
"Standard
List
Request"
,
description
=
"查询标准详情"
)
@ApiModel
(
value
=
"Standard
GetInfo
Request"
,
description
=
"查询标准详情"
)
@Data
@Data
public
class
StandardGetInfoRequest
{
public
class
StandardGetInfoRequest
{
@ApiModelProperty
(
"ID"
)
@ApiModelProperty
(
"ID"
)
...
...
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