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
4de9ba8b
Commit
4de9ba8b
authored
Apr 08, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看表单填写人名称-71071
parent
f63666b8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
0 deletions
+44
-0
ReviewDetailsResultMapper.java
...main/java/com/ruoyi/mapper/ReviewDetailsResultMapper.java
+3
-0
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+16
-0
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+16
-0
ReviewDetailsResultMapper.xml
...w/src/main/resources/mapper/ReviewDetailsResultMapper.xml
+9
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ReviewDetailsResultMapper.java
View file @
4de9ba8b
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.mapper;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.web.response.UserNameResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -33,6 +34,8 @@ public interface ReviewDetailsResultMapper extends BaseMapper<ReviewDetailsResul
// 根据细则id查询结果
List
<
ReviewDetailsResult
>
findByDetailsId
(
@Param
(
"detailsId"
)
Long
detailsId
);
List
<
UserNameResponse
>
findByResultList
(
@Param
(
"resultList"
)
List
<
ReviewDetailsResult
>
resultList
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
View file @
4de9ba8b
...
...
@@ -8,6 +8,7 @@ import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
com.ruoyi.web.response.UserNameResponse
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
...
...
@@ -164,6 +165,21 @@ public class StrategyCarReviewTaskPending implements StrategyCarReviewTask, Init
private
void
setDetailsResult
(
List
<
ReviewStandard
>
standards
,
List
<
ReviewDetailsResult
>
results
,
CarReviewTask
carReviewTask
)
{
if
(
results
!=
null
&&
results
.
size
()
!=
0
)
{
// 小组成员姓名、部门
List
<
UserNameResponse
>
userList
=
reviewDetailsResultMapper
.
findByResultList
(
results
);
for
(
UserNameResponse
response
:
userList
)
{
for
(
ReviewDetailsResult
result
:
results
)
{
if
(
Objects
.
equals
(
result
.
getUserId
(),
response
.
getUserId
()))
{
result
.
setUserName
(
response
.
getName
());
}
}
}
reviewDetailsResultService
.
updateBatchById
(
results
);
}
Map
<
Long
,
ReviewDetailsResult
>
resultMap
=
results
.
stream
().
collect
(
Collectors
.
toMap
(
ReviewDetailsResult:
:
getReviewDetailsId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
for
(
ReviewStandard
standard
:
standards
)
{
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
4de9ba8b
...
...
@@ -8,6 +8,7 @@ import com.ruoyi.domain.vo.ReviewEnterpriseArchiveFileVO;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
com.ruoyi.web.response.UserNameResponse
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
...
...
@@ -160,6 +161,21 @@ public class StrategySystemReviewTaskPending implements StrategySystemReviewTask
private
void
setDetailsResult
(
List
<
ReviewStandard
>
standards
,
List
<
ReviewDetailsResult
>
results
,
SystemReviewTask
systemReviewTask
)
{
if
(
results
!=
null
&&
results
.
size
()
!=
0
)
{
// 小组成员姓名、部门
List
<
UserNameResponse
>
userList
=
reviewDetailsResultMapper
.
findByResultList
(
results
);
for
(
UserNameResponse
response
:
userList
)
{
for
(
ReviewDetailsResult
result
:
results
)
{
if
(
Objects
.
equals
(
result
.
getUserId
(),
response
.
getUserId
()))
{
result
.
setUserName
(
response
.
getName
());
}
}
}
reviewDetailsResultService
.
updateBatchById
(
results
);
}
Map
<
Long
,
ReviewDetailsResult
>
resultMap
=
results
.
stream
().
collect
(
Collectors
.
toMap
(
ReviewDetailsResult:
:
getReviewDetailsId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
for
(
ReviewStandard
standard
:
standards
)
{
...
...
quality-review/src/main/resources/mapper/ReviewDetailsResultMapper.xml
View file @
4de9ba8b
...
...
@@ -54,5 +54,14 @@
SELECT id, passed, comment, images_url, review_details_id, task_id, user_id, user_name, last_modify_time, catalogue, review_enterprise_archive_id, file_name
FROM t_review_details_result WHERE review_details_id = #{detailsId}
</select>
<select
id=
"findByResultList"
resultType=
"com.ruoyi.web.response.UserNameResponse"
>
SELECT s.user_id userId, s.nick_name name, sd.dept_name deptName
FROM sys_user s
LEFT JOIN sys_dept sd ON s.dept_id = sd.dept_id
WHERE s.user_id IN
<foreach
item=
"item"
collection=
"resultList"
open=
"("
separator=
","
close=
")"
>
#{item.userId}
</foreach>
</select>
</mapper>
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