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
cd836a67
Commit
cd836a67
authored
Sep 05, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科恩获取树状测试用例、获取标准要求
parent
e746da10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+23
-13
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
cd836a67
...
@@ -306,12 +306,17 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
...
@@ -306,12 +306,17 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
String
string
=
response
.
body
().
string
();
String
string
=
response
.
body
().
string
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
string
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
string
);
// 获取测试用例
// 获取测试用例
List
<
StandardNewVO
>
list
=
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
getList
(
"nodes"
,
StandardNewVO
.
class
);
if
(
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
)
!=
null
)
{
List
<
StandardNewVO
>
list
=
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
getList
(
"nodes"
,
StandardNewVO
.
class
);
userCaseResponse
.
setUseCases
(
list
);
// 获取总条数
userCaseResponse
.
setUseCases
(
list
);
Integer
totalCount
=
(
Integer
)
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
get
(
"totalCount"
);
// 获取总条数
userCaseResponse
.
setTotalCount
(
totalCount
);
Integer
totalCount
=
(
Integer
)
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
get
(
"totalCount"
);
userCaseResponse
.
setTotalCount
(
totalCount
);
}
else
{
userCaseResponse
.
setUseCases
(
new
ArrayList
<>());
userCaseResponse
.
setTotalCount
(
0
);
}
return
userCaseResponse
;
return
userCaseResponse
;
}
}
...
@@ -342,13 +347,18 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
...
@@ -342,13 +347,18 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
Response
response
=
client
.
newCall
(
requestKE
).
execute
();
Response
response
=
client
.
newCall
(
requestKE
).
execute
();
String
string
=
response
.
body
().
string
();
String
string
=
response
.
body
().
string
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
string
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
string
);
// 获取测试用例
// 获取测试标准
List
<
StandardNewVO
>
list
=
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
getList
(
"nodes"
,
StandardNewVO
.
class
);
if
(
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
)
!=
null
)
{
List
<
StandardNewVO
>
list
=
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
getList
(
"nodes"
,
StandardNewVO
.
class
);
standardListResponse
.
setStandards
(
list
);
// 获取总条数
standardListResponse
.
setStandards
(
list
);
Integer
totalCount
=
(
Integer
)
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
get
(
"totalCount"
);
// 获取总条数
standardListResponse
.
setTotalCount
(
totalCount
);
Integer
totalCount
=
(
Integer
)
jsonObject
.
getJSONObject
(
"data"
).
getJSONObject
(
"regulationByName"
).
getJSONObject
(
"items"
).
get
(
"totalCount"
);
standardListResponse
.
setTotalCount
(
totalCount
);
}
else
{
standardListResponse
.
setStandards
(
new
ArrayList
<>());
standardListResponse
.
setTotalCount
(
0
);
}
return
standardListResponse
;
return
standardListResponse
;
}
}
...
...
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