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
af847352
Commit
af847352
authored
Mar 29, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
查看任务详情人员状态回显 See merge request
!245
parents
d1e7db2f
f59bd34a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
TaskUserRelation.java
...view/src/main/java/com/ruoyi/domain/TaskUserRelation.java
+9
-0
TaskUserRelationMapper.java
...rc/main/java/com/ruoyi/mapper/TaskUserRelationMapper.java
+3
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+18
-0
TaskUserRelationMapper.xml
...view/src/main/resources/mapper/TaskUserRelationMapper.xml
+9
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/TaskUserRelation.java
View file @
af847352
package
com
.
ruoyi
.
domain
;
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
@@ -19,6 +20,10 @@ import lombok.experimental.Accessors;
...
@@ -19,6 +20,10 @@ import lombok.experimental.Accessors;
@Data
@Data
public
class
TaskUserRelation
{
public
class
TaskUserRelation
{
// 用户状态禁用
@TableField
(
exist
=
false
)
public
static
final
String
USER_STATUS_PROHIBIT
=
"1"
;
/**
/**
* 任务id
* 任务id
*/
*/
...
@@ -52,4 +57,8 @@ public class TaskUserRelation {
...
@@ -52,4 +57,8 @@ public class TaskUserRelation {
@ApiModelProperty
(
"部门名称"
)
@ApiModelProperty
(
"部门名称"
)
private
String
deptName
;
private
String
deptName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"用户状态"
)
private
String
status
;
}
}
quality-review/src/main/java/com/ruoyi/mapper/TaskUserRelationMapper.java
View file @
af847352
...
@@ -23,6 +23,9 @@ public interface TaskUserRelationMapper extends BaseMapper<TaskUserRelation> {
...
@@ -23,6 +23,9 @@ public interface TaskUserRelationMapper extends BaseMapper<TaskUserRelation> {
*/
*/
List
<
TaskUserRelation
>
selectQTeamMembers
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
TaskUserRelation
>
selectQTeamMembers
(
@Param
(
"taskId"
)
Long
taskId
);
// 根据小组成员id列表查询状态
List
<
TaskUserRelation
>
findByIdList
(
@Param
(
"idList"
)
List
<
TaskUserRelation
>
idList
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
af847352
...
@@ -104,6 +104,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -104,6 +104,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
@Autowired
@Autowired
private
ModelTestTaskMapper
modelTestTaskMapper
;
private
ModelTestTaskMapper
modelTestTaskMapper
;
@Autowired
private
TaskUserRelationMapper
taskUserRelationMapper
;
@Override
@Override
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
public
List
<
Task
>
findList
(
TaskListRequest
request
)
{
return
taskMapper
.
findList
(
request
);
return
taskMapper
.
findList
(
request
);
...
@@ -992,6 +995,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -992,6 +995,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 小组成员
// 小组成员
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
id
);
List
<
TaskUserRelation
>
relation
=
taskUserRelationService
.
selectQTeamMembers
(
id
);
// 小组成员状态
List
<
TaskUserRelation
>
relationList
=
taskUserRelationMapper
.
findByIdList
(
relation
);
for
(
TaskUserRelation
userRelation
:
relationList
)
{
for
(
TaskUserRelation
taskUserRelation
:
relation
)
{
if
(
Objects
.
equals
(
userRelation
.
getUserId
(),
taskUserRelation
.
getUserId
()))
{
taskUserRelation
.
setStatus
(
userRelation
.
getStatus
());
// 如果检验员状态为1,则显示已停用
if
(
Objects
.
equals
(
userRelation
.
getStatus
(),
TaskUserRelation
.
USER_STATUS_PROHIBIT
))
{
taskUserRelation
.
setName
(
taskUserRelation
.
getName
()
+
"(已停用)"
);
}
}
}
}
return
relation
;
return
relation
;
}
}
...
...
quality-review/src/main/resources/mapper/TaskUserRelationMapper.xml
View file @
af847352
...
@@ -23,4 +23,13 @@
...
@@ -23,4 +23,13 @@
task_id = #{taskId}
task_id = #{taskId}
</if>
</if>
</select>
</select>
<select
id=
"findByIdList"
resultType=
"com.ruoyi.domain.TaskUserRelation"
>
select user_id as userId,
status
from sys_user
WHERE sys_user.user_id IN
<foreach
item=
"item"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{item.userId}
</foreach>
</select>
</mapper>
</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