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
34985e8b
Commit
34985e8b
authored
Sep 01, 2024
by
yuanshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口:新增评审任务时可以新增、修改、删除测试用例,评审任务时可以评审新增、修改、删除测试用例任务, 增加字段、和实体类用于实现以上功能
parent
4ddce880
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
138 additions
and
16 deletions
+138
-16
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+8
-0
ReviewStandard.java
...review/src/main/java/com/ruoyi/domain/ReviewStandard.java
+1
-1
ReviewUsecase.java
...-review/src/main/java/com/ruoyi/domain/ReviewUsecase.java
+35
-0
ReviewUsecaseMapper.java
...w/src/main/java/com/ruoyi/mapper/ReviewUsecaseMapper.java
+11
-0
StrategyReviewSceneChangeAdd.java
.../com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
+18
-4
StrategyReviewSceneChangeDelete.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
+9
-4
StrategyReviewSceneChangeUpdate.java
...m/ruoyi/service/impl/StrategyReviewSceneChangeUpdate.java
+18
-4
ReviewSceneChangeTaskCreateRequest.java
...ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
+10
-1
ReviewSceneChangeTaskResponse.java
...com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
+11
-2
ReviewUsecaseMapper.xml
...-review/src/main/resources/mapper/ReviewUsecaseMapper.xml
+17
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
34985e8b
...
...
@@ -228,4 +228,12 @@ public class ReviewSceneChangeTask {
@ApiModelProperty
(
"创新基地结果"
)
private
String
innovationBaseResult
;
@ApiModelProperty
(
"用例编号"
)
private
String
usecaseId
;
@ApiModelProperty
(
"用例描述"
)
private
String
usecaseDescribe
;
@ApiModelProperty
(
"评审用例id"
)
private
Long
reviewUsecaseId
;
}
quality-review/src/main/java/com/ruoyi/domain/ReviewStandard.java
View file @
34985e8b
...
...
@@ -47,7 +47,7 @@ public class ReviewStandard {
/**
* 检查类型[system(体系审查)、car(车型审查)]
*/
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)
、test(车型实验审查)
]"
)
private
String
type
;
/**
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewUsecase.java
0 → 100644
View file @
34985e8b
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@ApiModel
@TableName
(
value
=
"t_review_usecase"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ReviewUsecase
{
@ApiModelProperty
(
"主键id"
)
private
Long
id
;
@ApiModelProperty
(
"用例编号"
)
private
String
usecaseId
;
@ApiModelProperty
(
"用例描述"
)
private
String
usecaseDescribe
;
/**
* 审查标准id
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审查标准id"
)
private
Long
reviewStandardId
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewUsecaseMapper.java
0 → 100644
View file @
34985e8b
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ReviewUsecase
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
ReviewUsecaseMapper
extends
BaseMapper
<
ReviewUsecase
>
{
ReviewUsecase
getById
(
Long
reviewUsecaseId
);
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeAdd.java
View file @
34985e8b
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.mapper.ReviewUsecaseMapper
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -38,6 +36,9 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
/**
* 新增审查场景
* @param reviewSceneChangeTask
...
...
@@ -97,6 +98,19 @@ public class StrategyReviewSceneChangeAdd implements StrategyReviewSceneChange,
reviewSceneChangeTaskService
.
updateById
(
reviewSceneChangeTask
);
}
//新增测试用例评审
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"ADD_USECASE"
)){
//保存新增的测试用例
ReviewUsecase
reviewUsecase
=
new
ReviewUsecase
();
reviewUsecase
.
setUsecaseDescribe
(
reviewSceneChangeTask
.
getUsecaseDescribe
());
reviewUsecase
.
setUsecaseId
(
reviewSceneChangeTask
.
getUsecaseId
());
reviewUsecase
.
setReviewStandardId
(
reviewSceneChangeTask
.
getStandardId
());
reviewUsecaseMapper
.
insert
(
reviewUsecase
);
//为用例变更任务的场景关联字段赋值
reviewSceneChangeTask
.
setReviewUsecaseId
(
reviewUsecase
.
getId
());
reviewSceneChangeTaskService
.
updateById
(
reviewSceneChangeTask
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeDelete.java
View file @
34985e8b
...
...
@@ -4,10 +4,7 @@ import com.ruoyi.domain.ReviewDetails;
import
com.ruoyi.domain.ReviewDetailsResult
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.ReviewDetailsService
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
...
...
@@ -48,6 +45,9 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
@Autowired
private
ReviewDetailsResultMapper
reviewDetailsResultMapper
;
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
@Override
public
void
doChange
(
ReviewSceneChangeTask
reviewSceneChangeTask
)
{
// 删除场景
...
...
@@ -97,6 +97,11 @@ public class StrategyReviewSceneChangeDelete implements StrategyReviewSceneChang
reviewSceneService
.
removeBatchByIds
(
reviewScenesList
);
}
}
//删除用例
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"DELETE_USECASE"
)){
reviewUsecaseMapper
.
deleteById
(
reviewSceneChangeTask
.
getReviewUsecaseId
());
}
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategyReviewSceneChangeUpdate.java
View file @
34985e8b
...
...
@@ -2,6 +2,8 @@ package com.ruoyi.service.impl;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.domain.ReviewUsecase
;
import
com.ruoyi.mapper.ReviewUsecaseMapper
;
import
com.ruoyi.service.StrategyReviewSceneChange
;
import
com.ruoyi.service.ReviewSceneService
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -10,6 +12,8 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Objects
;
@Transactional
@Service
public
class
StrategyReviewSceneChangeUpdate
implements
StrategyReviewSceneChange
,
InitializingBean
{
...
...
@@ -19,18 +23,28 @@ public class StrategyReviewSceneChangeUpdate implements StrategyReviewSceneChang
@Autowired
private
ApplicationContext
applicationContext
;
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
@Autowired
private
ReviewSceneService
reviewSceneService
;
@Override
public
void
doChange
(
ReviewSceneChangeTask
reviewSceneChangeTask
)
{
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"UPDATE_SCENE"
)){
ReviewScene
reviewScene
=
reviewSceneService
.
getById
(
reviewSceneChangeTask
.
getReviewSceneId
());
reviewScene
.
setText
(
reviewSceneChangeTask
.
getNewText
());
reviewSceneService
.
updateById
(
reviewScene
);
}
if
(
Objects
.
equals
(
reviewSceneChangeTask
.
getOperationSort
(),
"UPDATE_USECASE"
)){
ReviewUsecase
reviewUsecase
=
reviewUsecaseMapper
.
getById
(
reviewSceneChangeTask
.
getReviewUsecaseId
());
reviewUsecase
.
setUsecaseDescribe
(
reviewSceneChangeTask
.
getUsecaseDescribe
());
reviewUsecase
.
setUsecaseId
(
reviewSceneChangeTask
.
getNewText
());
reviewUsecaseMapper
.
updateById
(
reviewUsecase
);
}
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
strategyReviewSceneChangeContext
.
putResource
(
ReviewSceneChangeTask
.
OPERATION_UPDATE
,
applicationContext
.
getBean
(
this
.
getClass
()));
...
...
quality-review/src/main/java/com/ruoyi/web/request/ReviewSceneChangeTaskCreateRequest.java
View file @
34985e8b
...
...
@@ -35,7 +35,7 @@ public class ReviewSceneChangeTaskCreateRequest {
/**
* 检查类型[system(体系审查)、car(车型审查)]
*/
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)
、test(车型检验)
]"
)
private
String
type
;
/**
...
...
@@ -103,4 +103,13 @@ public class ReviewSceneChangeTaskCreateRequest {
@ApiModelProperty
(
value
=
"审查场景id"
,
notes
=
"1.若为修改、删除任务时,此id在创建任务时赋值; 2.若为新增任务时,此id在审批通过并保存新场景后赋值 "
)
private
Long
reviewSceneId
;
@ApiModelProperty
(
"用例编号"
)
private
String
usecaseId
;
@ApiModelProperty
(
"用例描述"
)
private
String
usecaseDescribe
;
@ApiModelProperty
(
"评审用例id"
)
private
Long
reviewUsecaseId
;
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
View file @
34985e8b
...
...
@@ -48,7 +48,7 @@ public class ReviewSceneChangeTaskResponse {
@ApiModelProperty
(
"审查标准"
)
private
String
standard
;
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)]"
)
@ApiModelProperty
(
"检查类型[system(体系审查)、car(车型审查)
、test(车型检验)
]"
)
private
String
type
;
/**
...
...
@@ -81,7 +81,7 @@ public class ReviewSceneChangeTaskResponse {
@ApiModelProperty
(
"操作(ADD DELETE UPDATE)"
)
private
String
operation
;
@ApiModelProperty
(
value
=
"分类"
,
notes
=
"[KEYPOINT DETAILS SCENE]"
)
@ApiModelProperty
(
value
=
"分类"
,
notes
=
"[KEYPOINT DETAILS SCENE
USECASE
]"
)
private
String
sort
;
@ApiModelProperty
(
"评审类型"
)
...
...
@@ -169,4 +169,13 @@ public class ReviewSceneChangeTaskResponse {
@ApiModelProperty
(
"创新基地结果"
)
private
String
innovationBaseResult
;
@ApiModelProperty
(
"用例编号"
)
private
String
usecaseId
;
@ApiModelProperty
(
"用例描述"
)
private
String
usecaseDescribe
;
@ApiModelProperty
(
"评审用例id"
)
private
Long
reviewUsecaseId
;
}
quality-review/src/main/resources/mapper/ReviewUsecaseMapper.xml
0 → 100644
View file @
34985e8b
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.mapper.ReviewUsecaseMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.ReviewUsecase"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"usecaseId"
column=
"usecase_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseDescribe"
column=
"usecase_describe"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStandardId"
column=
"review_standard_id"
jdbcType=
"BIGINT"
/>
</resultMap>
<select
id=
"getById"
resultType=
"com.ruoyi.domain.ReviewUsecase"
>
select *
from t_review_usecase
where id = #{id}
</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