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
50cafe26
Commit
50cafe26
authored
Jan 11, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务&用户映射关系(审查组列表)添加部门名称&任务表删除bizinfo字段
parent
6ef54046
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
40 additions
and
61 deletions
+40
-61
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+0
-6
SystemReviewTask.java
...view/src/main/java/com/ruoyi/domain/SystemReviewTask.java
+0
-6
TaskUserRelation.java
...view/src/main/java/com/ruoyi/domain/TaskUserRelation.java
+8
-2
ReviewTaskUserRelationMapper.java
...n/java/com/ruoyi/mapper/ReviewTaskUserRelationMapper.java
+3
-3
ReviewTaskUserRelationService.java
...java/com/ruoyi/service/ReviewTaskUserRelationService.java
+3
-4
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+4
-8
ReviewTaskUserRelationServiceImpl.java
...ruoyi/service/impl/ReviewTaskUserRelationServiceImpl.java
+3
-4
SystemReviewTaskServiceImpl.java
...a/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
+4
-7
ReviewTaskUserRelationController.java
.../java/com/ruoyi/web/ReviewTaskUserRelationController.java
+3
-3
CarReviewTaskCreateRequest.java
...ava/com/ruoyi/web/request/CarReviewTaskCreateRequest.java
+2
-5
SystemReviewTaskCreateRequest.java
.../com/ruoyi/web/request/SystemReviewTaskCreateRequest.java
+2
-4
CarReviewTaskMapper.xml
...-review/src/main/resources/mapper/CarReviewTaskMapper.xml
+3
-4
ReviewTaskUserRelationMapper.xml
...rc/main/resources/mapper/ReviewTaskUserRelationMapper.xml
+3
-2
SystemReviewTaskMapper.xml
...view/src/main/resources/mapper/SystemReviewTaskMapper.xml
+2
-3
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
View file @
50cafe26
...
...
@@ -106,12 +106,6 @@ public class CarReviewTask implements Serializable {
@TableField
(
value
=
"standard"
,
typeHandler
=
StandardJsonTypeHandler
.
class
)
private
List
<
ReviewStandard
>
standard
;
/**
* 占位(开发人员根据具体业务自行增加业务字段)
*/
@ApiModelProperty
(
"占位(开发人员根据具体业务自行增加业务字段)"
)
private
String
bizInfo
;
/**
* 创建时间
*/
...
...
quality-review/src/main/java/com/ruoyi/domain/SystemReviewTask.java
View file @
50cafe26
...
...
@@ -91,12 +91,6 @@ public class SystemReviewTask {
@TableField
(
value
=
"standard"
,
typeHandler
=
StandardJsonTypeHandler
.
class
)
private
List
<
ReviewStandard
>
standard
;
/**
* 占位(开发人员根据具体业务自行增加业务字段)
*/
@ApiModelProperty
(
"占位(开发人员根据具体业务自行增加业务字段)"
)
private
String
bizInfo
;
/**
* 审核组长id
*/
...
...
quality-review/src/main/java/com/ruoyi/domain/
Review
TaskUserRelation.java
→
quality-review/src/main/java/com/ruoyi/domain/TaskUserRelation.java
View file @
50cafe26
...
...
@@ -14,10 +14,10 @@ import lombok.experimental.Accessors;
* @TableName t_review_task_user_relation
*/
@ApiModel
@TableName
(
value
=
"t_
review_
task_user_relation"
)
@TableName
(
value
=
"t_task_user_relation"
)
@Accessors
(
chain
=
true
)
@Data
public
class
Review
TaskUserRelation
{
public
class
TaskUserRelation
{
/**
* 任务id
...
...
@@ -46,4 +46,10 @@ public class ReviewTaskUserRelation {
@ApiModelProperty
(
"用户姓名"
)
private
String
name
;
/**
* 部门名称
*/
@ApiModelProperty
(
"部门名称"
)
private
String
deptName
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewTaskUserRelationMapper.java
View file @
50cafe26
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.
Review
TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -14,14 +14,14 @@ import java.util.List;
* @Entity com.ruoyi.domain.SystemReviewTaskUserRelation
*/
@Repository
public
interface
ReviewTaskUserRelationMapper
extends
BaseMapper
<
Review
TaskUserRelation
>
{
public
interface
ReviewTaskUserRelationMapper
extends
BaseMapper
<
TaskUserRelation
>
{
/**
* 根据任务id查询小组成员
* @param taskId
* @return
*/
List
<
Review
TaskUserRelation
>
selectQTeamMembers
(
@Param
(
"taskId"
)
Long
taskId
);
List
<
TaskUserRelation
>
selectQTeamMembers
(
@Param
(
"taskId"
)
Long
taskId
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/ReviewTaskUserRelationService.java
View file @
50cafe26
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.
Review
TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -11,13 +10,13 @@ import java.util.List;
* @description 针对表【t_system_review_task_user_relation(体系审查任务&用户映射关系)】的数据库操作Service
* @createDate 2023-12-15 10:41:16
*/
public
interface
ReviewTaskUserRelationService
extends
IService
<
Review
TaskUserRelation
>
{
public
interface
ReviewTaskUserRelationService
extends
IService
<
TaskUserRelation
>
{
/**
* 根据任务id查询小组成员
* @param taskId
* @return
*/
List
<
Review
TaskUserRelation
>
selectQTeamMembers
(
Long
taskId
);
List
<
TaskUserRelation
>
selectQTeamMembers
(
Long
taskId
);
}
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
View file @
50cafe26
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.domain.*
;
...
...
@@ -18,7 +16,6 @@ import com.ruoyi.web.request.CarReviewTaskCreateRequest;
import
com.ruoyi.web.request.CarReviewTaskStartRequest
;
import
com.ruoyi.web.request.CarReviewTaskSubmitRequest
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -71,9 +68,9 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
Standard
standard
=
standardService
.
findListById
(
request
.
getStandardId
());
// 找到审查组长
Review
TaskUserRelation
leader
=
null
;
List
<
Review
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
Review
TaskUserRelation
auditor
:
auditors
)
{
TaskUserRelation
leader
=
null
;
List
<
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
TaskUserRelation
auditor
:
auditors
)
{
if
(
auditor
.
getIsLeader
()
==
1
)
{
leader
=
auditor
;
break
;
...
...
@@ -86,7 +83,6 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
())
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_PENDING
)
.
setBizInfo
(
request
.
getBizInfo
())
.
setLeaderId
(
leader
.
getUserId
())
.
setLeader
(
leader
.
getName
())
.
setCreateTime
(
new
Date
())
...
...
@@ -111,7 +107,7 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
// 构建并保存该任务所关联的审核组信息
for
(
Review
TaskUserRelation
auditor
:
auditors
)
{
for
(
TaskUserRelation
auditor
:
auditors
)
{
auditor
.
setTaskId
(
task
.
getId
());
}
relationService
.
saveBatch
(
auditors
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewTaskUserRelationServiceImpl.java
View file @
50cafe26
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.
Review
TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.service.ReviewTaskUserRelationService
;
import
com.ruoyi.mapper.ReviewTaskUserRelationMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -16,7 +15,7 @@ import java.util.List;
* @createDate 2023-12-15 10:41:16
*/
@Service
public
class
ReviewTaskUserRelationServiceImpl
extends
ServiceImpl
<
ReviewTaskUserRelationMapper
,
Review
TaskUserRelation
>
public
class
ReviewTaskUserRelationServiceImpl
extends
ServiceImpl
<
ReviewTaskUserRelationMapper
,
TaskUserRelation
>
implements
ReviewTaskUserRelationService
{
@Autowired
...
...
@@ -28,7 +27,7 @@ public class ReviewTaskUserRelationServiceImpl extends ServiceImpl<ReviewTaskUse
* @return
*/
@Override
public
List
<
Review
TaskUserRelation
>
selectQTeamMembers
(
Long
taskId
){
public
List
<
TaskUserRelation
>
selectQTeamMembers
(
Long
taskId
){
return
reviewTaskUserRelationMapper
.
selectQTeamMembers
(
taskId
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
View file @
50cafe26
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.domain.*
;
...
...
@@ -62,9 +60,9 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
Standard
standard
=
standardService
.
findListById
(
request
.
getStandardId
());
// 找到审查组长
Review
TaskUserRelation
leader
=
null
;
List
<
Review
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
Review
TaskUserRelation
auditor
:
auditors
)
{
TaskUserRelation
leader
=
null
;
List
<
TaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
TaskUserRelation
auditor
:
auditors
)
{
if
(
auditor
.
getIsLeader
()
==
1
)
{
leader
=
auditor
;
break
;
...
...
@@ -77,7 +75,6 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
())
.
setTaskStatus
(
SystemReviewTask
.
STATUS_NEW
)
.
setBizInfo
(
request
.
getBizInfo
())
.
setLeaderId
(
leader
.
getUserId
())
.
setLeader
(
leader
.
getName
())
.
setCreateTime
(
new
Date
())
...
...
@@ -90,7 +87,7 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
// 构建并保存该任务所关联的审核组信息
for
(
Review
TaskUserRelation
auditor
:
auditors
)
{
for
(
TaskUserRelation
auditor
:
auditors
)
{
auditor
.
setTaskId
(
task
.
getId
());
}
systemReviewTaskUserRelationService
.
saveBatch
(
auditors
);
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewTaskUserRelationController.java
View file @
50cafe26
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.web;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.domain.
Review
TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
com.ruoyi.service.ReviewTaskUserRelationService
;
import
com.ruoyi.web.request.ReviewTaskUserRelationMembersRequest
;
import
io.swagger.annotations.Api
;
...
...
@@ -35,8 +35,8 @@ public class ReviewTaskUserRelationController extends BaseController {
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/members"
)
public
R
<
List
<
Review
TaskUserRelation
>>
selectQTeamMemberList
(
@Validated
@RequestBody
ReviewTaskUserRelationMembersRequest
request
){
List
<
Review
TaskUserRelation
>
list
=
reviewTaskUserRelationService
.
selectQTeamMembers
(
request
.
getTaskId
());
public
R
<
List
<
TaskUserRelation
>>
selectQTeamMemberList
(
@Validated
@RequestBody
ReviewTaskUserRelationMembersRequest
request
){
List
<
TaskUserRelation
>
list
=
reviewTaskUserRelationService
.
selectQTeamMembers
(
request
.
getTaskId
());
return
R
.
ok
(
list
);
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskCreateRequest.java
View file @
50cafe26
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.
Review
TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -11,11 +11,8 @@ import java.util.List;
@Data
public
class
CarReviewTaskCreateRequest
{
@ApiModelProperty
(
"占位"
)
private
String
bizInfo
;
@ApiModelProperty
(
"小组信息"
)
private
List
<
Review
TaskUserRelation
>
auditors
;
private
List
<
TaskUserRelation
>
auditors
;
/**
* 是否创建车型问卷审查任务
...
...
quality-review/src/main/java/com/ruoyi/web/request/SystemReviewTaskCreateRequest.java
View file @
50cafe26
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.
Review
TaskUserRelation
;
import
com.ruoyi.domain.TaskUserRelation
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -8,9 +8,7 @@ import java.util.List;
@Data
public
class
SystemReviewTaskCreateRequest
{
private
String
bizInfo
;
private
List
<
ReviewTaskUserRelation
>
auditors
;
private
List
<
TaskUserRelation
>
auditors
;
/**
* 标准id
...
...
quality-review/src/main/resources/mapper/CarReviewTaskMapper.xml
View file @
50cafe26
...
...
@@ -14,7 +14,6 @@
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"taskEndTime"
column=
"task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"standard"
column=
"standard"
typeHandler=
"com.ruoyi.common.StandardJsonTypeHandler"
/>
<result
property=
"bizInfo"
column=
"biz_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"leaderId"
column=
"leader_id"
jdbcType=
"BIGINT"
/>
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
...
...
@@ -35,7 +34,7 @@
id,task_no,task_status,
task_initiator,task_initiator_dept,task_result,
task_begin_time,task_end_time,standard,
biz_info,
create_time,leader_id,
create_time,leader_id,
leader,standard_id,name,
standard_no,file,review_status,
test_status,review_start_time,
...
...
@@ -45,11 +44,11 @@
review_result
</sql>
<select
id=
"findListByReviewStatus"
resultType=
"com.ruoyi.domain.CarReviewTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,
biz_info,
create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
FROM t_car_review_task WHERE review_status = #{reviewStatus} AND task_status = 'PENDING'
</select>
<select
id=
"findListByTaskStatus"
resultType=
"com.ruoyi.domain.CarReviewTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,
biz_info,
create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,standard,create_time,leader_id,leader,standard_id,name,standard_no,file,review_status,test_status,review_start_time,review_submit_time,review_submit_id,review_submit_name,review_result
FROM t_car_review_task WHERE task_status = #{taskStatus}
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewTaskUserRelationMapper.xml
View file @
50cafe26
...
...
@@ -4,15 +4,16 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.ReviewTaskUserRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.
Review
TaskUserRelation"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.TaskUserRelation"
>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"userId"
column=
"user_id"
jdbcType=
"BIGINT"
/>
<result
property=
"isLeader"
column=
"is_leader"
jdbcType=
"TINYINT"
/>
<result
property=
"name"
column=
"name"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptName"
column=
"dept_name"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
task_id,user_id,is_leader,name
task_id,user_id,is_leader,name
,dept_name
</sql>
<select
id=
"selectQTeamMembers"
parameterType=
"Long"
resultMap=
"BaseResultMap"
>
...
...
quality-review/src/main/resources/mapper/SystemReviewTaskMapper.xml
View file @
50cafe26
...
...
@@ -14,7 +14,6 @@
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"taskEndTime"
column=
"task_end_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"standard"
column=
"standard"
typeHandler=
"com.ruoyi.common.StandardJsonTypeHandler"
/>
<result
property=
"bizInfo"
column=
"biz_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"standardId"
column=
"standard_id"
jdbcType=
"BIGINT"
/>
<result
property=
"name"
column=
"name"
jdbcType=
"VARCHAR"
/>
...
...
@@ -25,13 +24,13 @@
</resultMap>
<select
id=
"findListByStatus"
resultMap=
"BaseResultMap"
>
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard,
biz_info,
create_time, standard_id, name, standard_no, file, submit_by_id, submit_by_name
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time, standard_id, name, standard_no, file, submit_by_id, submit_by_name
FROM t_system_review_task WHERE task_status = #{status}
ORDER BY create_time DESC
</select>
<select
id=
"findListInProcess"
resultMap=
"BaseResultMap"
>
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard,
biz_info,
create_time, standard_id, name, standard_no, file, submit_by_id, submit_by_name
SELECT id, task_no, task_status, task_initiator, task_initiator_dept, task_result, task_begin_time, task_end_time, standard, create_time, standard_id, name, standard_no, file, submit_by_id, submit_by_name
FROM t_system_review_task WHERE task_status IN ('NEW','PENDING')
ORDER BY create_time DESC
</select>
...
...
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