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
beb1b944
Commit
beb1b944
authored
Sep 12, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'master'
获取所有测试用例编号 See merge request
!13
parents
1ff7a1c2
b2efd2ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+17
-5
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
beb1b944
...
...
@@ -438,14 +438,26 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
// 获取测试用例
if
(
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
)
!=
null
)
{
List
<
StandardNewVO
>
list
=
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
getList
(
"nodes"
,
StandardNewVO
.
class
);
SerialNumberResponse
numberResponse
=
new
SerialNumberResponse
();
for
(
StandardNewVO
vo
:
list
)
{
Map
<
String
,
SerialNumberResponse
>
idToNumberResponse
=
new
HashMap
<>();
for
(
StandardNewVO
vo
:
list
)
{
for
(
UseCaseNewVO
useCaseNewVO
:
vo
.
getUseCases
())
{
numberResponse
.
setId
(
useCaseNewVO
.
getId
());
numberResponse
.
setSerialNumber
(
vo
.
getSerialNumber
());
serialNumberList
.
add
(
numberResponse
);
SerialNumberResponse
numberResponse
=
idToNumberResponse
.
computeIfAbsent
(
useCaseNewVO
.
getId
(),
k
->
{
SerialNumberResponse
resp
=
new
SerialNumberResponse
();
resp
.
setId
(
useCaseNewVO
.
getId
());
resp
.
setSerialNumber
(
useCaseNewVO
.
getCustomizedID
());
return
resp
;
}
);
}
}
// 将 Map 中的值提取到 serialNumberList 中
serialNumberList
.
addAll
(
idToNumberResponse
.
values
());
}
return
serialNumberList
;
...
...
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