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
5312666b
Commit
5312666b
authored
Mar 12, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动获取第一个样品信息
parent
a91f3e1c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
SampleManagementMapper.java
...rc/main/java/com/ruoyi/mapper/SampleManagementMapper.java
+1
-1
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
+2
-2
SampleManagementMapper.xml
...view/src/main/resources/mapper/SampleManagementMapper.xml
+5
-2
No files found.
quality-review/src/main/java/com/ruoyi/mapper/SampleManagementMapper.java
View file @
5312666b
...
...
@@ -59,6 +59,6 @@ public interface SampleManagementMapper extends BaseMapper<Sample> {
* */
public
List
<
Sample
>
selectSampleList
(
SampleManagementRequest
sampleManagementRequest
);
List
<
Sample
>
findByIdList
(
@Param
(
"relationList"
)
List
<
TaskSampleRelation
>
relationList
);
List
<
Sample
>
findByIdList
(
@Param
(
"relationList"
)
List
<
TaskSampleRelation
>
relationList
,
@Param
(
"id"
)
Long
id
);
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
5312666b
...
...
@@ -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
(
sampleRelations
.
size
()
-
1
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
carReviewTask
.
setEnterpriseName
(
sample
.
getManufacturingEnterprise
());
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
5312666b
...
...
@@ -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
(
sampleRelations
.
size
()
-
1
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
systemReviewTask
.
setEnterpriseName
(
sample
.
getManufacturingEnterprise
());
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
5312666b
...
...
@@ -272,7 +272,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
if
(
sampleRelations
.
size
()
!=
0
&&
sampleRelations
!=
null
)
{
// 获取之前的第一个企业名称
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
sampleRelations
.
size
()
-
1
);
TaskSampleRelation
taskSampleRelation
=
sampleRelations
.
get
(
0
);
Sample
oldSample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
// 获取编辑任务后的第一个企业名称
...
...
@@ -692,7 +692,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 样品信息
List
<
TaskSampleRelation
>
relationList
=
taskSampleRelationService
.
selectByTaskId
(
id
,
type
);
if
(
relationList
.
size
()
!=
0
&&
relationList
!=
null
)
{
List
<
Sample
>
SampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
);
List
<
Sample
>
SampleList
=
sampleManagementMapper
.
findByIdList
(
relationList
,
id
);
return
SampleList
;
}
else
{
return
null
;
...
...
quality-review/src/main/resources/mapper/SampleManagementMapper.xml
View file @
5312666b
...
...
@@ -173,10 +173,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
</resultMap>
<select
id=
"findByIdList"
resultMap=
"SampleManagementResult"
>
select id,identification_code,sample_number,sample_name,enterprise_id,trademark,sample_photos,number_of_samples,delivery_date,sample_sender,manufacturing_enterprise,manufacture_date from t_sample
WHERE id IN
select t.id,t.identification_code,t.sample_number,t.sample_name,t.enterprise_id,t.trademark,t.sample_photos,t.number_of_samples,t.delivery_date,t.sample_sender,t.manufacturing_enterprise,t.manufacture_date
from t_sample t
left join t_task_sample_relation ts on ts.sample_id = t.id and ts.task_id = #{id}
WHERE t.id IN
<foreach
collection=
"relationList"
item=
"relation"
open=
"("
separator=
","
close=
")"
>
#{relation.sampleId}
</foreach>
ORDER BY ts.id
</select>
</mapper>
\ No newline at end of file
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