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
59e81da6
Commit
59e81da6
authored
Nov 12, 2024
by
宋源硕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'songyuanshuo' into 'master'
2024.11.12添加新接口 See merge request
!26
parents
21e36eeb
c169db26
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
562 additions
and
19 deletions
+562
-19
UsecaseDetails.java
...review/src/main/java/com/ruoyi/domain/UsecaseDetails.java
+21
-0
NewScenarioUseCasesVONew.java
...in/java/com/ruoyi/domain/vo/NewScenarioUseCasesVONew.java
+16
-0
NewStandardVONew.java
...w/src/main/java/com/ruoyi/domain/vo/NewStandardVONew.java
+20
-0
ReviewKeyPointMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewKeyPointMapper.java
+3
-0
ReviewStandardMapper.java
.../src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
+10
-0
StatisticsHomeMapper.java
.../src/main/java/com/ruoyi/mapper/StatisticsHomeMapper.java
+3
-0
TestUseCaseMapper.java
...iew/src/main/java/com/ruoyi/mapper/TestUseCaseMapper.java
+37
-2
UsecaseDetailsMapper.java
.../src/main/java/com/ruoyi/mapper/UsecaseDetailsMapper.java
+9
-0
ReviewStandardService.java
...rc/main/java/com/ruoyi/service/ReviewStandardService.java
+8
-0
StandardService.java
...view/src/main/java/com/ruoyi/service/StandardService.java
+5
-0
TestUseCaseService.java
...w/src/main/java/com/ruoyi/service/TestUseCaseService.java
+12
-3
ReviewKeyPointServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewKeyPointServiceImpl.java
+1
-4
ReviewStandardServiceImpl.java
...ava/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
+55
-0
StandardServiceImpl.java
...main/java/com/ruoyi/service/impl/StandardServiceImpl.java
+88
-0
StatisticsHomeServiceImpl.java
...ava/com/ruoyi/service/impl/StatisticsHomeServiceImpl.java
+4
-3
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+38
-3
ReviewStandardController.java
...src/main/java/com/ruoyi/web/ReviewStandardController.java
+1
-1
StandardController.java
...eview/src/main/java/com/ruoyi/web/StandardController.java
+11
-0
TestUserCaseController.java
...w/src/main/java/com/ruoyi/web/TestUserCaseController.java
+27
-3
GetLocalUseCaseRequest.java
...in/java/com/ruoyi/web/request/GetLocalUseCaseRequest.java
+17
-0
NewTestUserCaseListResponseNew.java
...om/ruoyi/web/response/NewTestUserCaseListResponseNew.java
+21
-0
SerialNumberResponseNew.java
.../java/com/ruoyi/web/response/SerialNumberResponseNew.java
+17
-0
ReviewKeyPointMapper.xml
...review/src/main/resources/mapper/ReviewKeyPointMapper.xml
+9
-0
ReviewStandardMapper.xml
...review/src/main/resources/mapper/ReviewStandardMapper.xml
+32
-0
StatisticsHomeMapper.xml
...review/src/main/resources/mapper/StatisticsHomeMapper.xml
+9
-0
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+75
-0
UsecaseDetailsMapper.xml
...review/src/main/resources/mapper/UsecaseDetailsMapper.xml
+13
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/UsecaseDetails.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@TableName
(
value
=
"t_usecase_details"
)
@Data
public
class
UsecaseDetails
{
@ApiModelProperty
(
"id"
)
private
Long
id
;
@ApiModelProperty
(
"用例编号"
)
private
String
customizedId
;
@ApiModelProperty
(
"用例描述"
)
private
String
description
;
@ApiModelProperty
(
"用例id(科恩)"
)
private
String
usecaseId
;
@ApiModelProperty
(
"场景id"
)
private
Long
testScenarioId
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/NewScenarioUseCasesVONew.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
NewScenarioUseCasesVONew
{
private
Long
id
;
// 场景
private
String
testScenario
;
// 用例VO
List
<
UseCaseNewVO
>
useCases
;
}
quality-review/src/main/java/com/ruoyi/domain/vo/NewStandardVONew.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
NewStandardVONew
{
// 标准要求id
private
String
id
;
// 标准要求章节号
private
String
serialNumber
;
// 标准要求
private
String
requirements
;
// 场景及其所属用例VO
List
<
NewScenarioUseCasesVONew
>
scenarioUseCases
;
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewKeyPointMapper.java
View file @
59e81da6
...
@@ -38,4 +38,7 @@ public interface ReviewKeyPointMapper extends BaseMapper<ReviewKeyPoint> {
...
@@ -38,4 +38,7 @@ public interface ReviewKeyPointMapper extends BaseMapper<ReviewKeyPoint> {
* 删除细则按钮2
* 删除细则按钮2
* */
* */
List
<
DeleteDetailsList
>
selectKeypointListNew
(
@Param
(
"id"
)
Long
id
);
List
<
DeleteDetailsList
>
selectKeypointListNew
(
@Param
(
"id"
)
Long
id
);
List
<
ReviewKeyPointNew
>
selectKeypointListByStandardIdNew
(
Long
standardId
);
}
}
quality-review/src/main/java/com/ruoyi/mapper/ReviewStandardMapper.java
View file @
59e81da6
...
@@ -100,4 +100,14 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
...
@@ -100,4 +100,14 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* 删除细则按钮2
* 删除细则按钮2
* */
* */
List
<
DeleteDetailsResponse
>
selectStandardList
(
@Param
(
"deleteDetailsRequest"
)
DeleteDetailsRequest
deleteDetailsRequest
);
List
<
DeleteDetailsResponse
>
selectStandardList
(
@Param
(
"deleteDetailsRequest"
)
DeleteDetailsRequest
deleteDetailsRequest
);
/*
* 将科恩数据挪到本地数据库 进行查询章节接口
* */
List
<
ReviewStandardChapterListResponse
>
getChapterListByTypeNew
(
@Param
(
"getChapterListRequest"
)
GetChapterListRequest
getChapterListRequest
);
/*
*查看章节下面的数据
* */
List
<
ReviewStandardResponseAll
>
selectReviewStandardListAllNew
(
ReviewStandardListByPageRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/mapper/StatisticsHomeMapper.java
View file @
59e81da6
...
@@ -28,4 +28,7 @@ public interface StatisticsHomeMapper {
...
@@ -28,4 +28,7 @@ public interface StatisticsHomeMapper {
Long
selectDetailsNum
(
Standard
standard
);
Long
selectDetailsNum
(
Standard
standard
);
//获取当前标准下的场景数
//获取当前标准下的场景数
Long
selectSceneNum
(
Standard
standard
);
Long
selectSceneNum
(
Standard
standard
);
//获取当前标准下的用例数
Long
selectUseCaseNum
(
Standard
standard
);
}
}
quality-review/src/main/java/com/ruoyi/mapper/TestUseCaseMapper.java
View file @
59e81da6
...
@@ -2,9 +2,15 @@ package com.ruoyi.mapper;
...
@@ -2,9 +2,15 @@ package com.ruoyi.mapper;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.TestUseCase
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.vo.OptionalUseCasesVO
;
import
com.ruoyi.domain.vo.*
;
import
com.ruoyi.domain.vo.TestUsecaseVO
;
import
com.ruoyi.web.request.GetLocalUseCaseRequest
;
import
com.ruoyi.web.request.ReviewStandardListByPageRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
com.ruoyi.web.response.NewTestUserCaseListResponse
;
import
com.ruoyi.web.response.SerialNumberResponse
;
import
com.ruoyi.web.response.SerialNumberResponseNew
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.security.core.parameters.P
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -39,6 +45,35 @@ public interface TestUseCaseMapper extends BaseMapper<TestUseCase> {
...
@@ -39,6 +45,35 @@ public interface TestUseCaseMapper extends BaseMapper<TestUseCase> {
*/
*/
List
<
OptionalUseCasesVO
>
selectOptionalUsecase
();
List
<
OptionalUseCasesVO
>
selectOptionalUsecase
();
/*
* 获取标准章节列表
* */
List
<
NewStandardVONew
>
getSandardList
(
ReviewStandardListByPageRequest
request
);
/*
* 获取测试场景列表
* */
List
<
NewScenarioUseCasesVONew
>
getScenarioList
(
@Param
(
"id"
)
Long
id
);
/*
* 获取测试用例列表
* */
List
<
UseCaseNewVO
>
getUsecaseList
(
@Param
(
"id"
)
Long
id
);
/*
* 获取标准章节列表
* */
List
<
StandardNewVO
>
selectStandardList
(
GetLocalUseCaseRequest
request
);
/*
* 获取用例列表
* */
List
<
UseCaseNewVO
>
selectUseCaseList
(
@Param
(
"id"
)
Long
id
);
/*
* 获取本地用例编号列表
* */
List
<
SerialNumberResponseNew
>
selectSerialNumberList
();
}
}
...
...
quality-review/src/main/java/com/ruoyi/mapper/UsecaseDetailsMapper.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.UsecaseDetails
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
UsecaseDetailsMapper
extends
BaseMapper
<
UsecaseDetails
>
{
}
quality-review/src/main/java/com/ruoyi/service/ReviewStandardService.java
View file @
59e81da6
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.*
;
import
org.apache.ibatis.annotations.Param
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
...
@@ -138,4 +139,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
...
@@ -138,4 +139,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* 新增细则按钮2
* 新增细则按钮2
* */
* */
List
<
AddDetailsResponse
>
getKeypointListNew
(
GetKeypointListRequest
getKeypointListRequest
);
List
<
AddDetailsResponse
>
getKeypointListNew
(
GetKeypointListRequest
getKeypointListRequest
);
/*
* 查看本地科恩标准细则数据
* */
List
<
ReviewStandardResponseAll
>
listByPageAllUseCaseNew
(
ReviewStandardListByPageRequest
request
);
List
<
ReviewKeyPointNew
>
selectKeypointListAllNew
(
ReviewStandardInspectionContentRequest
reviewStandardInspectionContentRequest
);
}
}
quality-review/src/main/java/com/ruoyi/service/StandardService.java
View file @
59e81da6
...
@@ -40,4 +40,9 @@ public interface StandardService extends IService<Standard> {
...
@@ -40,4 +40,9 @@ public interface StandardService extends IService<Standard> {
// List<StandardDTO> getStandardDTOListAll(List<StandardDTO> standardDTOList) throws IOException;
// List<StandardDTO> getStandardDTOListAll(List<StandardDTO> standardDTOList) throws IOException;
List
<
StandardDTO
>
getStandardListNew
()
throws
IOException
;
List
<
StandardDTO
>
getStandardListNew
()
throws
IOException
;
/*
* 标准库左侧数据分页查询(可选用标准列表)
* */
List
<
StandardDTO
>
getStandardListNewNew
()
throws
IOException
;
}
}
quality-review/src/main/java/com/ruoyi/service/TestUseCaseService.java
View file @
59e81da6
...
@@ -4,9 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
...
@@ -4,9 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.TestUseCase
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.vo.UseCaseUrlVO
;
import
com.ruoyi.domain.vo.UseCaseUrlVO
;
import
com.ruoyi.web.request.TestUseCaseByScenarioRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.TestUseCaseIdListRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.*
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -110,4 +108,15 @@ public interface TestUseCaseService extends IService<TestUseCase> {
...
@@ -110,4 +108,15 @@ public interface TestUseCaseService extends IService<TestUseCase> {
* @return
* @return
*/
*/
List
<
SerialNumberResponse
>
getSerialNumberList
(
String
request
)
throws
IOException
;
List
<
SerialNumberResponse
>
getSerialNumberList
(
String
request
)
throws
IOException
;
/*
* 获取用例列表
* */
NewTestUserCaseListResponseNew
getCaseListNewNew
(
ReviewStandardListByPageRequest
request
);
/*
* 获取本地测试用例
* */
TestUserCaseListNewResponse
getLocalUseCaseList
(
GetLocalUseCaseRequest
request
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/ReviewKeyPointServiceImpl.java
View file @
59e81da6
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.ReviewDetails
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.ReviewKeyPoint
;
import
com.ruoyi.domain.ReviewScene
;
import
com.ruoyi.domain.ReviewStandard
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.mapper.ReviewKeyPointMapper
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.service.ReviewKeyPointService
;
import
com.ruoyi.service.ReviewStandardService
;
import
com.ruoyi.service.ReviewStandardService
;
...
...
quality-review/src/main/java/com/ruoyi/service/impl/ReviewStandardServiceImpl.java
View file @
59e81da6
...
@@ -717,5 +717,60 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
...
@@ -717,5 +717,60 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return
addDetailsResponseList
;
return
addDetailsResponseList
;
}
}
@Override
public
List
<
ReviewStandardResponseAll
>
listByPageAllUseCaseNew
(
ReviewStandardListByPageRequest
request
)
{
List
<
ReviewStandardResponseAll
>
reviewStandardResponses
=
new
ArrayList
<>();
NewTestUserCaseListResponseNew
caseListNew
=
testUseCaseService
.
getCaseListNewNew
(
request
);
// 遍历所有用例
for
(
NewStandardVONew
newStandardVO
:
caseListNew
.
getUseCases
())
{
ReviewStandardResponseAll
reviewStandardResponse
=
new
ReviewStandardResponseAll
();
// 处理标准相关信息
reviewStandardResponse
.
setId
(
Long
.
parseLong
(
newStandardVO
.
getId
()));
reviewStandardResponse
.
setChapter
(
newStandardVO
.
getSerialNumber
());
reviewStandardResponse
.
setText
(
newStandardVO
.
getRequirements
());
reviewStandardResponse
.
setName
(
request
.
getName
());
reviewStandardResponse
.
setStandardNo
(
request
.
getStandardNo
());
reviewStandardResponse
.
setType
(
"test"
);
// 假设没有提供此信息
// 处理检验内容集合
List
<
ReviewKeyPointNew
>
keyPointList
=
new
ArrayList
<>();
for
(
NewScenarioUseCasesVONew
scenarioUseCaseVO
:
newStandardVO
.
getScenarioUseCases
())
{
ReviewKeyPointNew
keyPoint
=
new
ReviewKeyPointNew
();
keyPoint
.
setId
(
scenarioUseCaseVO
.
getId
().
toString
());
keyPoint
.
setText
(
scenarioUseCaseVO
.
getTestScenario
());
// 处理审查细则列表
List
<
ReviewDetails
>
reviewDetailsList
=
new
ArrayList
<>();
for
(
UseCaseNewVO
useCase
:
scenarioUseCaseVO
.
getUseCases
())
{
ReviewDetails
reviewDetails
=
new
ReviewDetails
();
reviewDetails
.
setId
(
Long
.
parseLong
(
useCase
.
getId
()));
reviewDetails
.
setText
(
useCase
.
getDescription
());
// 设置冗余信息便于前端显示
reviewDetails
.
setChapter
(
useCase
.
getCustomizedID
());
reviewDetails
.
setStandardText
(
useCase
.
getDescription
());
reviewDetailsList
.
add
(
reviewDetails
);
}
keyPoint
.
setReviewDetailsList
(
reviewDetailsList
);
keyPointList
.
add
(
keyPoint
);
}
reviewStandardResponse
.
setKeyPointList
(
keyPointList
);
reviewStandardResponses
.
add
(
reviewStandardResponse
);
}
return
reviewStandardResponses
;
}
@Override
public
List
<
ReviewKeyPointNew
>
selectKeypointListAllNew
(
ReviewStandardInspectionContentRequest
request
)
{
return
reviewKeyPointMapper
.
selectKeypointListByStandardIdNew
(
request
.
getId
());
}
}
}
quality-review/src/main/java/com/ruoyi/service/impl/StandardServiceImpl.java
View file @
59e81da6
...
@@ -344,6 +344,94 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -344,6 +344,94 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
}
return
standardList
;
}
@Override
public
List
<
StandardDTO
>
getStandardListNewNew
()
throws
IOException
{
List
<
StandardDTO
>
standardList
=
standardMapper
.
getStandardDTOList
();
List
<
StandardInspectionItemRelation
>
vos
=
standardInspectionItemRelationMapper
.
findList
(
standardList
);
for
(
StandardDTO
standard
:
standardList
)
{
List
<
StandardInspectionItemRelation
>
relationList
=
new
ArrayList
<>();
List
<
StandardTypeListResponse
>
typeListResponses
=
new
ArrayList
<>();
StandardTypeListResponse
responseSystem
=
new
StandardTypeListResponse
();
responseSystem
.
setType
(
"system"
);
responseSystem
.
setReviewStandardChapterListResponses
(
new
ArrayList
<>());
typeListResponses
.
add
(
responseSystem
);
StandardTypeListResponse
responseCar
=
new
StandardTypeListResponse
();
responseCar
.
setType
(
"car"
);
responseCar
.
setReviewStandardChapterListResponses
(
new
ArrayList
<>());
typeListResponses
.
add
(
responseCar
);
StandardTypeListResponse
responseTest
=
new
StandardTypeListResponse
();
responseTest
.
setType
(
"test"
);
responseTest
.
setReviewStandardChapterListResponses
(
new
ArrayList
<>());
typeListResponses
.
add
(
responseTest
);
for
(
StandardInspectionItemRelation
relation
:
vos
)
{
if
(
Objects
.
equals
(
relation
.
getStandardId
(),
standard
.
getId
()))
{
relationList
.
add
(
relation
);
}
}
for
(
StandardInspectionItemRelation
item
:
relationList
)
{
if
(
item
.
getDictCode
()
==
150
)
{
// car
GetChapterListRequest
getChapterListRequest
=
new
GetChapterListRequest
();
getChapterListRequest
.
setStandardType
(
"car"
);
getChapterListRequest
.
setStandardId
(
item
.
getStandardId
().
toString
());
List
<
ReviewStandardChapterListResponse
>
reviewStandardChapterListResponseList
=
reviewStandardMapper
.
getChapterListByType
(
getChapterListRequest
);
for
(
StandardTypeListResponse
response
:
typeListResponses
)
{
if
(
Objects
.
equals
(
response
.
getType
(),
"car"
))
{
response
.
setReviewStandardChapterListResponses
(
reviewStandardChapterListResponseList
);
}
}
}
if
(
item
.
getDictCode
()
==
151
)
{
//test
GetChapterListRequest
getChapterListRequest
=
new
GetChapterListRequest
();
getChapterListRequest
.
setStandardType
(
"test"
);
getChapterListRequest
.
setStandardId
(
item
.
getStandardId
().
toString
());
List
<
ReviewStandardChapterListResponse
>
reviewStandardChapterListResponseList
=
reviewStandardMapper
.
getChapterListByTypeNew
(
getChapterListRequest
);
for
(
StandardTypeListResponse
response
:
typeListResponses
){
if
(
Objects
.
equals
(
response
.
getType
(),
"test"
)){
response
.
setReviewStandardChapterListResponses
(
reviewStandardChapterListResponseList
);
}
}
}
if
(
item
.
getDictCode
()
==
152
)
{
// system
GetChapterListRequest
getChapterListRequest
=
new
GetChapterListRequest
();
getChapterListRequest
.
setStandardType
(
"system"
);
getChapterListRequest
.
setStandardId
(
item
.
getStandardId
().
toString
());
List
<
ReviewStandardChapterListResponse
>
reviewStandardChapterListResponseList
=
reviewStandardMapper
.
getChapterListByType
(
getChapterListRequest
);
for
(
StandardTypeListResponse
response
:
typeListResponses
)
{
if
(
Objects
.
equals
(
response
.
getType
(),
"system"
))
{
response
.
setReviewStandardChapterListResponses
(
reviewStandardChapterListResponseList
);
}
}
}
}
standard
.
setTypeList
(
typeListResponses
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StatisticsHomeServiceImpl.java
View file @
59e81da6
...
@@ -112,7 +112,7 @@ public class StatisticsHomeServiceImpl implements StatisticsHomeService {
...
@@ -112,7 +112,7 @@ public class StatisticsHomeServiceImpl implements StatisticsHomeService {
//获取当前标准下的场景数
//获取当前标准下的场景数
numberStatistics
.
setSceneNum
(
statisticsHomeMapper
.
selectSceneNum
(
standard
));
numberStatistics
.
setSceneNum
(
statisticsHomeMapper
.
selectSceneNum
(
standard
));
//窜 调用科恩接口的 request
//窜 调用科恩接口的 request
GetSerialNumberRequest
getSerialNumberRequest
=
new
GetSerialNumberRequest
();
/*
GetSerialNumberRequest getSerialNumberRequest = new GetSerialNumberRequest();
getSerialNumberRequest.setOffset(offset);
getSerialNumberRequest.setOffset(offset);
getSerialNumberRequest.setName(standard.getName());
getSerialNumberRequest.setName(standard.getName());
String request = JSONUtil.toJsonStr(getSerialNumberRequest);
String request = JSONUtil.toJsonStr(getSerialNumberRequest);
...
@@ -123,8 +123,9 @@ public class StatisticsHomeServiceImpl implements StatisticsHomeService {
...
@@ -123,8 +123,9 @@ public class StatisticsHomeServiceImpl implements StatisticsHomeService {
Integer usecaseNum = useCaseListNew.getUseCaseNum();
Integer usecaseNum = useCaseListNew.getUseCaseNum();
if (usecaseNum == null){
if (usecaseNum == null){
usecaseNum = 0;
usecaseNum = 0;
}
}*/
numberStatistics
.
setUsecaseNum
(
usecaseNum
);
//numberStatistics.setUsecaseNum(usecaseNum);
numberStatistics
.
setUsecaseNum
(
statisticsHomeMapper
.
selectUseCaseNum
(
standard
).
intValue
());
numberStatisticsList
.
add
(
numberStatistics
);
numberStatisticsList
.
add
(
numberStatistics
);
}
}
quantityStatisticsNewVO
.
setNumberStatisticsList
(
numberStatisticsList
);
quantityStatisticsNewVO
.
setNumberStatisticsList
(
numberStatisticsList
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
59e81da6
...
@@ -7,9 +7,7 @@ import com.ruoyi.domain.TestUseCase;
...
@@ -7,9 +7,7 @@ import com.ruoyi.domain.TestUseCase;
import
com.ruoyi.domain.vo.*
;
import
com.ruoyi.domain.vo.*
;
import
com.ruoyi.service.TestUseCaseService
;
import
com.ruoyi.service.TestUseCaseService
;
import
com.ruoyi.mapper.TestUseCaseMapper
;
import
com.ruoyi.mapper.TestUseCaseMapper
;
import
com.ruoyi.web.request.TestUseCaseByScenarioRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.TestUseCaseIdListRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.*
;
import
lombok.Data
;
import
lombok.Data
;
import
okhttp3.*
;
import
okhttp3.*
;
...
@@ -463,6 +461,43 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
...
@@ -463,6 +461,43 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
return
serialNumberList
;
return
serialNumberList
;
}
}
@Override
public
NewTestUserCaseListResponseNew
getCaseListNewNew
(
ReviewStandardListByPageRequest
request
)
{
NewTestUserCaseListResponseNew
caseResponse
=
new
NewTestUserCaseListResponseNew
();
List
<
NewStandardVONew
>
newStandardVOList
=
testUseCaseMapper
.
getSandardList
(
request
);
for
(
NewStandardVONew
newStandardVO
:
newStandardVOList
){
Long
id
=
Long
.
parseLong
(
newStandardVO
.
getId
());
List
<
NewScenarioUseCasesVONew
>
scenarioUseCasesVOList
=
testUseCaseMapper
.
getScenarioList
(
id
);
newStandardVO
.
setScenarioUseCases
(
scenarioUseCasesVOList
);
for
(
NewScenarioUseCasesVONew
newScenarioUseCasesVONew
:
scenarioUseCasesVOList
){
List
<
UseCaseNewVO
>
useCaseNewVOList
=
testUseCaseMapper
.
getUsecaseList
(
newScenarioUseCasesVONew
.
getId
());
newScenarioUseCasesVONew
.
setUseCases
(
useCaseNewVOList
);
}
}
caseResponse
.
setUseCases
(
newStandardVOList
);
return
caseResponse
;
}
@Override
public
TestUserCaseListNewResponse
getLocalUseCaseList
(
GetLocalUseCaseRequest
request
)
{
TestUserCaseListNewResponse
testUserCaseListNewResponse
=
new
TestUserCaseListNewResponse
();
List
<
StandardNewVO
>
standardList
=
testUseCaseMapper
.
selectStandardList
(
request
);
for
(
StandardNewVO
standardNewVO
:
standardList
){
Long
id
=
Long
.
parseLong
(
standardNewVO
.
getId
());
List
<
UseCaseNewVO
>
useCasesList
=
testUseCaseMapper
.
selectUseCaseList
(
id
);
standardNewVO
.
setUseCases
(
useCasesList
);
}
testUserCaseListNewResponse
.
setUseCases
(
standardList
);
return
testUserCaseListNewResponse
;
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/ReviewStandardController.java
View file @
59e81da6
...
@@ -61,7 +61,7 @@ public class ReviewStandardController extends BaseController {
...
@@ -61,7 +61,7 @@ public class ReviewStandardController extends BaseController {
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
else
if
(
request
.
getType
().
equals
(
"test"
)){
else
if
(
request
.
getType
().
equals
(
"test"
)){
List
<
ReviewStandardResponseAll
>
list
=
reviewStandardService
.
listByPageAllUseCase
(
request
);
List
<
ReviewStandardResponseAll
>
list
=
reviewStandardService
.
listByPageAllUseCase
New
(
request
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
else
{
}
else
{
List
<
ReviewStandardResponseAll
>
reviewStandardResponseAll
=
new
ArrayList
<>();
List
<
ReviewStandardResponseAll
>
reviewStandardResponseAll
=
new
ArrayList
<>();
...
...
quality-review/src/main/java/com/ruoyi/web/StandardController.java
View file @
59e81da6
...
@@ -61,6 +61,17 @@ public class StandardController extends BaseController {
...
@@ -61,6 +61,17 @@ public class StandardController extends BaseController {
return
R
.
ok
(
list
);
return
R
.
ok
(
list
);
}
}
@ApiOperation
(
"标准库左侧数据分页查询(可选用标准列表)"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getStandardListNewNew"
)
public
R
<
List
<
StandardDTO
>>
getStandardListNewNew
()
throws
IOException
{
List
<
StandardDTO
>
list
=
standardService
.
getStandardListNewNew
();
return
R
.
ok
(
list
);
}
@ApiOperation
(
"标准库分页查询(仅做展示列表)"
)
@ApiOperation
(
"标准库分页查询(仅做展示列表)"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
...
...
quality-review/src/main/java/com/ruoyi/web/TestUserCaseController.java
View file @
59e81da6
...
@@ -5,9 +5,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
...
@@ -5,9 +5,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.TestUseCase
;
import
com.ruoyi.domain.vo.UseCaseUrlVO
;
import
com.ruoyi.domain.vo.UseCaseUrlVO
;
import
com.ruoyi.service.TestUseCaseService
;
import
com.ruoyi.service.TestUseCaseService
;
import
com.ruoyi.web.request.TestUseCaseByScenarioRequest
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.TestUseCaseIdListRequest
;
import
com.ruoyi.web.request.TestUserCaseRequest
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -99,6 +97,17 @@ public class TestUserCaseController extends BaseController{
...
@@ -99,6 +97,17 @@ public class TestUserCaseController extends BaseController{
}
}
@ApiOperation
(
"查询本地测试用例"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getLocalUseCaseList"
,
produces
=
"application/json;charset=UTF-8"
)
public
R
<
TestUserCaseListNewResponse
>
getLocalUseCaseList
(
@Validated
@RequestBody
GetLocalUseCaseRequest
request
)
throws
IOException
{
return
R
.
ok
(
testUseCaseService
.
getLocalUseCaseList
(
request
));
}
@ApiOperation
(
"查询测试标准要求(科恩)"
)
@ApiOperation
(
"查询测试标准要求(科恩)"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
...
@@ -153,6 +162,21 @@ public class TestUserCaseController extends BaseController{
...
@@ -153,6 +162,21 @@ public class TestUserCaseController extends BaseController{
}
}
@ApiOperation
(
"查询测试用例(科恩)改版"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getUseCaseListNewNew"
,
produces
=
"application/json;charset=UTF-8"
)
public
R
<
NewTestUserCaseListResponseNew
>
getUseCaseListNewNew
(
@Validated
@RequestBody
GetUseCaseRequest
getUseCaseRequest
)
throws
IOException
{
ReviewStandardListByPageRequest
request
=
new
ReviewStandardListByPageRequest
();
request
.
setChapter
(
getUseCaseRequest
.
getSearchFields
().
getSerialNumber
());
request
.
setText
(
getUseCaseRequest
.
getSearchFields
().
getRequirements
());
request
.
setType
(
"test"
);
request
.
setName
(
getUseCaseRequest
.
getName
());
return
R
.
ok
(
testUseCaseService
.
getCaseListNewNew
(
request
));
}
@ApiOperation
(
"获取测试用例编号数组(科恩)"
)
@ApiOperation
(
"获取测试用例编号数组(科恩)"
)
@Trace
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
...
...
quality-review/src/main/java/com/ruoyi/web/request/GetLocalUseCaseRequest.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
web
.
request
;
import
lombok.Data
;
@Data
public
class
GetLocalUseCaseRequest
{
private
Long
standardId
;
private
String
standardNo
;
private
String
type
;
private
String
name
;
}
quality-review/src/main/java/com/ruoyi/web/response/NewTestUserCaseListResponseNew.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
web
.
response
;
import
com.ruoyi.domain.vo.NewStandardVO
;
import
com.ruoyi.domain.vo.NewStandardVONew
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
NewTestUserCaseListResponseNew
{
@ApiModelProperty
(
"测试用例"
)
List
<
NewStandardVONew
>
useCases
;
@ApiModelProperty
(
"总条数"
)
Integer
totalCount
;
@ApiModelProperty
(
"用例总条数"
)
Integer
useCaseNum
;
}
quality-review/src/main/java/com/ruoyi/web/response/SerialNumberResponseNew.java
0 → 100644
View file @
59e81da6
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"SerialNumberResponseNew"
,
description
=
"查询测试用例编号"
)
@Data
public
class
SerialNumberResponseNew
{
@ApiModelProperty
(
"用例id"
)
private
Long
id
;
@ApiModelProperty
(
"用例编号"
)
private
String
serialNumber
;
}
quality-review/src/main/resources/mapper/ReviewKeyPointMapper.xml
View file @
59e81da6
...
@@ -55,5 +55,14 @@
...
@@ -55,5 +55,14 @@
from t_review_keypoint
from t_review_keypoint
where review_standard_id = #{id}
where review_standard_id = #{id}
</select>
</select>
<select
id=
"selectKeypointListByStandardIdNew"
resultType=
"com.ruoyi.web.response.ReviewKeyPointNew"
>
select
id,
test_scenario as text,
standard_id as reviewStandardId
from t_usecase_test_scenario
where standard_id = #{standardId}
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/ReviewStandardMapper.xml
View file @
59e81da6
...
@@ -232,6 +232,38 @@
...
@@ -232,6 +232,38 @@
from t_review_standard
from t_review_standard
where standard_id = #{deleteDetailsRequest.standardId} and standard_no = #{deleteDetailsRequest.standardNo} and type = #{deleteDetailsRequest.type}
where standard_id = #{deleteDetailsRequest.standardId} and standard_no = #{deleteDetailsRequest.standardNo} and type = #{deleteDetailsRequest.type}
</select>
</select>
<select
id=
"getChapterListByTypeNew"
resultType=
"com.ruoyi.web.response.ReviewStandardChapterListResponse"
>
select standard_id,chapter,text,type
from t_review_standard
where type = #{getChapterListRequest.standardType}
and standard_id = #{getChapterListRequest.standardId}
</select>
<select
id=
"selectReviewStandardListAllNew"
resultType=
"com.ruoyi.web.response.ReviewStandardResponseAll"
>
select
id,
chapter,
text,
test_method as testMethod,
name,
standard_no as standardNo,
type
from t_review_standard
<where>
<if
test=
"standardId != null"
>
and standard_id = #{standardId}
</if>
<if
test=
"type != null and type != ''"
>
and `type` = #{type}
</if>
<if
test=
"chapter != null and chapter != ''"
>
and chapter =#{chapter}
</if>
<if
test=
"text != null and text != ''"
>
and text like concat('%', #{text}, '%')
</if>
<if
test=
"testMethod != null and testMethod != ''"
>
and test_method like concat('%', #{testMethod}, '%')
</if>
<if
test=
"name != null and text != ''"
>
and name like concat('%',#{name}, '%')
</if>
<if
test=
"standardNo != null and standardNo != ''"
>
and standard_no like concat('%',#{standardNo},'%')
</if>
</where>
/*ORDER BY
chapter*/
ORDER BY
CAST(SUBSTRING_INDEX(chapter, '.', 1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(chapter, '.', 2), '.', -1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(chapter, '.', 3), '.', -1) AS UNSIGNED)
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/StatisticsHomeMapper.xml
View file @
59e81da6
...
@@ -97,4 +97,13 @@
...
@@ -97,4 +97,13 @@
left join t_standard ts on trs.standard_id = ts.id
left join t_standard ts on trs.standard_id = ts.id
where ts.id = #{id} and ts.name =#{name}
where ts.id = #{id} and ts.name =#{name}
</select>
</select>
<select
id=
"selectUseCaseNum"
resultType=
"java.lang.Long"
>
select
count(tud.description)
from t_usecase_details tud
left join t_usecase_test_scenario tuts on tud.test_scenario_id = tuts.id
left join t_review_standard trs on tuts.standard_id = trs.id
left join t_standard ts on trs.standard_id = ts.id
where ts.id = #{id} and ts.name =#{name}
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
59e81da6
...
@@ -84,4 +84,79 @@
...
@@ -84,4 +84,79 @@
from
from
t_test_usecase
t_test_usecase
</select>
</select>
<select
id=
"getSandardList"
resultType=
"com.ruoyi.domain.vo.NewStandardVONew"
>
select id,
chapter as serialNumber,
text as requirements
from t_review_standard
<where>
<if
test=
"chapter != null and chapter != ''"
>
and chapter like concat('%', #{chapter}, '%')
</if>
<if
test=
"standardId != null and standardId != ''"
>
and standard_id = #{standardId}
</if>
<if
test=
"type != null and type != ''"
>
and type = #{type}
</if>
<if
test=
"text != null and text != ''"
>
and text like concat('%', #{text}, '%')
</if>
<if
test=
"name != null and name != ''"
>
and name = #{name}
</if>
</where>
</select>
<select
id=
"getScenarioList"
resultType=
"com.ruoyi.domain.vo.NewScenarioUseCasesVONew"
>
select id,
test_scenario
from t_usecase_test_scenario
where standard_id = #{id}
</select>
<select
id=
"getUsecaseList"
resultType=
"com.ruoyi.domain.vo.UseCaseNewVO"
>
select id,
customized_id,
description
from t_usecase_details
where test_scenario_id = #{id}
</select>
<select
id=
"selectStandardList"
resultType=
"com.ruoyi.domain.vo.StandardNewVO"
>
select id,
text as requirements,
chapter as serialNumber
from t_review_standard
<where>
<if
test=
"standardId != null and standardId != ''"
>
and standard_id = #{standardId}
</if>
<if
test=
"standardNo != null and standardNo != ''"
>
and standard_no = #{standardNo}
</if>
<if
test=
"type != null and type != ''"
>
and type = #{type}
</if>
<if
test=
"name != null and name != ''"
>
and name = #{name}
</if>
</where>
</select>
<select
id=
"selectUseCaseList"
resultType=
"com.ruoyi.domain.vo.UseCaseNewVO"
>
select
tud.id,
customized_id,
description
from t_usecase_details tud
left join t_usecase_test_scenario tuts on tud.test_scenario_id = tuts.id
left join t_usecase_standard tus on tuts.standard_id = tus.id
where tus.id = #{id}
</select>
<select
id=
"selectSerialNumberList"
resultType=
"com.ruoyi.web.response.SerialNumberResponseNew"
>
select
id,
customized_id as serialNumber
from t_usecase_details
</select>
</mapper>
</mapper>
quality-review/src/main/resources/mapper/UsecaseDetailsMapper.xml
0 → 100644
View file @
59e81da6
<?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.UsecaseDetailsMapper"
>
<resultMap
type=
"com.ruoyi.domain.UsecaseDetails"
id=
"UsecaseDetailsResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"customizedId"
column=
"customized_id"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"usecaseId"
column=
"usecase_id"
/>
<result
property=
"testScenarioId"
column=
"test_scenario_id"
/>
</resultMap>
</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