Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
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
中汽研标准应用数据库
car-database-api
Commits
56106ce8
Commit
56106ce8
authored
Sep 04, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2c90fe54
8cf47938
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
691 additions
and
2 deletions
+691
-2
Standard.java
quality-review/src/main/java/com/ruoyi/domain/Standard.java
+2
-0
ReviewSceneMapper.java
...iew/src/main/java/com/ruoyi/mapper/ReviewSceneMapper.java
+3
-0
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+26
-0
ReviewUsecaseMapper.java
...w/src/main/java/com/ruoyi/mapper/ReviewUsecaseMapper.java
+11
-0
ReviewDetailsService.java
...src/main/java/com/ruoyi/service/ReviewDetailsService.java
+7
-0
ReviewSceneService.java
...w/src/main/java/com/ruoyi/service/ReviewSceneService.java
+6
-0
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+19
-0
ReviewUsecaseService.java
...src/main/java/com/ruoyi/service/ReviewUsecaseService.java
+15
-0
ReviewDetailsServiceImpl.java
...java/com/ruoyi/service/impl/ReviewDetailsServiceImpl.java
+67
-0
ReviewSceneServiceImpl.java
...n/java/com/ruoyi/service/impl/ReviewSceneServiceImpl.java
+9
-0
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+71
-0
ReviewUsecaseServiceImpl.java
...java/com/ruoyi/service/impl/ReviewUsecaseServiceImpl.java
+63
-0
ReviewSceneChangeTaskController.java
...n/java/com/ruoyi/web/ReviewSceneChangeTaskController.java
+68
-1
DeleteDetailsRequest.java
...main/java/com/ruoyi/web/request/DeleteDetailsRequest.java
+14
-0
GetKeypointListRequest.java
...in/java/com/ruoyi/web/request/GetKeypointListRequest.java
+14
-0
GetSceneListRequest.java
.../main/java/com/ruoyi/web/request/GetSceneListRequest.java
+13
-0
GetUseCaseRequestNew.java
...main/java/com/ruoyi/web/request/GetUseCaseRequestNew.java
+15
-0
AddDetailsResponse.java
.../main/java/com/ruoyi/web/response/AddDetailsResponse.java
+25
-0
DeleteDetails.java
...w/src/main/java/com/ruoyi/web/response/DeleteDetails.java
+18
-0
DeleteDetailsList.java
...c/main/java/com/ruoyi/web/response/DeleteDetailsList.java
+23
-0
DeleteDetailsResponse.java
...in/java/com/ruoyi/web/response/DeleteDetailsResponse.java
+25
-0
GetSceneListResponse.java
...ain/java/com/ruoyi/web/response/GetSceneListResponse.java
+19
-0
GetUseCaseResponse.java
.../main/java/com/ruoyi/web/response/GetUseCaseResponse.java
+19
-0
KeypointList.java
...ew/src/main/java/com/ruoyi/web/response/KeypointList.java
+19
-0
ReviewStandardResponseNew.java
...ava/com/ruoyi/web/response/ReviewStandardResponseNew.java
+41
-0
UseCaseResponseDTO.java
.../main/java/com/ruoyi/web/response/UseCaseResponseDTO.java
+17
-0
ReviewSceneMapper.xml
...ty-review/src/main/resources/mapper/ReviewSceneMapper.xml
+5
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+42
-0
ReviewUsecaseMapper.xml
...-review/src/main/resources/mapper/ReviewUsecaseMapper.xml
+14
-0
StandardMapper.xml
quality-review/src/main/resources/mapper/StandardMapper.xml
+1
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/Standard.java
View file @
56106ce8
...
...
@@ -66,5 +66,7 @@ public class Standard {
@ApiModelProperty
(
"要点文件路径"
)
private
String
keypointFile
;
@ApiModelProperty
(
"要点名称"
)
private
String
keypointName
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewSceneMapper.java
View file @
56106ce8
...
...
@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.web.request.ReviewSceneFindListRequest
;
import
com.ruoyi.web.response.GetSceneListResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -19,4 +20,6 @@ public interface ReviewSceneMapper extends BaseMapper<ReviewScene> {
// 查询场景列表
List
<
ReviewScene
>
findList
(
ReviewSceneFindListRequest
request
);
List
<
GetSceneListResponse
>
getSceneListById
(
@Param
(
"id"
)
Long
id
);
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
56106ce8
...
...
@@ -45,4 +45,30 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* 标准内容库新界面接口
* */
List
<
ReviewStandardChapterListResponse
>
findChaptersByStandard
(
@Param
(
"request"
)
StandardListNewRequest
request
);
/*
* 查询当前标准下的所有id集合
* */
List
<
Long
>
getIdList
(
@Param
(
"getUseCaseRequestNew"
)
GetUseCaseRequestNew
getUseCaseRequestNew
);
/*
* 查询当前标准下的所有要点id集合
* */
List
<
Long
>
getKeypointIdList
(
@Param
(
"getKeypointListRequest"
)
GetKeypointListRequest
getKeypointListRequest
);
/*
* 获取要点id列表
* */
List
<
KeypointList
>
getKeypointListByIdList
(
@Param
(
"idList"
)
List
<
Long
>
idList
);
List
<
Long
>
getDetailsIdList
(
@Param
(
"deleteDetailsRequest"
)
DeleteDetailsRequest
deleteDetailsRequest
);
// 获取所有要点ID列表
List
<
Long
>
getDelKeypointIdList
(
@Param
(
"deleteDetailsRequest"
)
DeleteDetailsRequest
deleteDetailsRequest
);
// 获取与 KeypointList 关联的 DeleteDetails
List
<
DeleteDetails
>
getDeleteDetailsByKeypointId
(
@Param
(
"id"
)
Long
id
);
// 获取标准信息
ReviewStandardResponseNew
selectReviewStandardById
(
@Param
(
"key"
)
Long
key
);
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewUsecaseMapper.java
View file @
56106ce8
...
...
@@ -2,10 +2,21 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ReviewUsecase
;
import
com.ruoyi.web.response.ReviewStandardResponseNew
;
import
com.ruoyi.web.response.UseCaseResponseDTO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
ReviewUsecaseMapper
extends
BaseMapper
<
ReviewUsecase
>
{
ReviewUsecase
getById
(
Long
reviewUsecaseId
);
/*
* 查询所有测试用例
* */
List
<
UseCaseResponseDTO
>
getUseCaseListByIdList
(
@Param
(
"idList"
)
List
<
Long
>
idList
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewDetailsService.java
View file @
56106ce8
...
...
@@ -3,10 +3,17 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.web.request.DeleteDetailsRequest
;
import
com.ruoyi.web.response.DeleteDetailsResponse
;
import
java.util.List
;
public
interface
ReviewDetailsService
extends
IService
<
ReviewDetails
>
{
List
<
ReviewDetails
>
findByKeyPointsList
(
List
<
ReviewKeyPoint
>
reviewKeyPointList
);
/*
* 删除细则按钮
* */
List
<
DeleteDetailsResponse
>
getDeleteDetailsResponseList
(
DeleteDetailsRequest
deleteDetailsRequest
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewSceneService.java
View file @
56106ce8
...
...
@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.web.request.ReviewSceneFindListRequest
;
import
com.ruoyi.web.response.GetSceneListResponse
;
import
java.util.List
;
...
...
@@ -30,4 +31,9 @@ public interface ReviewSceneService extends IService<ReviewScene> {
* @param reviewScene
*/
void
addReviewScene
(
ReviewScene
reviewScene
);
/*
* 获取所有场景列表
* */
List
<
GetSceneListResponse
>
getSceneListById
(
Long
id
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
56106ce8
...
...
@@ -87,4 +87,23 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* 标准内容库新界面接口
* */
ReviewStandardListNewResponse
getListNew
(
StandardListNewRequest
request
);
/*
* 查询当前标准下的所有id集合
* */
List
<
Long
>
getIdList
(
GetUseCaseRequestNew
getUseCaseRequestNew
);
/*
* 查询当前标准下的所有要点id集合
* */
List
<
Long
>
getKeypointIdList
(
GetKeypointListRequest
getKeypointListRequest
);
/*
* 新增细则按钮
* */
List
<
AddDetailsResponse
>
getKeypointListByIds
(
List
<
Long
>
idList
);
/*
* 删除细则按钮
* */
List
<
Long
>
getDetailsIdList
(
DeleteDetailsRequest
deleteDetailsRequest
);
}
quality-review/src/main/java/com/ruoyi/service/ReviewUsecaseService.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
service
;
import
com.ruoyi.web.response.GetUseCaseResponse
;
import
java.util.List
;
public
interface
ReviewUsecaseService
{
/*
* 查询所有测试用例
* */
List
<
GetUseCaseResponse
>
getUseCaseListByIds
(
List
<
Long
>
idList
);
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewDetailsServiceImpl.java
View file @
56106ce8
...
...
@@ -4,11 +4,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewStandardMapper
;
import
com.ruoyi.service.ReviewDetailsService
;
import
com.ruoyi.web.request.DeleteDetailsRequest
;
import
com.ruoyi.web.response.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
public
class
ReviewDetailsServiceImpl
extends
ServiceImpl
<
ReviewDetailsMapper
,
ReviewDetails
>
implements
ReviewDetailsService
{
...
...
@@ -16,8 +22,69 @@ public class ReviewDetailsServiceImpl extends ServiceImpl<ReviewDetailsMapper, R
@Autowired
private
ReviewDetailsMapper
reviewDetailsMapper
;
@Autowired
private
ReviewStandardMapper
reviewStandardMapper
;
@Override
public
List
<
ReviewDetails
>
findByKeyPointsList
(
List
<
ReviewKeyPoint
>
reviewKeyPointList
)
{
return
reviewDetailsMapper
.
findByKeyPointList
(
reviewKeyPointList
);
}
/*
* 删除细则按钮
* */
@Override
public
List
<
DeleteDetailsResponse
>
getDeleteDetailsResponseList
(
DeleteDetailsRequest
deleteDetailsRequest
)
{
// 获取所有要点ID列表
List
<
Long
>
idList
=
reviewStandardMapper
.
getDelKeypointIdList
(
deleteDetailsRequest
);
// 获取所有的细则列表
List
<
KeypointList
>
keypointLists
=
reviewStandardMapper
.
getKeypointListByIdList
(
idList
);
// 将要点列表按reviewStandardId分组
Map
<
Long
,
List
<
KeypointList
>>
groupKeypoint
=
keypointLists
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
KeypointList:
:
getReviewStandardId
));
// 创建返回结果列表
List
<
DeleteDetailsResponse
>
deleteDetailsResponseList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Long
,
List
<
KeypointList
>>
entry
:
groupKeypoint
.
entrySet
())
{
// 获取标准信息
ReviewStandardResponseNew
reviewStandardResponseNew
=
reviewStandardMapper
.
selectReviewStandardById
(
entry
.
getKey
());
// 处理标准信息为null的情况
if
(
reviewStandardResponseNew
==
null
)
{
continue
;
}
// 组装 DeleteDetailsResponse
DeleteDetailsResponse
deleteDetailsResponse
=
new
DeleteDetailsResponse
();
deleteDetailsResponse
.
setId
(
reviewStandardResponseNew
.
getId
());
deleteDetailsResponse
.
setChapter
(
reviewStandardResponseNew
.
getChapter
());
deleteDetailsResponse
.
setText
(
reviewStandardResponseNew
.
getText
());
deleteDetailsResponse
.
setStandardId
(
reviewStandardResponseNew
.
getStandardId
());
deleteDetailsResponse
.
setStandardNo
(
reviewStandardResponseNew
.
getStandardNo
());
// 组装 DeleteDetailsList
List
<
DeleteDetailsList
>
deleteDetailsLists
=
new
ArrayList
<>();
for
(
KeypointList
keypoint
:
entry
.
getValue
())
{
DeleteDetailsList
deleteDetailsList
=
new
DeleteDetailsList
();
deleteDetailsList
.
setId
(
keypoint
.
getId
());
deleteDetailsList
.
setText
(
keypoint
.
getText
());
deleteDetailsList
.
setReviewStandardId
(
keypoint
.
getReviewStandardId
());
// 获取与 KeypointList 关联的 DeleteDetails
List
<
DeleteDetails
>
deleteDetails
=
reviewStandardMapper
.
getDeleteDetailsByKeypointId
(
keypoint
.
getId
());
deleteDetailsList
.
setDeleteDetailsList
(
deleteDetails
);
deleteDetailsLists
.
add
(
deleteDetailsList
);
}
deleteDetailsResponse
.
setDeleteDetailsLists
(
deleteDetailsLists
);
// 添加到返回列表
deleteDetailsResponseList
.
add
(
deleteDetailsResponse
);
}
return
deleteDetailsResponseList
;
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneServiceImpl.java
View file @
56106ce8
...
...
@@ -7,6 +7,7 @@ import com.ruoyi.domain.ReviewSceneChangeTask;
import
com.ruoyi.mapper.ReviewSceneMapper
;
import
com.ruoyi.service.ReviewSceneService
;
import
com.ruoyi.web.request.ReviewSceneFindListRequest
;
import
com.ruoyi.web.response.GetSceneListResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -48,4 +49,12 @@ public class ReviewSceneServiceImpl extends ServiceImpl<ReviewSceneMapper, Revie
save
(
reviewScene
);
}
/*
* 获取所有场景列表
* */
@Override
public
List
<
GetSceneListResponse
>
getSceneListById
(
Long
id
)
{
return
reviewSceneMapper
.
getSceneListById
(
id
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
56106ce8
...
...
@@ -89,12 +89,26 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
ReviewStandard
reviewStandard
=
ReviewStandard
.
builder
().
id
(
id
).
build
();
List
<
ReviewStandard
>
reviewStandardList
=
new
ArrayList
<>();
reviewStandardList
.
add
(
reviewStandard
);
// 查询审查要点
List
<
ReviewKeyPoint
>
reviewKeyPointList
=
reviewKeyPointService
.
findByStandardList
(
reviewStandardList
);
if
(
reviewKeyPointList
.
size
()
==
0
){
return
ReviewStandardInspectionContentResponse
.
builder
().
keyPointList
(
new
ArrayList
<>()).
build
();
}
// 查询审查细则
List
<
ReviewDetails
>
reivewDetailsList
=
reviewDetailsService
.
findByKeyPointsList
(
reviewKeyPointList
);
if
(
reivewDetailsList
.
size
()
==
0
){
List
<
ReviewKeyPoint
>
keyPoints
=
buildKeyPoint
(
reviewKeyPointList
,
new
ArrayList
<>());
return
ReviewStandardInspectionContentResponse
.
builder
().
keyPointList
(
keyPoints
).
build
();
}
// 查询审查场景
List
<
ReviewScene
>
reviewSceneList
=
reviewSceneService
.
findByDetailsList
(
reivewDetailsList
);
if
(
reviewSceneList
.
size
()
==
0
){
List
<
ReviewDetails
>
reviewDetails
=
buildDetails
(
reivewDetailsList
,
reviewSceneList
);
List
<
ReviewKeyPoint
>
keyPoints
=
buildKeyPoint
(
reviewKeyPointList
,
reviewDetails
);
ReviewStandardInspectionContentResponse
response
=
ReviewStandardInspectionContentResponse
.
builder
().
keyPointList
(
keyPoints
).
build
();
return
response
;
}
// 调用方法把数据变为树状结构
List
<
ReviewDetails
>
reviewDetails
=
buildDetails
(
reivewDetailsList
,
reviewSceneList
);
List
<
ReviewKeyPoint
>
keyPoints
=
buildKeyPoint
(
reviewKeyPointList
,
reviewDetails
);
...
...
@@ -484,4 +498,61 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return
response
;
}
/*
* 查询当前标准下的所有id集合
* */
@Override
public
List
<
Long
>
getIdList
(
GetUseCaseRequestNew
getUseCaseRequestNew
)
{
return
reviewStandardMapper
.
getIdList
(
getUseCaseRequestNew
);
}
/*
* 查询当前标准下的所有要点id集合
* */
@Override
public
List
<
Long
>
getKeypointIdList
(
GetKeypointListRequest
getKeypointListRequest
)
{
return
reviewStandardMapper
.
getKeypointIdList
(
getKeypointListRequest
);
}
@Override
public
List
<
AddDetailsResponse
>
getKeypointListByIds
(
List
<
Long
>
idList
)
{
//获取所有要点
List
<
KeypointList
>
keypointLists
=
reviewStandardMapper
.
getKeypointListByIdList
(
idList
);
//按reviewStandard 分组
Map
<
Long
,
List
<
KeypointList
>>
groupKeypoint
=
keypointLists
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
KeypointList:
:
getReviewStandardId
));
//创建返回结果列表
List
<
AddDetailsResponse
>
addDetailsResponseList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Long
,
List
<
KeypointList
>>
entry
:
groupKeypoint
.
entrySet
())
{
//获取标准信息
ReviewStandardResponseNew
reviewStandardResponseNew
=
reviewStandardMapper
.
selectReviewStandardById
(
entry
.
getKey
());
//处理标准信息为null的情况
if
(
reviewStandardResponseNew
==
null
){
continue
;
}
//组装
AddDetailsResponse
addDetailsResponse
=
new
AddDetailsResponse
();
addDetailsResponse
.
setChapter
(
reviewStandardResponseNew
.
getChapter
());
addDetailsResponse
.
setId
(
reviewStandardResponseNew
.
getId
());
addDetailsResponse
.
setText
(
reviewStandardResponseNew
.
getText
());
addDetailsResponse
.
setStandardId
(
reviewStandardResponseNew
.
getStandardId
());
addDetailsResponse
.
setStandardNo
(
reviewStandardResponseNew
.
getStandardNo
());
addDetailsResponse
.
setKeypointList
(
entry
.
getValue
());
//添加到返回列表
addDetailsResponseList
.
add
(
addDetailsResponse
);
}
return
addDetailsResponseList
;
}
@Override
public
List
<
Long
>
getDetailsIdList
(
DeleteDetailsRequest
deleteDetailsRequest
)
{
return
reviewStandardMapper
.
getDetailsIdList
(
deleteDetailsRequest
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewUsecaseServiceImpl.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
service
.
impl
;
import
com.ruoyi.mapper.ReviewStandardMapper
;
import
com.ruoyi.mapper.ReviewUsecaseMapper
;
import
com.ruoyi.service.ReviewUsecaseService
;
import
com.ruoyi.web.response.GetUseCaseResponse
;
import
com.ruoyi.web.response.ReviewStandardResponseNew
;
import
com.ruoyi.web.response.UseCaseResponseDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
public
class
ReviewUsecaseServiceImpl
implements
ReviewUsecaseService
{
@Autowired
private
ReviewUsecaseMapper
reviewUsecaseMapper
;
@Autowired
private
ReviewStandardMapper
reviewStandardMapper
;
/*
* 查询所有测试用例
* */
@Override
public
List
<
GetUseCaseResponse
>
getUseCaseListByIds
(
List
<
Long
>
idList
)
{
if
(
idList
.
size
()
==
0
){
return
new
ArrayList
<>();
}
//获取所有测试用例
List
<
UseCaseResponseDTO
>
useCaseResponseDTOList
=
reviewUsecaseMapper
.
getUseCaseListByIdList
(
idList
);
// 按 reviewStandardId 分组
Map
<
Long
,
List
<
UseCaseResponseDTO
>>
groupedUseCases
=
useCaseResponseDTOList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
UseCaseResponseDTO:
:
getReviewStandardId
));
// 创建返回结果列表
List
<
GetUseCaseResponse
>
getUseCaseResponseList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Long
,
List
<
UseCaseResponseDTO
>>
entry
:
groupedUseCases
.
entrySet
())
{
// 获取标准信息
ReviewStandardResponseNew
reviewStandardResponse
=
reviewStandardMapper
.
selectReviewStandardById
(
entry
.
getKey
());
// 处理标准信息为 null 的情况
if
(
reviewStandardResponse
==
null
)
{
// 如果标准信息为 null,则跳过该条记录,或者根据需求处理
continue
;
}
// 组装 GetUseCaseResponse 对象
GetUseCaseResponse
getUseCaseResponse
=
new
GetUseCaseResponse
();
getUseCaseResponse
.
setId
(
reviewStandardResponse
.
getId
());
getUseCaseResponse
.
setText
(
reviewStandardResponse
.
getText
());
getUseCaseResponse
.
setStandardId
(
reviewStandardResponse
.
getStandardId
());
getUseCaseResponse
.
setStandardNo
(
reviewStandardResponse
.
getStandardNo
());
getUseCaseResponse
.
setUseCaseResponseDTOList
(
entry
.
getValue
());
// 添加到返回列表
getUseCaseResponseList
.
add
(
getUseCaseResponse
);
}
return
getUseCaseResponseList
;
}
}
quality-review/src/main/java/com/ruoyi/web/ReviewSceneChangeTaskController.java
View file @
56106ce8
...
...
@@ -9,7 +9,7 @@ import com.ruoyi.common.enums.BusinessType;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.domain.ReviewSceneChangeTask
;
import
com.ruoyi.service.
ReviewSceneChangeTaskService
;
import
com.ruoyi.service.
*
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest
;
import
com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest
;
import
com.ruoyi.web.response.*
;
...
...
@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
@Api
(
tags
=
"场景变更任务"
)
...
...
@@ -37,6 +38,18 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Autowired
private
ReviewSceneChangeTaskService
reviewSceneChangeTaskService
;
@Autowired
private
ReviewUsecaseService
reviewUsecaseService
;
@Autowired
private
ReviewStandardService
reviewStandardService
;
@Autowired
private
ReviewDetailsService
reviewDetailsService
;
@Autowired
private
ReviewSceneService
reviewSceneService
;
@ApiOperation
(
"新建场景变更任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
...
...
@@ -216,4 +229,58 @@ public class ReviewSceneChangeTaskController extends BaseController {
return
R
.
ok
(
reviewSceneChangeTaskService
.
getReviewerOpinion
(
id
));
}
/*
* 查询测试用例
* */
@ApiOperation
(
"查询所有测试用例"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"查询所有测试用例"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getUseCaseListAll"
)
public
R
<
List
<
GetUseCaseResponse
>>
getUseCaseListAll
(
@RequestBody
GetUseCaseRequestNew
GetUseCaseRequestNew
){
List
<
Long
>
idList
=
reviewStandardService
.
getIdList
(
GetUseCaseRequestNew
);
List
<
GetUseCaseResponse
>
getUseCaseResponseList
=
reviewUsecaseService
.
getUseCaseListByIds
(
idList
);
return
R
.
ok
(
getUseCaseResponseList
);
}
/*
* 新增细则按钮
* */
@ApiOperation
(
"新增细则按钮"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"新增细则按钮"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getKeypointListAll"
)
public
R
<
List
<
AddDetailsResponse
>>
getDetailsListNew
(
@RequestBody
GetKeypointListRequest
getKeypointListRequest
){
List
<
Long
>
idList
=
reviewStandardService
.
getKeypointIdList
(
getKeypointListRequest
);
List
<
AddDetailsResponse
>
addDetailsResponseList
=
reviewStandardService
.
getKeypointListByIds
(
idList
);
return
R
.
ok
(
addDetailsResponseList
);
}
/*
* 删除细则按钮
* */
@ApiOperation
(
"删除细则按钮"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"删除细则按钮"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/deleteKeypointListAll"
)
public
R
<
List
<
DeleteDetailsResponse
>>
deleteKeypointListAll
(
@RequestBody
DeleteDetailsRequest
deleteDetailsRequest
){
List
<
DeleteDetailsResponse
>
responseList
=
reviewDetailsService
.
getDeleteDetailsResponseList
(
deleteDetailsRequest
);
return
R
.
ok
(
responseList
);
}
/*
* 获取所有场景列表
* */
@ApiOperation
(
"获取所有场景列表"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"获取所有场景列表"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getSceneListAll"
)
public
R
<
List
<
GetSceneListResponse
>>
getSceneListAll
(
@RequestBody
GetSceneListRequest
getSceneListRequest
){
Long
id
=
Long
.
parseLong
(
getSceneListRequest
.
getDetailsId
());
List
<
GetSceneListResponse
>
getSceneListResponses
=
reviewSceneService
.
getSceneListById
(
id
);
return
R
.
ok
(
getSceneListResponses
);
}
}
quality-review/src/main/java/com/ruoyi/web/request/DeleteDetailsRequest.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"DeleteDetailsRequest"
,
description
=
"获取细则列表请求request"
)
public
class
DeleteDetailsRequest
{
private
Long
standardId
;
private
String
standardNo
;
private
String
type
;
}
quality-review/src/main/java/com/ruoyi/web/request/GetKeypointListRequest.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"GetKeypointListRequest"
,
description
=
"获取要点列表请求request"
)
public
class
GetKeypointListRequest
{
private
Long
standardId
;
private
String
standardNo
;
private
String
type
;
}
quality-review/src/main/java/com/ruoyi/web/request/GetSceneListRequest.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"GetSceneListRequest"
,
description
=
"获取场景列表请求request"
)
public
class
GetSceneListRequest
{
@ApiModelProperty
(
"细则id"
)
private
String
detailsId
;
}
quality-review/src/main/java/com/ruoyi/web/request/GetUseCaseRequestNew.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"GetUseCaseRequestNew"
,
description
=
"获取测试用例列表请求request"
)
public
class
GetUseCaseRequestNew
{
private
Long
standardId
;
private
String
standardNo
;
private
String
type
;
}
quality-review/src/main/java/com/ruoyi/web/response/AddDetailsResponse.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"AddDetailsResponse"
,
description
=
"新增细则按钮响应数据"
)
@Data
public
class
AddDetailsResponse
{
@ApiModelProperty
(
"id"
)
private
Long
id
;
@ApiModelProperty
(
"章节"
)
private
String
chapter
;
@ApiModelProperty
(
"标准内容"
)
private
String
text
;
@ApiModelProperty
(
"标准id"
)
private
Long
standardId
;
@ApiModelProperty
(
"标准编号"
)
private
String
standardNo
;
@ApiModelProperty
(
"标准下keypoint集合"
)
private
List
<
KeypointList
>
keypointList
;
}
quality-review/src/main/java/com/ruoyi/web/response/DeleteDetails.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"DeleteDetails"
,
description
=
"新增细则按钮响应数据"
)
@Data
public
class
DeleteDetails
{
@ApiModelProperty
(
"要点id"
)
private
Long
id
;
@ApiModelProperty
(
"要点内容"
)
private
String
text
;
@ApiModelProperty
(
"标准id"
)
private
Long
reviewKeypointId
;
}
quality-review/src/main/java/com/ruoyi/web/response/DeleteDetailsList.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"DeleteDetailsList"
,
description
=
"新增细则按钮响应数据"
)
@Data
public
class
DeleteDetailsList
{
@ApiModelProperty
(
"要点id"
)
private
Long
id
;
@ApiModelProperty
(
"要点内容"
)
private
String
text
;
@ApiModelProperty
(
"标准id"
)
private
Long
reviewStandardId
;
@ApiModelProperty
(
"细则集合"
)
private
List
<
DeleteDetails
>
deleteDetailsList
;
}
quality-review/src/main/java/com/ruoyi/web/response/DeleteDetailsResponse.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"DeleteDetailsResponse"
,
description
=
"删除细则按钮响应数据"
)
@Data
public
class
DeleteDetailsResponse
{
@ApiModelProperty
(
"id"
)
private
Long
id
;
@ApiModelProperty
(
"章节"
)
private
String
chapter
;
@ApiModelProperty
(
"标准内容"
)
private
String
text
;
@ApiModelProperty
(
"标准id"
)
private
Long
standardId
;
@ApiModelProperty
(
"标准编号"
)
private
String
standardNo
;
@ApiModelProperty
(
"标准下details集合"
)
private
List
<
DeleteDetailsList
>
deleteDetailsLists
;
}
quality-review/src/main/java/com/ruoyi/web/response/GetSceneListResponse.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"GetSceneListResponse"
,
description
=
"查询场景"
)
@Data
public
class
GetSceneListResponse
{
@ApiModelProperty
(
"id"
)
private
Long
id
;
@ApiModelProperty
(
"文本内容"
)
private
String
text
;
@ApiModelProperty
(
"细则id"
)
private
Long
reviewDetailsId
;
}
quality-review/src/main/java/com/ruoyi/web/response/GetUseCaseResponse.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.util.List
;
@ApiModel
(
value
=
"GetUseCaseResponse"
,
description
=
"查询测试用例"
)
@Data
public
class
GetUseCaseResponse
{
private
Long
id
;
private
String
text
;
private
Long
standardId
;
private
String
standardNo
;
private
List
<
UseCaseResponseDTO
>
useCaseResponseDTOList
;
}
quality-review/src/main/java/com/ruoyi/web/response/KeypointList.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"KeypointList"
,
description
=
"要点列表"
)
@Data
public
class
KeypointList
{
@ApiModelProperty
(
"要点id"
)
private
Long
id
;
@ApiModelProperty
(
"要点内容"
)
private
String
text
;
@ApiModelProperty
(
"标准id"
)
private
Long
reviewStandardId
;
}
quality-review/src/main/java/com/ruoyi/web/response/ReviewStandardResponseNew.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
public
class
ReviewStandardResponseNew
{
@ApiModelProperty
(
"ID"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
/**
* 章节
*/
@ApiModelProperty
(
"章节"
)
private
String
chapter
;
/**
* 文本内容
*/
@ApiModelProperty
(
"文本内容"
)
private
String
text
;
/**
* 测试方法(车型试验专有)
*/
@ApiModelProperty
(
"测试方法(车型试验专有)"
)
private
String
testMethod
;
@ApiModelProperty
(
"标准名称"
)
private
String
name
;
@ApiModelProperty
(
"标准号"
)
private
String
standardNo
;
@ApiModelProperty
(
"标准id"
)
private
Long
standardId
;
}
quality-review/src/main/java/com/ruoyi/web/response/UseCaseResponseDTO.java
0 → 100644
View file @
56106ce8
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@ApiModel
(
value
=
"UseCaseResponseDTO"
,
description
=
"测试用例DTO"
)
@Data
public
class
UseCaseResponseDTO
{
private
Long
id
;
private
String
usecaseId
;
private
String
usecaseDescribe
;
private
Long
reviewStandardId
;
}
quality-review/src/main/resources/mapper/ReviewSceneMapper.xml
View file @
56106ce8
...
...
@@ -26,4 +26,9 @@
</if>
</where>
</select>
<select
id=
"getSceneListById"
resultType=
"com.ruoyi.web.response.GetSceneListResponse"
>
select id,text,review_details_id
from t_review_scene
where review_details_id = #{id}
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
56106ce8
...
...
@@ -116,6 +116,48 @@
AND standard_id = #{request.standardId}
</select>
<select
id=
"getIdList"
resultType=
"java.lang.Long"
>
select id
from t_review_standard
where standard_no = #{getUseCaseRequestNew.standardNo}
and type = #{getUseCaseRequestNew.type}
and standard_id = #{getUseCaseRequestNew.standardId}
</select>
<select
id=
"getKeypointIdList"
resultType=
"java.lang.Long"
>
select id
from t_review_standard
where standard_no = #{getKeypointListRequest.standardNo} and standard_id = #{getKeypointListRequest.standardId} and type = #{getKeypointListRequest.type}
</select>
<select
id=
"getKeypointListByIdList"
resultType=
"com.ruoyi.web.response.KeypointList"
>
select
id,text,review_standard_id
from t_review_keypoint
where t_review_keypoint.review_standard_id IN
<foreach
item=
"id"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
<select
id=
"getDetailsIdList"
resultType=
"java.lang.Long"
>
select review_keypoint_id
from t_review_details
</select>
<select
id=
"getDelKeypointIdList"
resultType=
"java.lang.Long"
>
select id
from t_review_standard
where standard_no = #{deleteDetailsRequest.standardNo} and standard_id = #{deleteDetailsRequest.standardId} and type = #{deleteDetailsRequest.type}
</select>
<select
id=
"getDeleteDetailsByKeypointId"
resultType=
"com.ruoyi.web.response.DeleteDetails"
>
select id, text, review_keypoint_id
from t_review_details
where review_keypoint_id = #{id}
</select>
<select
id=
"selectReviewStandardById"
resultType=
"com.ruoyi.web.response.ReviewStandardResponseNew"
>
select id,standard_id,standard_no,text,chapter
from t_review_standard
where id = #{key}
</select>
</mapper>
quality-review/src/main/resources/mapper/ReviewUsecaseMapper.xml
View file @
56106ce8
...
...
@@ -14,4 +14,18 @@
from t_review_usecase
where id = #{id}
</select>
<select
id=
"getUseCaseListByIdList"
resultType=
"com.ruoyi.web.response.UseCaseResponseDTO"
>
SELECT
u.id,
u.usecase_id AS usecaseId,
u.usecase_describe AS usecaseDescribe,
u.review_standard_id AS reviewStandardId
FROM
t_review_usecase u
WHERE
u.review_standard_id IN
<foreach
item=
"id"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
</mapper>
quality-review/src/main/resources/mapper/StandardMapper.xml
View file @
56106ce8
...
...
@@ -18,7 +18,7 @@
</resultMap>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.StandardListRequest"
resultMap=
"BaseResultMap"
>
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status,keypoint_file
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status,keypoint_file
,keypoint_name
FROM t_standard
<where>
<if
test=
"standardType != null and standardType != ''"
>
...
...
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