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
7bf8a1ba
Commit
7bf8a1ba
authored
Jan 08, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
创建车辆审查任务 See merge request
!31
parents
095edc67
a9e7ec19
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
366 additions
and
26 deletions
+366
-26
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+5
-1
ReviewTaskUserRelation.java
...rc/main/java/com/ruoyi/domain/ReviewTaskUserRelation.java
+4
-5
ReviewTaskUserRelationMapper.java
...n/java/com/ruoyi/mapper/ReviewTaskUserRelationMapper.java
+2
-2
CarReviewTaskService.java
...src/main/java/com/ruoyi/service/CarReviewTaskService.java
+2
-1
ReviewTaskUserRelationService.java
...java/com/ruoyi/service/ReviewTaskUserRelationService.java
+2
-2
StrategyCarReviewTask.java
...rc/main/java/com/ruoyi/service/StrategyCarReviewTask.java
+9
-0
CarReviewTaskServiceImpl.java
...java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
+80
-2
ReviewTaskUserRelationServiceImpl.java
...ruoyi/service/impl/ReviewTaskUserRelationServiceImpl.java
+22
-0
StrategyCarReviewTaskContext.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskContext.java
+26
-0
StrategyCarReviewTaskPending.java
.../com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
+85
-0
StrategySystemReviewTaskPending.java
...m/ruoyi/service/impl/StrategySystemReviewTaskPending.java
+1
-1
SystemReviewTaskServiceImpl.java
...a/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
+5
-6
CarReviewTaskController.java
.../src/main/java/com/ruoyi/web/CarReviewTaskController.java
+43
-1
CarReviewTaskCreateRequest.java
...ava/com/ruoyi/web/request/CarReviewTaskCreateRequest.java
+34
-0
CarReviewTaskViewRequest.java
.../java/com/ruoyi/web/request/CarReviewTaskViewRequest.java
+14
-0
SystemReviewTaskCreateRequest.java
.../com/ruoyi/web/request/SystemReviewTaskCreateRequest.java
+2
-2
CarReviewTaskViewResponse.java
...ava/com/ruoyi/web/response/CarReviewTaskViewResponse.java
+26
-0
ReviewTaskUserRelationMapper.xml
...rc/main/resources/mapper/ReviewTaskUserRelationMapper.xml
+4
-3
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
View file @
7bf8a1ba
...
...
@@ -9,12 +9,14 @@ import java.util.Date;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* 车型审查任务
* @TableName t_car_review_task
*/
@TableName
(
value
=
"t_car_review_task"
)
@Accessors
(
chain
=
true
)
@Data
public
class
CarReviewTask
implements
Serializable
{
...
...
@@ -23,6 +25,8 @@ public class CarReviewTask implements Serializable {
@TableField
(
exist
=
false
)
public
static
final
String
TASK_STATUS_FINISH
=
"FINISH"
;
@TableField
(
exist
=
false
)
public
static
final
String
REVIEW_STATUS_NONE
=
"NONE"
;
@TableField
(
exist
=
false
)
...
...
@@ -157,4 +161,4 @@ public class CarReviewTask implements Serializable {
@ApiModelProperty
(
"车型测试任务状态[NONE、NEW、PENDING、FINISH]"
)
private
String
testStatus
;
}
\ No newline at end of file
}
quality-review/src/main/java/com/ruoyi/domain/
System
ReviewTaskUserRelation.java
→
quality-review/src/main/java/com/ruoyi/domain/ReviewTaskUserRelation.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -11,13 +10,13 @@ import lombok.experimental.Accessors;
/**
* 体系审查任务&用户映射关系
* @TableName t_
system_
review_task_user_relation
* @TableName t_review_task_user_relation
*/
@ApiModel
@TableName
(
value
=
"t_
system_
review_task_user_relation"
)
@TableName
(
value
=
"t_review_task_user_relation"
)
@Accessors
(
chain
=
true
)
@Data
public
class
System
ReviewTaskUserRelation
{
public
class
ReviewTaskUserRelation
{
/**
* 任务id
...
...
@@ -44,4 +43,4 @@ public class SystemReviewTaskUserRelation {
@ApiModelProperty
(
"用户姓名"
)
private
String
name
;
}
\ No newline at end of file
}
quality-review/src/main/java/com/ruoyi/mapper/
System
ReviewTaskUserRelationMapper.java
→
quality-review/src/main/java/com/ruoyi/mapper/ReviewTaskUserRelationMapper.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
mapper
;
import
com.ruoyi.domain.
System
ReviewTaskUserRelation
;
import
com.ruoyi.domain.ReviewTaskUserRelation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Repository;
* @Entity com.ruoyi.domain.SystemReviewTaskUserRelation
*/
@Repository
public
interface
SystemReviewTaskUserRelationMapper
extends
BaseMapper
<
System
ReviewTaskUserRelation
>
{
public
interface
ReviewTaskUserRelationMapper
extends
BaseMapper
<
ReviewTaskUserRelation
>
{
}
...
...
quality-review/src/main/java/com/ruoyi/service/CarReviewTaskService.java
View file @
7bf8a1ba
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.service;
import
com.ruoyi.domain.CarReviewTask
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
java.util.List
;
...
...
@@ -32,7 +33,7 @@ public interface CarReviewTaskService extends IService<CarReviewTask> {
* @param taskId
* @return
*/
SystemReviewTaskViewResponse
view
(
Long
taskId
);
CarReviewTaskViewResponse
viewReviewTask
(
Long
taskId
);
/**
...
...
quality-review/src/main/java/com/ruoyi/service/
System
ReviewTaskUserRelationService.java
→
quality-review/src/main/java/com/ruoyi/service/ReviewTaskUserRelationService.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.
System
ReviewTaskUserRelation
;
import
com.ruoyi.domain.ReviewTaskUserRelation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
...
...
@@ -8,6 +8,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @description 针对表【t_system_review_task_user_relation(体系审查任务&用户映射关系)】的数据库操作Service
* @createDate 2023-12-15 10:41:16
*/
public
interface
SystemReviewTaskUserRelationService
extends
IService
<
System
ReviewTaskUserRelation
>
{
public
interface
ReviewTaskUserRelationService
extends
IService
<
ReviewTaskUserRelation
>
{
}
quality-review/src/main/java/com/ruoyi/service/StrategyCarReviewTask.java
0 → 100644
View file @
7bf8a1ba
package
com
.
ruoyi
.
service
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
public
interface
StrategyCarReviewTask
{
CarReviewTaskViewResponse
doView
(
CarReviewTask
carReviewTask
);
}
quality-review/src/main/java/com/ruoyi/service/impl/CarReviewTaskServiceImpl.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.domain.ReviewTaskUserRelation
;
import
com.ruoyi.domain.Standard
;
import
com.ruoyi.domain.SystemReviewTask
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.mapper.CarReviewTaskMapper
;
import
com.ruoyi.service.ReviewTaskUserRelationService
;
import
com.ruoyi.service.StandardService
;
import
com.ruoyi.system.service.ISysUserService
;
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
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -27,6 +39,21 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Autowired
private
CarReviewTaskMapper
carReviewTaskMapper
;
@Autowired
private
ISysUserService
sysUserService
;
@Autowired
private
StandardService
standardService
;
@Autowired
private
CarReviewTaskService
carReviewTaskService
;
@Autowired
private
ReviewTaskUserRelationService
relationService
;
@Autowired
private
StrategyCarReviewTaskContext
strategyCarReviewTaskContext
;
@Override
public
List
<
CarReviewTask
>
findListByReviewStatus
(
String
reviewStatus
)
{
return
carReviewTaskMapper
.
findListByReviewStatus
(
reviewStatus
);
...
...
@@ -35,11 +62,62 @@ public class CarReviewTaskServiceImpl extends ServiceImpl<CarReviewTaskMapper, C
@Override
public
void
createTask
(
CarReviewTaskCreateRequest
request
)
{
// 构建任务创建者
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
SysUser
initiator
=
sysUserService
.
selectUserById
(
loginUser
.
getUserId
());
Standard
standard
=
standardService
.
findListById
(
request
.
getStandardId
());
// 找到审查组长
ReviewTaskUserRelation
leader
=
null
;
List
<
ReviewTaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
ReviewTaskUserRelation
auditor
:
auditors
)
{
if
(
auditor
.
getIsLeader
()
==
1
)
{
leader
=
auditor
;
break
;
}
}
// 构建并保存任务信息
CarReviewTask
task
=
new
CarReviewTask
()
.
setTaskNo
(
SnowflakeUtil
.
generate
().
toString
())
.
setTaskInitiator
(
initiator
.
getNickName
())
.
setTaskInitiatorDept
(
initiator
.
getDept
().
getDeptName
())
.
setTaskStatus
(
CarReviewTask
.
TASK_STATUS_PENDING
)
.
setBizInfo
(
request
.
getBizInfo
())
.
setLeaderId
(
leader
.
getUserId
())
.
setLeader
(
leader
.
getName
())
.
setCreateTime
(
new
Date
())
.
setTaskBeginTime
(
new
Date
())
.
setStandardId
(
standard
.
getId
())
.
setName
(
standard
.
getName
())
.
setStandardNo
(
standard
.
getStandardNo
())
.
setFile
(
standard
.
getFile
());
if
(
request
.
getReview
())
{
task
.
setReviewStatus
(
CarReviewTask
.
REVIEW_STATUS_NEW
);
}
else
{
task
.
setReviewStatus
(
CarReviewTask
.
REVIEW_STATUS_NONE
);
}
if
(
request
.
getTest
())
{
task
.
setTestStatus
(
CarReviewTask
.
TEST_STATUS_NEW
);
}
else
{
task
.
setTestStatus
(
CarReviewTask
.
TEST_STATUS_NONE
);
}
carReviewTaskService
.
save
(
task
);
// 构建并保存该任务所关联的审核组信息
for
(
ReviewTaskUserRelation
auditor
:
auditors
)
{
auditor
.
setTaskId
(
task
.
getId
());
}
relationService
.
saveBatch
(
auditors
);
}
@Override
public
SystemReviewTaskViewResponse
view
(
Long
taskId
)
{
return
null
;
public
CarReviewTaskViewResponse
viewReviewTask
(
Long
taskId
)
{
CarReviewTask
carReviewTask
=
carReviewTaskService
.
getById
(
taskId
);
return
strategyCarReviewTaskContext
.
getResource
(
carReviewTask
.
getTaskStatus
()
+
"SystemReviewTask"
).
doView
(
carReviewTask
);
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/
System
ReviewTaskUserRelationServiceImpl.java
→
quality-review/src/main/java/com/ruoyi/service/impl/ReviewTaskUserRelationServiceImpl.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.
System
ReviewTaskUserRelation
;
import
com.ruoyi.service.
System
ReviewTaskUserRelationService
;
import
com.ruoyi.mapper.
System
ReviewTaskUserRelationMapper
;
import
com.ruoyi.domain.ReviewTaskUserRelation
;
import
com.ruoyi.service.ReviewTaskUserRelationService
;
import
com.ruoyi.mapper.ReviewTaskUserRelationMapper
;
import
org.springframework.stereotype.Service
;
/**
* @author wangfei
* @description 针对表【t_
system_
review_task_user_relation(体系审查任务&用户映射关系)】的数据库操作Service实现
* @description 针对表【t_review_task_user_relation(体系审查任务&用户映射关系)】的数据库操作Service实现
* @createDate 2023-12-15 10:41:16
*/
@Service
public
class
SystemReviewTaskUserRelationServiceImpl
extends
ServiceImpl
<
SystemReviewTaskUserRelationMapper
,
System
ReviewTaskUserRelation
>
implements
SystemReviewTaskUserRelationService
{
public
class
ReviewTaskUserRelationServiceImpl
extends
ServiceImpl
<
ReviewTaskUserRelationMapper
,
ReviewTaskUserRelation
>
implements
ReviewTaskUserRelationService
{
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskContext.java
0 → 100644
View file @
7bf8a1ba
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.service.StrategyCarReviewTask
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@Transactional
@Service
public
class
StrategyCarReviewTaskContext
{
@Autowired
private
final
Map
<
String
,
StrategyCarReviewTask
>
resourceMap
=
new
ConcurrentHashMap
<>();
public
StrategyCarReviewTaskContext
(
Map
<
String
,
StrategyCarReviewTask
>
strategyMap
)
{
this
.
resourceMap
.
clear
();
strategyMap
.
forEach
(
resourceMap:
:
put
);
}
public
StrategyCarReviewTask
getResource
(
String
operation
){
return
resourceMap
.
get
(
operation
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskPending.java
0 → 100644
View file @
7bf8a1ba
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.ReviewDetailsResultService
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.service.StrategyCarReviewTask
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
@Transactional
@Service
(
CarReviewTask
.
TASK_STATUS_PENDING
)
public
class
StrategyCarReviewTaskPending
implements
StrategyCarReviewTask
{
@Autowired
private
ReviewStandardService
reviewStandardService
;
@Autowired
private
ReviewDetailsResultService
reviewDetailsResultService
;
@Autowired
private
ReviewSceneChangeTaskService
reviewSceneChangeTaskService
;
@Autowired
private
SystemReviewTaskMapper
systemReviewTaskMapper
;
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
// PENDING状态下
// 1.standard字段查询当前最新问卷
// 2.查询场景变更任务
// 3.需要联查问卷答案
@Override
public
CarReviewTaskViewResponse
doView
(
CarReviewTask
carReviewTask
)
{
// 获取最新问卷
List
<
ReviewStandard
>
standardTree
=
reviewStandardService
.
findTree
(
carReviewTask
.
getStandardId
(),
ReviewStandard
.
TYPE_CAR
);
// 获取当前问卷答案
List
<
ReviewDetailsResult
>
results
=
reviewDetailsResultService
.
findByTaskId
(
carReviewTask
.
getId
());
// 绑定问卷与答案
setDetailsResult
(
standardTree
,
results
);
// 赋值给任务
carReviewTask
.
setStandard
(
standardTree
);
// 查询场景变更任务便于提醒用户场景变动
List
<
ReviewSceneChangeTask
>
lastChanges
=
reviewSceneChangeTaskService
.
findLastChangeByTaskId
(
carReviewTask
.
getId
());
// 构建返回结果
CarReviewTaskViewResponse
response
=
new
CarReviewTaskViewResponse
();
response
.
setCarReviewTask
(
carReviewTask
);
response
.
setReviewSceneChangeTasks
(
lastChanges
);
return
response
;
}
private
void
setDetailsResult
(
List
<
ReviewStandard
>
standards
,
List
<
ReviewDetailsResult
>
results
)
{
Map
<
Long
,
ReviewDetailsResult
>
resultMap
=
results
.
stream
().
collect
(
Collectors
.
toMap
(
ReviewDetailsResult:
:
getReviewDetailsId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
for
(
ReviewStandard
standard
:
standards
)
{
List
<
ReviewKeyPoint
>
keyPointList
=
standard
.
getKeyPointList
();
for
(
ReviewKeyPoint
keypoint
:
keyPointList
)
{
List
<
ReviewDetails
>
reviewDetailsList
=
keypoint
.
getReviewDetailsList
();
for
(
ReviewDetails
details
:
reviewDetailsList
)
{
details
.
setResult
(
resultMap
.
get
(
details
.
getId
()));
}
}
}
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskPending.java
View file @
7bf8a1ba
...
...
@@ -20,7 +20,7 @@ import java.util.function.Function;
import
java.util.stream.Collectors
;
@Transactional
@Service
(
SystemReviewTask
.
STATUS_PENDING
)
@Service
(
SystemReviewTask
.
STATUS_PENDING
+
"SystemReviewTask"
)
public
class
StrategySystemReviewTaskPending
implements
StrategySystemReviewTask
{
@Autowired
...
...
quality-review/src/main/java/com/ruoyi/service/impl/SystemReviewTaskServiceImpl.java
View file @
7bf8a1ba
...
...
@@ -9,7 +9,6 @@ import com.ruoyi.common.utils.SecurityUtils;
import
com.ruoyi.common.utils.SnowflakeUtil
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
...
...
@@ -33,7 +32,7 @@ import java.util.*;
public
class
SystemReviewTaskServiceImpl
extends
ServiceImpl
<
SystemReviewTaskMapper
,
SystemReviewTask
>
implements
SystemReviewTaskService
{
@Autowired
private
System
ReviewTaskUserRelationService
systemReviewTaskUserRelationService
;
private
ReviewTaskUserRelationService
systemReviewTaskUserRelationService
;
@Autowired
private
SystemReviewTaskService
systemReviewTaskService
;
...
...
@@ -63,9 +62,9 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
Standard
standard
=
standardService
.
findListById
(
request
.
getStandardId
());
// 找到审查组长
System
ReviewTaskUserRelation
leader
=
null
;
List
<
System
ReviewTaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
System
ReviewTaskUserRelation
auditor
:
auditors
)
{
ReviewTaskUserRelation
leader
=
null
;
List
<
ReviewTaskUserRelation
>
auditors
=
request
.
getAuditors
();
for
(
ReviewTaskUserRelation
auditor
:
auditors
)
{
if
(
auditor
.
getIsLeader
()
==
1
)
{
leader
=
auditor
;
break
;
...
...
@@ -91,7 +90,7 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
// 构建并保存该任务所关联的审核组信息
for
(
System
ReviewTaskUserRelation
auditor
:
auditors
)
{
for
(
ReviewTaskUserRelation
auditor
:
auditors
)
{
auditor
.
setTaskId
(
task
.
getId
());
}
systemReviewTaskUserRelationService
.
saveBatch
(
auditors
);
...
...
quality-review/src/main/java/com/ruoyi/web/CarReviewTaskController.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.service.CarReviewTaskService
;
import
com.ruoyi.web.request.CarReviewTaskCreateRequest
;
import
com.ruoyi.web.request.CarReviewTaskViewRequest
;
import
com.ruoyi.web.request.SystemReviewTaskViewRequest
;
import
com.ruoyi.web.response.CarReviewTaskViewResponse
;
import
com.ruoyi.web.response.SystemReviewTaskViewResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
(
"车辆审查任务"
)
@RestController
@RequestMapping
(
"/car/review/task"
)
public
class
CarReviewTaskController
{
public
class
CarReviewTaskController
extends
BaseController
{
@Autowired
private
CarReviewTaskService
carReviewTaskService
;
@ApiOperation
(
"创建车辆审查任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"车辆审查任务"
,
businessType
=
BusinessType
.
INSERT
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/create"
)
public
R
<
String
>
create
(
@Validated
@RequestBody
CarReviewTaskCreateRequest
request
)
{
carReviewTaskService
.
createTask
(
request
);
return
R
.
ok
();
}
@ApiOperation
(
"查看车辆审查任务详情"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/view"
)
public
R
<
CarReviewTaskViewResponse
>
view
(
@Validated
@RequestBody
CarReviewTaskViewRequest
request
)
{
CarReviewTaskViewResponse
carReviewTaskViewResponse
=
carReviewTaskService
.
viewReviewTask
(
request
.
getTaskId
());
return
R
.
ok
(
carReviewTaskViewResponse
);
}
}
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskCreateRequest.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.ReviewTaskUserRelation
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"CarReviewTaskCreateRequest"
,
description
=
"创建车辆审查任务"
)
@Data
public
class
CarReviewTaskCreateRequest
{
@ApiModelProperty
(
"占位"
)
private
String
bizInfo
;
@ApiModelProperty
(
"小组信息"
)
private
List
<
ReviewTaskUserRelation
>
auditors
;
/**
* 是否创建车型问卷审查任务
*/
@ApiModelProperty
(
"是否创建车型问卷审查任务"
)
private
Boolean
review
;
/**
* 是否创建车型测试任务
*/
@ApiModelProperty
(
"是否创建车型测试任务"
)
private
Boolean
test
;
/**
* 标准id
* 根据哪个标准新建的审查任务
*/
@ApiModelProperty
(
"标准id(根据哪个标准新建的审查任务)"
)
private
Long
standardId
;
}
quality-review/src/main/java/com/ruoyi/web/request/CarReviewTaskViewRequest.java
0 → 100644
View file @
7bf8a1ba
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"CarReviewTaskViewRequest"
,
description
=
"查兰车辆审查任务"
)
@Data
public
class
CarReviewTaskViewRequest
{
@ApiModelProperty
(
"任务id"
)
private
Long
taskId
;
}
quality-review/src/main/java/com/ruoyi/web/request/SystemReviewTaskCreateRequest.java
View file @
7bf8a1ba
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.domain.
System
ReviewTaskUserRelation
;
import
com.ruoyi.domain.ReviewTaskUserRelation
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -10,7 +10,7 @@ public class SystemReviewTaskCreateRequest {
private
String
bizInfo
;
private
List
<
System
ReviewTaskUserRelation
>
auditors
;
private
List
<
ReviewTaskUserRelation
>
auditors
;
/**
* 标准id
...
...
quality-review/src/main/java/com/ruoyi/web/response/CarReviewTaskViewResponse.java
0 → 100644
View file @
7bf8a1ba
package
com
.
ruoyi
.
web
.
response
;
import
com.ruoyi.domain.CarReviewTask
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"CarReviewTaskViewResponse"
,
description
=
"查询车辆审查任务详情响应体"
)
@Data
public
class
CarReviewTaskViewResponse
{
/**
* 任务信息
*/
@ApiModelProperty
(
"任务信息"
)
private
CarReviewTask
carReviewTask
;
/**
* 任务开始后的场景变更信息
*/
@ApiModelProperty
(
"任务开始后的场景变更信息"
)
private
List
<
ReviewSceneChangeTask
>
reviewSceneChangeTasks
;
}
quality-review/src/main/resources/mapper/
System
ReviewTaskUserRelationMapper.xml
→
quality-review/src/main/resources/mapper/ReviewTaskUserRelationMapper.xml
View file @
7bf8a1ba
...
...
@@ -2,15 +2,16 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.
System
ReviewTaskUserRelationMapper"
>
<mapper
namespace=
"com.ruoyi.mapper.ReviewTaskUserRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.
System
ReviewTaskUserRelation"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.ReviewTaskUserRelation"
>
<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"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
task_id,user_id,is_leader
task_id,user_id,is_leader
,name
</sql>
</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