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
deafb218
Commit
deafb218
authored
Feb 27, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询第一整车样品信息对应的企业名称
parent
4cee23c5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
6 deletions
+51
-6
ReviewDetailsResult.java
...w/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
+4
-0
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+22
-0
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+23
-4
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+2
-2
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
View file @
deafb218
...
@@ -86,5 +86,9 @@ public class ReviewDetailsResult implements Serializable {
...
@@ -86,5 +86,9 @@ public class ReviewDetailsResult implements Serializable {
@ApiModelProperty
(
"关联到车企留档文件"
)
@ApiModelProperty
(
"关联到车企留档文件"
)
private
Long
reviewEnterpriseArchiveId
;
private
Long
reviewEnterpriseArchiveId
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"企业名称"
)
private
String
enterpriseName
;
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
deafb218
...
@@ -53,6 +53,15 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
...
@@ -53,6 +53,15 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
@Autowired
@Autowired
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
@Autowired
private
TaskMapper
taskMapper
;
@Autowired
private
TaskSampleRelationMapper
taskSampleRelationMapper
;
@Autowired
private
SampleManagementMapper
sampleManagementMapper
;
// PENDING状态下
// PENDING状态下
// 1.standard字段查询当前最新问卷
// 1.standard字段查询当前最新问卷
// 2.查询场景变更任务
// 2.查询场景变更任务
...
@@ -65,6 +74,19 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
...
@@ -65,6 +74,19 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
// 获取当前问卷答案
// 获取当前问卷答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
carReviewTask
.
getId
());
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
carReviewTask
.
getId
());
// 任务样品关系
List
<
TaskSampleRelation
>
relations
=
taskSampleRelationMapper
.
selectByTaskId
(
taskMapper
.
findByCarReviewTaskId
(
carReviewTask
.
getId
()),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
results
.
size
()
!=
0
&&
results
!=
null
)
{
for
(
ReviewDetailsResult
reviewDetailsResult
:
results
)
{
if
(
reviewDetailsResult
!=
null
&&
reviewDetailsResult
.
getReviewEnterpriseArchiveId
()
==
null
&&
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
TaskSampleRelation
taskSampleRelation
=
relations
.
get
(
0
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
reviewDetailsResult
.
setEnterpriseName
(
sample
.
getManufacturingEnterprise
());
}
}
}
// 绑定问卷与答案
// 绑定问卷与答案
setDetailsResult
(
standardTree
,
results
);
setDetailsResult
(
standardTree
,
results
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
deafb218
...
@@ -5,10 +5,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
...
@@ -5,10 +5,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.ReviewTaskInboxMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.InitializingBean
;
...
@@ -53,6 +50,15 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
...
@@ -53,6 +50,15 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
@Autowired
@Autowired
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
private
ReviewTaskInboxMapper
reviewTaskInboxMapper
;
@Autowired
private
TaskMapper
taskMapper
;
@Autowired
private
TaskSampleRelationMapper
taskSampleRelationMapper
;
@Autowired
private
SampleManagementMapper
sampleManagementMapper
;
@Override
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
throw
new
ServiceException
(
"不能开始一个已经开始的任务"
,
HttpStatus
.
ERROR
);
throw
new
ServiceException
(
"不能开始一个已经开始的任务"
,
HttpStatus
.
ERROR
);
...
@@ -116,6 +122,19 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
...
@@ -116,6 +122,19 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
// 获取当前问卷答案
// 获取当前问卷答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
systemReviewTask
.
getId
());
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
systemReviewTask
.
getId
());
// 任务样品关系
List
<
TaskSampleRelation
>
relations
=
taskSampleRelationMapper
.
selectByTaskId
(
taskMapper
.
findBySystemReviewTaskId
(
systemReviewTask
.
getId
()),
TaskSampleRelation
.
COMPLETE_VEHICLE_SAMPLE
);
if
(
results
.
size
()
!=
0
&&
results
!=
null
)
{
for
(
ReviewDetailsResult
reviewDetailsResult
:
results
)
{
if
(
reviewDetailsResult
!=
null
&&
reviewDetailsResult
.
getReviewEnterpriseArchiveId
()
==
null
&&
relations
.
size
()
!=
0
&&
relations
!=
null
)
{
TaskSampleRelation
taskSampleRelation
=
relations
.
get
(
0
);
Sample
sample
=
sampleManagementMapper
.
selectSampleManagementById
(
taskSampleRelation
.
getSampleId
());
reviewDetailsResult
.
setEnterpriseName
(
sample
.
getManufacturingEnterprise
());
}
}
}
// 绑定问卷与答案
// 绑定问卷与答案
setDetailsResult
(
standardTree
,
results
);
setDetailsResult
(
standardTree
,
results
);
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
deafb218
...
@@ -153,12 +153,12 @@
...
@@ -153,12 +153,12 @@
<select
id=
"findByCarReviewTaskId"
resultType=
"java.lang.Long"
>
<select
id=
"findByCarReviewTaskId"
resultType=
"java.lang.Long"
>
SELECT id
SELECT id
FROM t_task
FROM t_task
WHERE
system_review_task_id = #{system
ReviewId}
WHERE
car_review_task_id = #{car
ReviewId}
</select>
</select>
<select
id=
"findBySystemReviewTaskId"
resultType=
"java.lang.Long"
>
<select
id=
"findBySystemReviewTaskId"
resultType=
"java.lang.Long"
>
SELECT id
SELECT id
FROM t_task
FROM t_task
WHERE
car_review_task_id = #{car
ReviewId}
WHERE
system_review_task_id = #{system
ReviewId}
</select>
</select>
<select
id=
"findByUserId"
resultMap=
"ResponseMap"
>
<select
id=
"findByUserId"
resultMap=
"ResponseMap"
>
SELECT t.id, t.system_review_task_id, t.car_review_task_id,
SELECT t.id, t.system_review_task_id, t.car_review_task_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